Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vjh3G-002jyv-2m for pgsql-bugs@arkaria.postgresql.org; Sat, 24 Jan 2026 17:03:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vjh3D-0037vm-21 for pgsql-bugs@arkaria.postgresql.org; Sat, 24 Jan 2026 17:03:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vjh3C-0037ve-2U for pgsql-bugs@lists.postgresql.org; Sat, 24 Jan 2026 17:03:55 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vjh3A-0026K2-0D for pgsql-bugs@lists.postgresql.org; Sat, 24 Jan 2026 17:03:54 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id 119147A0122; Sat, 24 Jan 2026 12:03:51 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Sat, 24 Jan 2026 12:03:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1769274230; x=1769360630; bh=4AJeOgmBLr HmOyKhovwUYsAghSY+9ZRaw7GSrmpM48I=; b=YvcCi4TOeIk35w2ABz3ApjSUqA 17e/hKarqkti4rjJRcBCTKr6tpAtg1guVt/An54eyDVSlVXWsWrFqlCc+0QLoF53 sbwoVGOcfHNLxCdm8wCadCncM8ESfzmKfMlsAz9Dm7Rib6vrMybrPqLHfdwFWh8Z 91Y0i5IuR2LHXDX77L7hmxRTYwJoiI11y65L3SrOBUh74H4WSE1OyNZ/oKhQhgo7 Cyv7gtlz4tg0krcQjbfJi0c1o68ksvm2uWct4LyuxvvYTYsRbIWPmCoEahoFsvYT Ghdjprm7KEnbc1RQ0fxS/gUEUlexJTSsbBtSriOGvUyQ7ihgMsiUg+aMQ5AA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1769274230; x=1769360630; bh=4AJeOgmBLrHmOyKhovwUYsAghSY+9ZRaw7G SrmpM48I=; b=jCIxVkGcJIBxeZdPBJa6KROhPr0ivikDwaGmm3hAmrmOzm4C3n9 IkRo0rhjP5jZSMJFYXr0DHIoGIHm6zsqNwpuAFc4ctNzZYM5H0iF00WDV5Bp+e8B 1/28n3ok+d4SB5WbIBDzC9BQt/FUththbDoqjyDkTNhdPwNbyiWE9vkkyMbt4xEW Sw2sdPXpUZ07zaoLocTOP4kQgGIdqlXwpzK6NTlC53FOcx4uVgmXmR/fTzBOwqj1 1RpzNvxBTOfuPHbEQ8OHJqaPF6zgiIOFQiCYYY/S3B5Eq2+jN4/wrqT7OkXcZHCk HtrG76gf9WxduXGLH8GNNTpCzHIDnjcxmLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduhedvgeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnheptedtkeefffeuudeufeeiffekgeeujefgteefvefhudegleehieeufeffhfeh gffhnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdgu vgdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepug gvrghnrdgrrdhrrghshhgvvggusehgmhgrihhlrdgtohhmpdhrtghpthhtohepugiffiho vghlfhgvlhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdgsuhhgsheslh hishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhsshdr phhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 24 Jan 2026 12:03:50 -0500 (EST) Date: Sat, 24 Jan 2026 12:03:49 -0500 From: Andres Freund To: Tom Lane Cc: Dean Rasheed , dwwoelfel@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19380: Transition table in AFTER INSERT trigger misses rows from MERGE when used with INSERT in a CTE Message-ID: References: <19380-4e293be2b4007248@postgresql.org> <1576968.1768929680@sss.pgh.pa.us> <1698130.1768932056@sss.pgh.pa.us> <3256998.1769270320@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3256998.1769270320@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-01-24 10:58:40 -0500, Tom Lane wrote: > crake has reported in [1]: > > Leaf changes summary: 2 artifacts changed > Changed leaf types summary: 2 leaf types changed > Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function (2 filtered out) > Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable > > 'struct AfterTriggersTableData' changed: > type size changed from 80 to 64 (in bytes) > 2 data member deletions: > 'Tuplestorestate* old_del_tuplestore', at offset 56 (in bytes) > 'Tuplestorestate* new_ins_tuplestore', at offset 64 (in bytes) > there are data member changes: > 'TupleTableSlot* storeslot' offset changed from 72 to 56 (in bytes) (by -16 bytes) > > 'struct TransitionCaptureState' changed: > type size changed from 24 to 40 (in bytes) > 2 data member insertions: > 'AfterTriggersTableData* tcs_update_private', at offset 24 (in bytes) > 'AfterTriggersTableData* tcs_delete_private', at offset 32 (in bytes) > there are data member changes: > name of 'TransitionCaptureState::tcs_private' changed to 'TransitionCaptureState::tcs_insert_private' > > > I find it unhelpful that it reported the AfterTriggersTableData > change as an ABI change, even though that struct is not globally > accessible. I wonder if there's some libabigail switches we > should be tweaking to refine that. Specifying --headers-dir ... during abidw seems to do the trick. Without --headers-dir: 'struct AfterTriggersTableData at trigger.c:3912:1' changed: type size changed from 80 to 64 (in bytes) 2 data member deletions: 'Tuplestorestate* old_del_tuplestore', at offset 56 (in bytes) at trigger.c:3934:1 'Tuplestorestate* new_ins_tuplestore', at offset 64 (in bytes) at trigger.c:3936:1 there are data member changes: 'TupleTableSlot* storeslot' offset changed from 72 to 56 (in bytes) (by -16 bytes) 'struct TransitionCaptureState at trigger.h:56:1' changed: type size changed from 24 to 40 (in bytes) 2 data member insertions: 'AfterTriggersTableData* tcs_update_private', at offset 24 (in bytes) at trigger.h:82:1 'AfterTriggersTableData* tcs_delete_private', at offset 32 (in bytes) at trigger.h:83:1 there are data member changes: name of 'TransitionCaptureState::tcs_private' changed to 'TransitionCaptureState::tcs_insert_private' at trigger.h:81:1 With --headers-dir: 'struct TransitionCaptureState at trigger.h:56:1' changed: type size changed from 24 to 40 (in bytes) 2 data member insertions: 'AfterTriggersTableData* tcs_update_private', at offset 24 (in bytes) at trigger.h:82:1 'AfterTriggersTableData* tcs_delete_private', at offset 32 (in bytes) at trigger.h:83:1 (the reason --headers-dir matters is that it implies dropping private types) So it seems like that'd improve things... I did check the PR adding this to the buildfarm [1] and it doesn't use --headers-dir. It also has the nice side-benefit of making the diffing a bit faster (65s to 48s on my older workstation). Greetings, Andres Freund [1] https://github.com/PGBuildFarm/client-code/pull/38/changes