Re: define PG_REPLSLOT_DIR - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: define PG_REPLSLOT_DIR
Date
Msg-id 202408201415.pnil2t5ctpcg@alvherre.pgsql
Whole thread Raw
In response to define PG_REPLSLOT_DIR  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
On 2024-Aug-19, Bertrand Drouvot wrote:

> diff --git a/src/include/common/relpath.h b/src/include/common/relpath.h
> index 6f006d5a93..a6cb091635 100644
> --- a/src/include/common/relpath.h
> +++ b/src/include/common/relpath.h
> @@ -33,6 +33,10 @@ typedef Oid RelFileNumber;
>  #define TABLESPACE_VERSION_DIRECTORY    "PG_" PG_MAJORVERSION "_" \
>                                      CppAsString2(CATALOG_VERSION_NO)
>  
> +#define PG_TBLSPC_DIR "pg_tblspc"

This one is missing some commentary along the lines of "This must not be
changed, unless you want to break every tool in the universe".  As is,
it's quite tempting.

> +#define PG_TBLSPC_DIR_SLASH PG_TBLSPC_DIR "/"

I would make this simply "pg_tblspc/", since it's not really possible to
change pg_tblspc anyway.  Also, have a comment explaining why we have
it.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Next
From: Xing Guo
Date:
Subject: Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error