Re: Improve comment on cid mapping (was Re: Adding CommandID to heap xlog records)

2023-06-26 Thread Andres Freund
Hi, On 2023-06-26 09:57:56 +0300, Heikki Linnakangas wrote: > diff --git a/src/backend/replication/logical/snapbuild.c > b/src/backend/replication/logical/snapbuild.c > index 0786bb0ab7..e403feeccd 100644 > --- a/src/backend/replication/logical/snapbuild.c > +++ b/src/backend/replication/logical/

Improve comment on cid mapping (was Re: Adding CommandID to heap xlog records)

2023-06-25 Thread Heikki Linnakangas
On 28/02/2023 15:52, Heikki Linnakangas wrote: So unfortunately I don't see much opportunity to simplify logical decoding with this. However, please take a look at the first two patches attached. They're tiny cleanups that make sense on their own. Rebased these small patches. I'll add this to t

Re: Adding CommandID to heap xlog records

2023-02-28 Thread Heikki Linnakangas
I took another stab at this from a different angle, and tried to use this to simplify logical decoding. The theory was that if we included the command ID in the WAL records, we wouldn't need the separate HEAP2_NEW_CID record anymore, and could remove much of the code in reorderbuffer.c that's c

Re: Adding CommandID to heap xlog records

2023-01-31 Thread vignesh C
On Mon, 16 Jan 2023 at 19:56, vignesh C wrote: > > On Thu, 3 Nov 2022 at 15:06, Ian Lawrence Barwick wrote: > > > > 2022年9月30日(金) 1:04 Matthias van de Meent : > > > > > > On Wed, 28 Sept 2022 at 19:40, Bruce Momjian wrote: > > > > > > > > On Thu, Sep 22, 2022 at 11:12:32PM +0200, Matthias van de

Re: Adding CommandID to heap xlog records

2023-01-16 Thread vignesh C
On Thu, 3 Nov 2022 at 15:06, Ian Lawrence Barwick wrote: > > 2022年9月30日(金) 1:04 Matthias van de Meent : > > > > On Wed, 28 Sept 2022 at 19:40, Bruce Momjian wrote: > > > > > > On Thu, Sep 22, 2022 at 11:12:32PM +0200, Matthias van de Meent wrote: > > > > On Thu, 8 Sept 2022 at 23:24, Tom Lane wr

Re: Adding CommandID to heap xlog records

2022-11-03 Thread Ian Lawrence Barwick
2022年9月30日(金) 1:04 Matthias van de Meent : > > On Wed, 28 Sept 2022 at 19:40, Bruce Momjian wrote: > > > > On Thu, Sep 22, 2022 at 11:12:32PM +0200, Matthias van de Meent wrote: > > > On Thu, 8 Sept 2022 at 23:24, Tom Lane wrote: > > > > > > > > Matthias van de Meent writes: > > > > > Please fin

Re: Adding CommandID to heap xlog records

2022-09-29 Thread Matthias van de Meent
On Wed, 28 Sept 2022 at 19:40, Bruce Momjian wrote: > > On Thu, Sep 22, 2022 at 11:12:32PM +0200, Matthias van de Meent wrote: > > On Thu, 8 Sept 2022 at 23:24, Tom Lane wrote: > > > > > > Matthias van de Meent writes: > > > > Please find attached a patch that adds the CommandId of the inserting

Re: Adding CommandID to heap xlog records

2022-09-28 Thread Bruce Momjian
On Thu, Sep 22, 2022 at 11:12:32PM +0200, Matthias van de Meent wrote: > On Thu, 8 Sept 2022 at 23:24, Tom Lane wrote: > > > > Matthias van de Meent writes: > > > Please find attached a patch that adds the CommandId of the inserting > > > transaction to heap (batch)insert, update and delete recor

Re: Adding CommandID to heap xlog records

2022-09-08 Thread Tom Lane
Matthias van de Meent writes: > Please find attached a patch that adds the CommandId of the inserting > transaction to heap (batch)insert, update and delete records. It is > based on the changes we made in the fork we maintain for Neon. This seems like a very significant cost increment with retur

Adding CommandID to heap xlog records

2022-09-08 Thread Matthias van de Meent
Hi, The current WAL records generated by the Heap tableAM do not contain the command ID of the query that inserted/updated/deleted the records. The CID is not included in XLog because it is useful only to visibility checks in an active read/write transaction, which currently only appear in a prima