| From: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
|---|---|
| To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Subject: | Re: pgoutput: schema cache cleanup after streamed 2PC |
| Date: | 2026-09-17 12:20:32 |
| Message-ID: | CAJTYsWXt08nX0=PV_bHxcPsPkoaBxitWrM+oo7gDZ6eUgjKOcw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Thu, 17 Sept 2026 at 17:05, Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)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 | Content-Type | Size |
|---|---|---|
| v2-0001-Clean-up-pgoutput-schema-cache-when-streamed-transactions-prepare.patch | application/octet-stream | 3.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Sabino Mullane | 2026-09-17 12:35:01 | Re: [PATCH] Use Boyer-Moore-Horspool for simple LIKE contains patterns |
| Previous Message | Robert Haas | 2026-09-17 12:12:59 | issues with eager aggregation |