Re: define PG_REPLSLOT_DIR - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: define PG_REPLSLOT_DIR
Date
Msg-id CAExHW5s430yLY6ZqpvBYWLBON5iea+5ruSsJLdkGuuMiq990ig@mail.gmail.com
Whole thread Raw
In response to Re: define PG_REPLSLOT_DIR  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: define PG_REPLSLOT_DIR
List pgsql-hackers
On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> Hi,
>
> On Mon, Aug 19, 2024 at 04:11:31PM +0530, Ashutosh Bapat wrote:
> > On Wed, Aug 14, 2024 at 5:02 PM Bertrand Drouvot
> > <bertranddrouvot.pg@gmail.com> wrote:
> > >
> > > Hi hackers,
> > >
> > > while working on a replication slot tool (idea is to put it in contrib, not
> > > shared yet), I realized that "pg_replslot" is being used > 25 times in
> > > .c files.
> > >
> > > I think it would make sense to replace those occurrences with a $SUBJECT, attached
> > > a patch doing so.
> >
> > Many of these places are slot specific directory/file names within
> > pg_replslot. I think we can further improve the code by creating macro
> > on the lines of LSN_FORMAT_ARGS
> > #define SLOT_DIRNAME_ARGS(slotname) (PG_REPLSLOT_DIR, slotname)
> > this way we "codify" method to construct the slot directory name
> > everywhere.
>
> Thanks for the feedback!
>
> I think that could make sense. As the already proposed mechanical changes are
> error prone (from my point of view), I would suggest to have a look at your
> proposal once the proposed changes go in.

What do you mean by error prone?

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error
Next
From: Amit Kapila
Date:
Subject: Re: Conflict detection and logging in logical replication