Re: Capture a changelog for the current transaction - Mailing list pgsql-general

From Ron Johnson
Subject Re: Capture a changelog for the current transaction
Date
Msg-id CANzqJaDd_FjwXFXpSx59KpJZbsTtjhjRMXC=NAdfniSHyxp4rQ@mail.gmail.com
Whole thread
In response to Capture a changelog for the current transaction  (Stuart Campbell <stuart.campbell@ridewithvia.com>)
Responses Re: Capture a changelog for the current transaction
List pgsql-general
On Tue, Oct 6, 2026 at 6:39 AM Stuart Campbell <stuart.campbell@ridewithvia.com> wrote:
[snip] 
Would using temporary tables be a feasible solution? That seems to be functionally what I want, but maybe it's hard to write triggers that write to temp tables.

Maybe a persistent log table is OK, and each transaction is responsible for deleting its own rows from it? Sounds like a lot of churn though...

A recent email in https://postgrespro.com/list/thread-id/2812560#77826d7580a9488ca28eb4bcfe94aa37@stmuk.bayern.de mentioned this extension to create "persistent" temporary tables (where each connection doesn't need to CREATE them every time.


Maybe that would be useful.  I've never used them, though, so don't know any gotchas.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-general by date:

Previous
From: Stuart Campbell
Date:
Subject: Capture a changelog for the current transaction
Next
From: Laurenz Albe
Date:
Subject: Re: Capture a changelog for the current transaction