1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Define PG_REPLSLOT_DIR for path pg_replslot/ in data folder

This commit replaces most of the hardcoded values of "pg_replslot" by a
new PG_REPLSLOT_DIR #define.  This makes the style more consistent with
the existing PG_STAT_TMP_DIR, for example.  More places will follow a
similar change.

Author: Bertrand Drouvot
Reviewed-by: Ashutosh Bapat, Yugo Nagata, Michael Paquier
Discussion: https://postgr.es/m/ZryVvjqS9SnV1GPP@ip-10-97-1-34.eu-west-3.compute.internal
This commit is contained in:
Michael Paquier
2024-08-30 10:42:21 +09:00
parent a83a944e9f
commit 2065ddf5e3
6 changed files with 41 additions and 35 deletions

View File

@ -708,7 +708,7 @@ pg_ls_logicalmapdir(PG_FUNCTION_ARGS)
}
/*
* Function to return the list of files in the pg_replslot/<replication_slot>
* Function to return the list of files in the PG_REPLSLOT_DIR/<slot_name>
* directory.
*/
Datum
@ -728,6 +728,7 @@ pg_ls_replslotdir(PG_FUNCTION_ARGS)
errmsg("replication slot \"%s\" does not exist",
slotname)));
snprintf(path, sizeof(path), "pg_replslot/%s", slotname);
snprintf(path, sizeof(path), "%s/%s", PG_REPLSLOT_DIR, slotname);
return pg_ls_dir_files(fcinfo, path, false);
}