Re: Replace pg_controldata output fields with macros for better code manageability

2022-02-03 Thread Peter Eisentraut
On 29.01.22 15:30, Bharath Rupireddy wrote: While working on another pg_control patch, I observed that the pg_controldata output fields such as "Latest checkpoint's TimeLineID:", "Latest checkpoint's NextOID:'' and so on, are being used in pg_resetwal.c, pg_controldata.c and

Re: Replace pg_controldata output fields with macros for better code manageability

2022-02-03 Thread Bharath Rupireddy
On Thu, Feb 3, 2022 at 11:34 AM Kyotaro Horiguchi wrote: > > > #define PG_CONTROL_FIELD_CHECKPOINT_OLDESTXID "Latest checkpoint's > > > oldestXID:" > > > #define PG_CONTROL_FIELD_CHECKPOINT_OLDESTXID_DB "Latest checkpoint's > > > oldestXID's DB:" > > > and so on. > > > > That seems like a very

Re: Replace pg_controldata output fields with macros for better code manageability

2022-02-02 Thread Kyotaro Horiguchi
At Wed, 2 Feb 2022 18:02:39 -0500, Bruce Momjian wrote in > On Sat, Jan 29, 2022 at 08:00:53PM +0530, Bharath Rupireddy wrote: > > Hi, > > > > While working on another pg_control patch, I observed that the > > pg_controldata output fields such as "Latest checkpoint's > > TimeLineID:", "Latest

Re: Replace pg_controldata output fields with macros for better code manageability

2022-02-02 Thread Bruce Momjian
On Sat, Jan 29, 2022 at 08:00:53PM +0530, Bharath Rupireddy wrote: > Hi, > > While working on another pg_control patch, I observed that the > pg_controldata output fields such as "Latest checkpoint's > TimeLineID:", "Latest checkpoint's NextOID:'' and so on, are being > used in pg_resetwal.c,

Replace pg_controldata output fields with macros for better code manageability

2022-01-29 Thread Bharath Rupireddy
Hi, While working on another pg_control patch, I observed that the pg_controldata output fields such as "Latest checkpoint's TimeLineID:", "Latest checkpoint's NextOID:'' and so on, are being used in pg_resetwal.c, pg_controldata.c and pg_upgrade/controldata.c. Direct usage of these fields in