Re: pgoutput: schema cache cleanup after streamed 2PC - Mailing list pgsql-hackers

From Ayush Tiwari
Subject Re: pgoutput: schema cache cleanup after streamed 2PC
Date
Msg-id CAJTYsWXt08nX0=PV_bHxcPsPkoaBxitWrM+oo7gDZ6eUgjKOcw@mail.gmail.com
Whole thread
In response to RE: pgoutput: schema cache cleanup after streamed 2PC  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: pgoutput: schema cache cleanup after streamed 2PC
List pgsql-hackers
Hi,

On Thu, 17 Sept 2026 at 17:05, Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
>
> Hi Ayush,
>
> > The attached patch adds the same cleanup to those two callbacks, guarded
> > by rbtxn_is_streamed(txn). Is there a reason to keep these entries once
> > the prepared transaction has finished?
>
> Sorry if it's a stupid question. Why can't we put in pgoutput_stream_prepare_txn()?
> It may be able to avoid checking by rbtxn_is_streamed(txn).

Thanks for checking this,  Kuroda-san!

You are right,  it makes sense to put it in pgoutput_stream_prepare_txn().

I've moved cleanup_rel_sync_cache(txn->xid, true) to
pgoutput_stream_prepare_txn() in v2 and updated the comments. That also
removes the extra checks, as you suggested.

Regards,
Ayush

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: issues with eager aggregation
Next
From: Greg Sabino Mullane
Date:
Subject: Re: [PATCH] Use Boyer-Moore-Horspool for simple LIKE contains patterns