Re: define PG_REPLSLOT_DIR
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, pgsql-hackers@lists.postgresql.org
Date: 2024-08-30T06:34:56Z
Lists: pgsql-hackers
On Tue, Aug 20, 2024 at 04:23:06PM +0000, Bertrand Drouvot wrote: > Please find attached v3 that: > > - takes care of your comments (and also removed the use of PG_TBLSPC_DIR in > RELATIVE_PG_TBLSPC_DIR). > - removes the new macros from the comments (see Michael's and Yugo-San's > comments in [0] resp. [1]). > - adds a missing sizeof() (see [1]). > - implements Ashutosh's idea of adding a new SLOT_DIRNAME_ARGS (see [2]). It's > done in 0002 (I used REPLSLOT_DIR_ARGS though). > - fixed a macro usage in ReorderBufferCleanupSerializedTXNs() (was not at the > right location, discovered while implementing 0002). I was looking at that, and applied 0001 for pg_replslot and merged 0003~0005 together for pg_logical. For the first one, at the end I have updated the comments in genfile.c. For the second one, it looked a bit strange to ignore "pg_logical/", which is the base for all the others, so I have added a variable for it. Locating them in reorderbuffer.h with the GUCs was OK, but perhaps there was an argument for logical.h. The paths in origin.c refer to files, not directories. Not sure that 0002 is an improvement overall, so I have left this part out. In 0006, I am not sure that RELATIVE_PG_TBLSPC_DIR is really something we should have. Sure, that's a special case for base backups when sending a directory, but we have also pg_wal/ and its XLOGDIR so that's inconsistent. Perhaps this part should be left as-is. -- Michael
Commits
-
Define PG_TBLSPC_DIR for path pg_tblspc/ in data folder
- c7cd2d6ed082 18.0 landed
-
Define PG_LOGICAL_DIR for path pg_logical/ in data folder
- c39afc38cfec 18.0 landed
-
Define PG_REPLSLOT_DIR for path pg_replslot/ in data folder
- 2065ddf5e34c 18.0 landed