Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkIFO-0000cv-JS for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Nov 2021 03:56:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mkIFN-0001TP-IM for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Nov 2021 03:56:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkIFN-0001TG-2A for pgsql-bugs@lists.postgresql.org; Tue, 09 Nov 2021 03:56:33 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mkIFK-0000cA-0U for pgsql-bugs@lists.postgresql.org; Tue, 09 Nov 2021 03:56:32 +0000 Received: by mail-qt1-x82f.google.com with SMTP id t11so117904qtw.3 for ; Mon, 08 Nov 2021 19:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IeU3XUJOZf4F27rZKLmmEJDcKJzBit+c+WzK/isbjKQ=; b=KNVKNdOX2P/mxy6js/d+fvTonkejjUPEHOsVidJWVqtFFUo1xwBwStcnOKFmrGUCS2 KuEapsOwKAG1bBYHRr/yND5CwAOMjUgqGNCO2cVyvoIA65bML0OeYhkUqpi1yB+7jpT1 uluXgpFdOHBOGY3xdbiQWiDj+i7Q6YNAP/FBY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IeU3XUJOZf4F27rZKLmmEJDcKJzBit+c+WzK/isbjKQ=; b=rD55YsNSgmAe/DgU6zteQznqhZHDWef2YCrieB5K6vq8mPMSxxqhavzZno4v2vKPiF IdPkCmtWg96M6BAldBvdY643mabkLpBKNIMhE0Fm+PkVa3XDfBFxC6DXntIAgprxkf1e dVv1T09yteERegzCTA6y70qmbmoT5Cn79hv1o6zCAg8vJ1CVDoZtEsf/ou3FuuIifmTm hnPNu8BykdS8lxAIWAcSW4dtWHI5MRl8vLpspBPl2+ou9L1lrXEtsgFw1KPmqueXIOiS e6aYpgcQZzumlP5e9APCvs1y1kUbYhAKgWhew2JNkLySj0+uqSGwr9oik72V4QOfieZC VZrg== X-Gm-Message-State: AOAM53184GqPn1CL0SU0X0vdp/EiY4aP9bwwff0et9wnOQQxRuAKyuUl qOAOtY1v18hUYNbZBAGm3qUuQg== X-Google-Smtp-Source: ABdhPJz8YyC3Tayeiq82LQjjU1xt6QWk6PoGLRkqpA4exx45wEBFCzAMB0xshxPqivFBi+I1RS7IkQ== X-Received: by 2002:a05:622a:1051:: with SMTP id f17mr4995392qte.65.1636430188158; Mon, 08 Nov 2021 19:56:28 -0800 (PST) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id i67sm10571417qkd.90.2021.11.08.19.56.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Nov 2021 19:56:27 -0800 (PST) Date: Mon, 8 Nov 2021 19:56:24 -0800 From: Noah Misch To: Andres Freund Cc: Alexey Ermakov , Robert Haas , Maxim Boguk , PostgreSQL mailing lists , Peter Geoghegan , Michael Paquier Subject: Re: BUG #17268: Possible corruption in toast index after reindex index concurrently Message-ID: <20211109035624.GA940092@rfd.leadboat.com> References: <366f7247-709e-c07c-4875-068be1121c3a@dataegret.com> <20211108183646.r3y6pldylxngxwl4@alap3.anarazel.de> <20211108185317.fz42txmnkqdkpix6@alap3.anarazel.de> <20211108203641.whpia3pzjofellf4@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211108203641.whpia3pzjofellf4@alap3.anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Nov 08, 2021 at 12:36:41PM -0800, Andres Freund wrote: > One possible way to fix this would be to make ReindexRelationConcurrently() > acquire a lock on the underlying table when reindexing a toast table. Another > to not release the lock in toast_save_datum(). The latter is more future-proof. Does it have material disadvantages?