public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andres Freund <[email protected]>
To: Tom Lane <[email protected]>
Cc: Dean Rasheed <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: BUG #19380: Transition table in AFTER INSERT trigger misses rows from MERGE when used with INSERT in a CTE
Date: Sat, 24 Jan 2026 12:03:49 -0500
Message-ID: <hvus56twlvqnucatfamtodwwt4kaxfmorksxc2yk6su6p2teph@xjy4r6uvsaqd> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAEZATCVtbX5+qxbHAW=KGQUVv3hJCAC3pKZppy46Gac2t6gAsg@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAEZATCX3obg5BP3g36LFDhsZgG9BYPN3qQusz_F-K=-yOoPJCw@mail.gmail.com>
<[email protected]>
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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: BUG #19380: Transition table in AFTER INSERT trigger misses rows from MERGE when used with INSERT in a CTE
In-Reply-To: <hvus56twlvqnucatfamtodwwt4kaxfmorksxc2yk6su6p2teph@xjy4r6uvsaqd>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox