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 1lpJx0-0000H9-Bc for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Jun 2021 00:14:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lpJwz-00045y-8E for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Jun 2021 00:14:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpJqK-00036O-HQ; Sat, 05 Jun 2021 00:07:12 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpJqI-0003Zr-JE; Sat, 05 Jun 2021 00:07:11 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A624E5C01D5; Fri, 4 Jun 2021 20:07:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 04 Jun 2021 20:07:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=4COR9kzsu3LGcbkjre4hQKUUJ+EHpfjNNCa0e3jYz00=; b=D6N0TGdm RfOzFnZdmZKeS62qLuLHYBeyonKYO5ImyiBNd1KFsa9Xcu5JdYfzzQTUX1Q36xS9 1XYydvS3JBW0JRKQyWxfO67TMnntxLpc1/kbRqbYwFpCBp0bOKp7zWOQcL/7Pgrb QasQQ/T9bdSlx+WSO8yHM7jc4rhEw9TgiMWbJWeTFJ3jWyl3zoicB6SCRBLKeBCr Op/YRADmCBpAECjjiVjiHO6jm7W1wOb0gg9ruC8gJSxOLn8pTwU83wRIn7Re53Zo 4xb6gcANOAbSz4MATqn1DFbv0pu1IapLc5bEQQVCpN/ttQcWfS+zQBGpoK9qsHK0 iYzwUMVMGrL9tA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtvddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttddunecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeeggeevveffveejffdutefhvddtgeeghffhgfeuhfefjeei gfevhfefleevtdduteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Jun 2021 20:07:08 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id A42122A0D0C; Fri, 4 Jun 2021 20:07:05 -0400 (-04) Date: Fri, 4 Jun 2021 20:07:05 -0400 From: Alvaro Herrera To: Andres Freund Cc: "Drouvot, Bertrand" , Tomas Vondra , "pgsql-bugs@postgresql.org" , PostgreSQL-development , "Schneider (AWS), Jeremy" Subject: Re: logical decoding bug: segfault in ReorderBufferToastReplace() Message-ID: <202106050007.hygt5df5ni64@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191211163522.t2ljtydarlmusoix@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk [Resent -- apologies to those who are getting this email twice. Please be mindful to reply to this one if you do. I think the no-crosspost policy is very obnoxious and should be relaxed.) On 2019-Dec-11, Andres Freund wrote: > On 2019-12-11 08:17:01 +0000, Drouvot, Bertrand wrote: > > >>Core was generated by `postgres: walsender > > >>(31712)'. > > >>Program terminated with signal 11, Segmentation fault. > > >>#0 ReorderBufferToastReplace (rb=0x3086af0, txn=0x3094a78, > > >>relation=0x2b79177249c8, relation=0x2b79177249c8, change=0x30ac938) > > >> at reorderbuffer.c:3034 > > >>3034 reorderbuffer.c: No such file or directory. > > >>... > > >>(gdb) #0 ReorderBufferToastReplace (rb=0x3086af0, txn=0x3094a78, > > >>relation=0x2b79177249c8, relation=0x2b79177249c8, change=0x30ac938) > > >> at reorderbuffer.c:3034 > > >>#1 ReorderBufferCommit (rb=0x3086af0, xid=xid@entry=1358809, > > >>commit_lsn=9430473346032, end_lsn=, > > >> commit_time=commit_time@entry=628712466364268, > > >>origin_id=origin_id@entry=0, origin_lsn=origin_lsn@entry=0) at > > >>reorderbuffer.c:1584 > > This indicates that a toast record was present for that relation, > despite: Can you explain what it is you saw that indicates that a toast record was present for the relation? I may be misreading the code, but there's nothing obvious that says that if we reach there, then a toast datum exists anywhere for this relation. We only know that txn->toast_hash is set, but that could be because the transaction touched a toast record in some other table. Right? > > \d+ rel_having_issue > > Table "public.rel_having_issue" > > Column | Type | Collation | Nullable | Default | Storage | Stats target | Description > > ----------------+--------------------------+-----------+----------+-------------------------------------------------+----------+--------------+------------- > > id | integer | | not null | nextval('rel_having_issue_id_seq'::regclass) | plain | | > > field1 | character varying(255) | | | | extended | | > > field2 | integer | | | | plain | | > > field3 | timestamp with time zone | | | | plain | | > > Indexes: > > "rel_having_issue_pkey" PRIMARY KEY, btree (id) -- Álvaro Herrera 39°49'30"S 73°17'W really, I see PHP as like a strange amalgamation of C, Perl, Shell inflex: you know that "amalgam" means "mixture with mercury", more or less, right? i.e., "deadly poison"