Re: define PG_REPLSLOT_DIR

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: define PG_REPLSLOT_DIR
Date: 2024-08-30 06:34:56
Message-ID: ZtFoEP4brSeu2V72@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2024-08-30 06:34:57 Re: Conflict Detection and Resolution
Previous Message Nisha Moond 2024-08-30 06:34:51 Re: Conflict Detection and Resolution