From: | "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes |
Date: | 2023-02-21 10:31:29 |
Message-ID: | OSZPR01MB631047D0B585B2EEC2A8380EFDA59@OSZPR01MB6310.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 20, 2023 11:31 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> writes:
> > I'm pretty sure that everytime an output plugin is initialized on a
> > process, it installs the same set of syscache/relcache callbacks each
> > time. Do you think we could simply stop duplicate registration of
> > those callbacks by using a static boolean? It would be far simpler.
>
> Yeah, I think that's the way it's done elsewhere. Removing and
> re-registering your callback seems expensive, and it also destroys
> any reasoning that anyone might have made about the order in which
> different callbacks will get called. (Admittedly, that's probably not
> important for invalidation callbacks, but it does matter for e.g.
> process exit callbacks.)
>
Thanks for your reply. I agree that's expensive. Attach a new patch which adds a
static boolean to avoid duplicate registration.
Regards,
Shi Yu
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Avoid-duplicate-registration-of-callbacks-in-pgou.patch | application/octet-stream | 3.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2023-02-21 11:40:57 | Re: ResourceOwner refactoring |
Previous Message | Nazir Bilal Yavuz | 2023-02-21 10:27:25 | Re: meson logs environment |