Re: Capture a changelog for the current transaction

From: Stuart Campbell <stuart(dot)campbell(at)ridewithvia(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Capture a changelog for the current transaction
Date: 2026-10-07 00:02:49
Message-ID: CAAZ6SnwLDyqAtGKqUAPuZoruuReOPeemCCvrTQYfGqJ4BSYTDA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 7, 2026 at 12:09 AM Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:

> On Tue, Oct 6, 2026 at 6:39 AM Stuart Campbell <
> stuart(dot)campbell(at)ridewithvia(dot)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(at)stmuk(dot)bayern(dot)de
> mentioned this extension to create "persistent" temporary tables (where
> each connection doesn't need to CREATE them every time.
>
> https://github.com/darold/pgtt
>
> Maybe that would be useful. I've never used them, though, so don't know
> any gotchas.
>

Thanks for the suggestion. That seems semantically close to what I'm
looking for. In my case we're working with Amazon RDS, so I don't think ad
hoc extensions are permitted.

--
This communication and any attachments may contain confidential information
and are intended to be viewed only by the intended recipients. If you have
received this message in error, please notify the sender immediately by
replying to the original message and then delete all copies of the email
from your systems.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Campbell 2026-10-07 00:06:14 Re: Capture a changelog for the current transaction
Previous Message Stuart Campbell 2026-10-06 23:56:06 Re: Capture a changelog for the current transaction