Re: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: shiy.fnst@fujitsu.com, pgsql-hackers@lists.postgresql.org
Date: 2023-02-20T15:30:43Z
Lists: pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.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.) regards, tom lane
Commits
-
Don't repeatedly register cache callbacks in pgoutput plugin.
- 05172f1f3749 16.0 landed
- cef1c9c0cf6e 15.3 landed
- 95558bc8ff89 12.15 landed
- 861e9e48601b 13.11 landed
- 44dbc960f671 11.20 landed
- 0f78df719a90 14.8 landed