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 1nEv26-0003sL-3h for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Feb 2022 15:25:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nEv24-0007ZG-Sl for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Feb 2022 15:25:24 +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 1nEv24-0007Z7-JX for pgsql-bugs@lists.postgresql.org; Tue, 01 Feb 2022 15:25:24 +0000 Received: from olivedrab.birch.relay.mailchannels.net ([23.83.209.135]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEv21-0002OK-B0 for pgsql-bugs@lists.postgresql.org; Tue, 01 Feb 2022 15:25:23 +0000 X-Sender-Id: a2hosting|x-authuser|bench@silentmedia.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 44C8C862AE3; Tue, 1 Feb 2022 15:25:17 +0000 (UTC) Received: from a2ss24.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 991AC862B31; Tue, 1 Feb 2022 15:25:16 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|bench@silentmedia.com Received: from a2ss24.a2hosting.com (a2ss24.a2hosting.com [75.98.175.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.103.158.127 (trex/6.4.3); Tue, 01 Feb 2022 15:25:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|bench@silentmedia.com X-MailChannels-Auth-Id: a2hosting X-Minister-Imminent: 7fdc94bc0fe2600c_1643729117100_2820431858 X-MC-Loop-Signature: 1643729117100:1680117309 X-MC-Ingress-Time: 1643729117099 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=silentmedia.com; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Psa2Ac6VMUy1yzSys02oJ6gZsfHMQ3qh8oV3z8May0A=; b=lPFsknO6W71uJfdGHOqV8D9AmI /teIV6tnntBAhMn8fMic91MEhLrBSkGzK75sIDq5kBMB9Cxcl0Vx/Xv6I/MK47Wo7CGsavJLRqrEy 6MohhJiMxPIIY+PYRBjrbcY6qCOlDpKwWPute+Vb1KVafzFgE+2KLaAXyTjGUHeQn3bW8emAl00WI bODPshKt8gvKopxcyaUHRtZ3mUZBCKl9CrqaS39tjojB6XCxaO+NA0m1HSav4+8+fgo55qLjzrNPd u9kPnjhnMmnqK9ONGH4+NN7hfA9brLPZr4xmFYS/OjcEB8fa5rfsgNmh30bLB5e5A0DMpbD7YqhYg 0Tg95l9g==; Received: from 97-113-88-109.tukw.qwest.net ([97.113.88.109]:61281 helo=Rolo.local) by a2ss24.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nEv1W-00CP6l-8l; Tue, 01 Feb 2022 10:25:15 -0500 Subject: Re: BUG #17389: pg_repack creates race conditions on streaming replicas To: Nick Cleaton Cc: pgsql-bugs@lists.postgresql.org References: <17389-c866083cf152593e@postgresql.org> From: Ben Chobot Message-ID: <8cc974ce-8398-a892-a0dc-a65d5b5d65c6@silentmedia.com> Date: Tue, 1 Feb 2022 07:25:13 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:52.0) Gecko/20100101 PostboxApp/7.0.54 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------8E1054C8E1E8678656271017" Content-Language: en-US X-AuthUser: bench@silentmedia.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------8E1054C8E1E8678656271017 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Nick Cleaton wrote on 2/1/22 12:43 AM: > We've very occasionally seen something similar with a script that did > CREATE INDEX CONCURRENTLY, RENAME INDEX and DROP INDEX CONCURRENTLY on > the primary, but not since we upgraded from 9.4 to 12 and switched to > using REINDEX CONCURRENTLY. In our case the OID in the error belonged > to the index that was dropped, not the table. > > I think It'd be worth noting the OIDs of the table and its indexes > before each run, so that you can tell if it belongs to an index in > your case. Oh it most certainly did. (We validated it in other testing, and the test we ran had pg_repack only working on indices anyway.) It's good to hear you don't see any such issues using SQL commands. Have you tried using a simple REINDEX CONCURRENTLY? --------------8E1054C8E1E8678656271017 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Nick Cleaton wrote on 2/1/22 12:43 AM:
We've very occasionally seen something similar with a script that did CREATE INDEX CONCURRENTLY, RENAME INDEX and DROP INDEX CONCURRENTLY on the primary, but not since we upgraded from 9.4 to 12 and switched to using REINDEX CONCURRENTLY. In our case the OID in the error belonged to the index that was dropped, not the table.

I think It'd be worth noting the OIDs of the table and its indexes before each run, so that you can tell if it belongs to an index in your case.

Oh it most certainly did. (We validated it in other testing, and the test we ran had pg_repack only working on indices anyway.)

It's good to hear you don't see any such issues using SQL commands. Have you tried using a simple REINDEX CONCURRENTLY?
--------------8E1054C8E1E8678656271017--