Re: [PATCH] Small refactoring of inval.c and inval.h
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2023-11-06T07:50:46Z
Lists: pgsql-hackers
On Tue, Jul 25, 2023 at 06:38:46PM +0300, Aleksander Alekseev wrote: > Unless of course we want to change its signature too. I don't think > this is going to be a good API change. extern void InvalidateSystemCaches(void); -extern void InvalidateSystemCachesExtended(bool debug_discard); Indeed, that looks a bit strange, but is there a strong need in removing it, as you are proposing? There is always a risk that this could be called by some out-of-core code. This is one of these things where we could break something just for the sake of breaking it, so there is no real benefit IMO. >> As for the /*--- public functions ---*/ comment, that one was just not >> moved by b89e151054a0, which should have done so; but even at that >> point, it had already been somewhat broken by the addition of >> PrepareInvalidationState() (a static function) in 6cb4afff33ba below it. >> If we really want to clean this up, we could move PrepareInvalidationState() >> to just below RegisterSnapshotInvalidation() and move the "public >> functions" header to just below it (so that it appears just before >> InvalidateSystemCaches). >> >> If we just remove the "public functions" comment, then we're still >> inside a section that starts with the "private support functions" >> comment, which seems even worse to me than the current situation. > > Fixed. This part looks OK to me, so I'll see about applying this part of the patch. -- Michael
Commits
-
Reorder two functions in inval.c
- fa7278e74545 15.16 landed
- ed75434c45c3 16.12 landed
- c2bdd2c5b1d4 17.0 landed