Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-27 Thread Peter Eisentraut
On 26.04.24 22:51, Tom Lane wrote: Robert Haas writes: On Wed, Apr 24, 2024 at 8:04 PM Michael Paquier wrote: Not sure that I would bother with a second one. But, well, why not if people want to rename it, as long as you keep compatibility. I vote for just standardizing on

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-26 Thread Tom Lane
Robert Haas writes: > On Wed, Apr 24, 2024 at 8:04 PM Michael Paquier wrote: >> Not sure that I would bother with a second one. But, well, why not if >> people want to rename it, as long as you keep compatibility. > I vote for just standardizing on XLOG_CONTROL_FILE. That name seems >

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-26 Thread Robert Haas
On Wed, Apr 24, 2024 at 8:04 PM Michael Paquier wrote: > On Wed, Apr 24, 2024 at 12:32:46PM +0300, Anton A. Melnikov wrote: > > To ensure backward compatibility we can save the old macro like this: > > > > #define XLOG_CONTROL_FILE "global/pg_control" > > #define PG_CONTROL_FILE

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Michael Paquier
On Wed, Apr 24, 2024 at 12:32:46PM +0300, Anton A. Melnikov wrote: > To ensure backward compatibility we can save the old macro like this: > > #define XLOG_CONTROL_FILE "global/pg_control" > #define PG_CONTROL_FILE XLOG_CONTROL_FILE > > With the best wishes, Not sure that I

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Anton A. Melnikov
On 24.04.2024 12:19, Daniel Gustafsson wrote: On 24 Apr 2024, at 11:13, Anton A. Melnikov wrote: On 24.04.2024 12:02, Peter Eisentraut wrote: On 19.04.24 05:50, Anton A. Melnikov wrote: May be better use this macro everywhere in C code? I don't know. I don't find XLOG_CONTROL_FILE to be a

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Daniel Gustafsson
> On 24 Apr 2024, at 11:13, Anton A. Melnikov wrote: > > On 24.04.2024 12:02, Peter Eisentraut wrote: >> On 19.04.24 05:50, Anton A. Melnikov wrote: >>> >>> May be better use this macro everywhere in C code? >> I don't know. I don't find XLOG_CONTROL_FILE to be a very intuitive proxy >> for

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Anton A. Melnikov
On 24.04.2024 12:02, Peter Eisentraut wrote: On 19.04.24 05:50, Anton A. Melnikov wrote: May be better use this macro everywhere in C code? I don't know.  I don't find XLOG_CONTROL_FILE to be a very intuitive proxy for "pg_control". Then maybe replace XLOG_CONTROL_FILE with

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Peter Eisentraut
On 19.04.24 05:50, Anton A. Melnikov wrote: There is a macro XLOG_CONTROL_FILE for control file name defined in access/xlog_internal.h And there are some places in code where this macro is used like here

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-20 Thread Anton A. Melnikov
On 20.04.2024 09:36, Daniel Gustafsson wrote: Anton: please register this patch in the Open commitfest to ensure it's not forgotten about. Done. Daniel and Michael thank you! -- Anton A. Melnikov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-20 Thread Daniel Gustafsson
> On 20 Apr 2024, at 01:23, Michael Paquier wrote: > > On Fri, Apr 19, 2024 at 10:12:14AM +0200, Daniel Gustafsson wrote: >> Off the cuff that seems to make sense, it does make it easier to grep for >> uses >> of the control file. > > +1 for switching to the macro where we can. Still, I don't

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-19 Thread Michael Paquier
On Fri, Apr 19, 2024 at 10:12:14AM +0200, Daniel Gustafsson wrote: > Off the cuff that seems to make sense, it does make it easier to grep for uses > of the control file. +1 for switching to the macro where we can. Still, I don't see a point in rushing and would just switch that once v18 opens

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-19 Thread Daniel Gustafsson
> On 19 Apr 2024, at 05:50, Anton A. Melnikov wrote: > May be better use this macro everywhere in C code? Off the cuff that seems to make sense, it does make it easier to grep for uses of the control file. -- Daniel Gustafsson

Use XLOG_CONTROL_FILE macro everywhere?

2024-04-18 Thread Anton A. Melnikov
2:44 +0300 Subject: [PATCH] Use XLOG_CONTROL_FILE macro everywhere in C code --- src/backend/backup/basebackup.c | 2 +- src/backend/postmaster/postmaster.c | 3 ++- src/bin/pg_combinebackup/pg_combinebackup.c | 5 +++-- src/bin/pg_controldata/pg_controldata.c | 2 +