Re: define PG_REPLSLOT_DIR

2024-09-02 Thread Michael Paquier
On Tue, Sep 03, 2024 at 04:35:28AM +, Bertrand Drouvot wrote: > I understand why pg_xlog and pg_wal both need to be listed here, but I don't > get why the proposed changes were "wrong". Or, are you saying that if for any > reason PG_TBLSPC_DIR needs to be changed that would not work > anymore?

Re: define PG_REPLSLOT_DIR

2024-09-02 Thread Bertrand Drouvot
Hi, On Tue, Sep 03, 2024 at 09:15:50AM +0900, Michael Paquier wrote: > On Fri, Aug 30, 2024 at 12:21:29PM +, Bertrand Drouvot wrote: > > That said, I don't have a strong opinion on this one, I think that also > > makes > > sense to leave it as it is. Please find attached v4 doing so. > > The

Re: define PG_REPLSLOT_DIR

2024-09-02 Thread Michael Paquier
On Fri, Aug 30, 2024 at 12:21:29PM +, Bertrand Drouvot wrote: > That said, I don't have a strong opinion on this one, I think that also makes > sense to leave it as it is. Please find attached v4 doing so. The changes in astreamer_file.c are actually wrong regarding the fact that should_allow_

Re: define PG_REPLSLOT_DIR

2024-08-30 Thread Bertrand Drouvot
Hi, On Fri, Aug 30, 2024 at 03:34:56PM +0900, Michael Paquier wrote: > On Tue, Aug 20, 2024 at 04:23:06PM +, 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

Re: define PG_REPLSLOT_DIR

