Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if4xZ-00069A-P6 for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Dec 2019 16:35:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1if4xY-0003R9-C3 for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Dec 2019 16:35:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if4xX-0003Qz-19; Wed, 11 Dec 2019 16:35:32 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if4xT-00047y-1p; Wed, 11 Dec 2019 16:35:30 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 3A466B38; Wed, 11 Dec 2019 11:35:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 11 Dec 2019 11:35:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=Ll5IVCBZ/7lIbhcdSY1VhxjWHio R3lAAXK3CQHO/lK0=; b=eYDhylFWzjGNtZ7ocNySh+S1lGTjJVt/BY5g2H1j27c bbQVVr/qyHaI3/KghvodF3vazV+m9et3TFkBQ4k7C7pXVIA9boelOIf+iyyl9Q1d yiPHRzC4sK44t1jydzY7O+nEI7cebybOJ4LX6ERWqTMq4Cif3ufYEcnC8OHZhkON s4uqCP3eTA2IEUjcCgpv5en0NzLnfekRCLCMry1vuLzgTPl3rek2LIUasvNoeveh jgaIopxJOdoNq2gadt0XFGAjocnqk0pInduv9Bb9FqyyqU369Z9HelnnS++f5c4k ScBSq2KZW9lKTrm9BP3COg6NPc0p7E/Xeh6JCZrroxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Ll5IVC BZ/7lIbhcdSY1VhxjWHioR3lAAXK3CQHO/lK0=; b=UFqLMQHE94Aef8l6+s+72R d0VF3wLR9I0HsrS9qMfbb+JyzaAN5wcqZayccOROAqs19EY8TH0FHfIYByuHa1Wa 27uFY9LKwf4pAEpYjY8NRKaGlDMcTf9JkrVi+6mRyBDJH8kV6uqcr3KZAyiiRy5p sc7MGJMfHVcczj9mLvmo7IK/KhAB1Zlg1dPrnQTIGc4l7g16zRTIioAt6OFOQNZV A80IzubR+FbCaLY4rCbV5AY5sgZ5NsMT6L35POicVTcTpfKgUaP2u5uUSrer2L7L PGcgIjFmjl07mQz8JnK0Q3y7u9tEGUu6npMao6D6IwHSjoyKy38freXwByMVtSgQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudelhedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkphepie ejrdduiedtrddvudekrddvfeejnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id 52A9B30600D4; Wed, 11 Dec 2019 11:35:23 -0500 (EST) Date: Wed, 11 Dec 2019 08:35:22 -0800 From: Andres Freund To: "Drouvot, Bertrand" Cc: Tomas Vondra , "pgsql-bugs@postgresql.org" , PostgreSQL-development , "Schneider (AWS), Jeremy" Subject: Re: logical decoding bug: segfault in ReorderBufferToastReplace() Message-ID: <20191211163522.t2ljtydarlmusoix@alap3.anarazel.de> References: <20191205133836.lulisfo2fphdrjp3@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, 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: > > \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) > > select relname,relfilenode,reltoastrelid from pg_class where relname='rel_having_issue'; > relname | relfilenode | reltoastrelid > ---------------------+-------------+--------------- > rel_having_issue | 16428 | 0 I think we need to see pg_waldump output for the preceding records. That might allow us to see why there's a toast record that's being associated with this table, despite there not being a toast table. Seems like we clearly should add an elog(ERROR) here, so we error out, rather than crash. Has there been DDL to this table? Could you print out *change? Is this version of postgres effectively unmodified in any potentially relevant region (snapshot computations, generation of WAL records, ...)? Greetings, Andres Freund