2024-08-29 Thread Michael Paquier
On Tue, Aug 20, 2024 at 04:23:06PM +, 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]

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Bertrand Drouvot
Hi, On Wed, Aug 21, 2024 at 10:14:20AM +0530, Ashutosh Bapat wrote: > If this isn't in commitfest already, please add it there. > Done in [0]. [0]: https://commitfest.postgresql.org/49/5193/ Thanks! Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon W

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Ashutosh Bapat
If this isn't in commitfest already, please add it there. On Tue, Aug 20, 2024 at 9:58 PM Bertrand Drouvot wrote: > > Hi, > > On Tue, Aug 20, 2024 at 12:06:52PM +, Bertrand Drouvot wrote: > > Hi, > > > > On Tue, Aug 20, 2024 at 05:41:48PM +0900, Michael Paquier wrote: > > > On Tue, Aug 20, 20

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Bertrand Drouvot
Hi, On Tue, Aug 20, 2024 at 12:06:52PM +, Bertrand Drouvot wrote: > Hi, > > On Tue, Aug 20, 2024 at 05:41:48PM +0900, Michael Paquier wrote: > > On Tue, Aug 20, 2024 at 11:10:46AM +0530, Ashutosh Bapat wrote: > > > Since these are all related changes, doing them at once might make it > > > fa

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Bertrand Drouvot
Hi, On Tue, Aug 20, 2024 at 09:30:48PM +0900, Yugo Nagata wrote: > Should be the follwing also rewritten using sizeof(PG_REPLSLOT_DIR)? > >struct stat statbuf; > charpath[MAXPGPATH * 2 + 12]; > > Yeah, done in v3 that I just shared up-thread (also removed the macros from the co

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Bertrand Drouvot
Web Services: https://aws.amazon.com >From 12398b01fccb7437c4fb35282c576c317b9a7578 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Wed, 14 Aug 2024 09:16:21 + Subject: [PATCH v3 1/6] Define PG_REPLSLOT_DIR Replace most of the places where "pg_replslot" is u

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Alvaro Herrera
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_V

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Yugo Nagata
On Tue, 20 Aug 2024 17:47:57 +0900 Michael Paquier wrote: > On Mon, Aug 19, 2024 at 02:11:55PM +, Bertrand Drouvot wrote: > > I made the changes for pg_tblspc in pg_combinebackup.c as the number of > > occurences > > are greater that the "pg_wal" ones and we were to define PG_TBLSPC_DIR in

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Bertrand Drouvot
Hi, On Tue, Aug 20, 2024 at 05:47:57PM +0900, Michael Paquier wrote: > On Mon, Aug 19, 2024 at 02:11:55PM +, Bertrand Drouvot wrote: > > I made the changes for pg_tblspc in pg_combinebackup.c as the number of > > occurences > > are greater that the "pg_wal" ones and we were to define PG_TBLSP

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Bertrand Drouvot
Hi, On Tue, Aug 20, 2024 at 05:41:48PM +0900, Michael Paquier wrote: > On Tue, Aug 20, 2024 at 11:10:46AM +0530, Ashutosh Bapat wrote: > > Since these are all related changes, doing them at once might make it > > faster. You may use multiple commits (one for each change) > > Doing multiple commit

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Michael Paquier
On Mon, Aug 19, 2024 at 02:11:55PM +, Bertrand Drouvot wrote: > I made the changes for pg_tblspc in pg_combinebackup.c as the number of > occurences > are greater that the "pg_wal" ones and we were to define PG_TBLSPC_DIR in any > case. > > Please find attached the related patches. No real o

Re: define PG_REPLSLOT_DIR

2024-08-20 Thread Michael Paquier
On Tue, Aug 20, 2024 at 11:10:46AM +0530, Ashutosh Bapat wrote: > Since these are all related changes, doing them at once might make it > faster. You may use multiple commits (one for each change) Doing multiple commits with individual definitions for each path would be the way to go for me. All

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Ashutosh Bapat
On Tue, Aug 20, 2024 at 10:49 AM Bertrand Drouvot wrote: > > Hi, > > On Tue, Aug 20, 2024 at 09:26:59AM +0530, Ashutosh Bapat wrote: > > On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot > > wrote: > > > > > > Hi, > > > > > > On Mon, Aug 19, 2024 at 04:11:31PM +0530, Ashutosh Bapat wrote: > > > >

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
Hi, On Tue, Aug 20, 2024 at 09:26:59AM +0530, Ashutosh Bapat wrote: > On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot > 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 > > > wrote: > > > > > > > >

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Ashutosh Bapat
On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot 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 > > wrote: > > > > > > Hi hackers, > > > > > > while working on a replication slot tool (idea is to put it in co

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
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 > 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

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
Hi, On Fri, Aug 16, 2024 at 01:31:11PM +0900, Yugo Nagata wrote: > On Wed, 14 Aug 2024 11:32:14 + > Bertrand Drouvot wrote: > > Looking forward to your feedback, > > /* restore all slots by iterating over all on-disk entries */ > - replication_dir = AllocateDir("pg_replslot"); > - wh

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
mber of occurences are greater that the "pg_wal" ones and we were to define PG_TBLSPC_DIR in any case. Please find attached the related patches. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com >From 50579

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Ashutosh Bapat
On Wed, Aug 14, 2024 at 5:02 PM Bertrand Drouvot 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

Re: define PG_REPLSLOT_DIR

2024-08-15 Thread Yugo Nagata
On Wed, 14 Aug 2024 11:32:14 + Bertrand Drouvot 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 occurren

Re: define PG_REPLSLOT_DIR

2024-08-15 Thread Alvaro Herrera
On 2024-Aug-14, Bertrand Drouvot wrote: > Out of curiosity, checking the sizes of affected files (O2, no debug): > > with patch: > >textdata bss dec hex filename > 30304 0 8 303127668 > src/backend/replication/logical/reorderbuffer.o > without patch: >

define PG_REPLSLOT_DIR

2024-08-14 Thread Bertrand Drouvot
rce Databases Amazon Web Services: https://aws.amazon.com >From ab65e1a4a18d624d17841990baa63a56dc1d0747 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Wed, 14 Aug 2024 09:16:21 + Subject: [PATCH v1] Define PG_REPLSLOT_DIR Replace most of the places where "pg_replslot" is u