Thread
Commits
-
Fix incorrect field count in pg_control_checkpoint()
- 86d9888d2ead 15.0 landed
-
Fix pg_control_checkpoint from commit 4b0d28de06
- 2ede45c3a49e 11.0 cited
-
Remove secondary checkpoint
- 4b0d28de06b2 11.0 cited
-
correct the sizes of values and nulls arrays in pg_control_checkpoint
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> — 2021-12-23T11:39:28Z
Hi, pg_control_checkpoint emits 18 columns whereas the values and nulls arrays are defined to be of size 19. Although it's not critical, attaching a tiny patch to fix this. diff --git a/src/backend/utils/misc/pg_controldata.c b/src/backend/utils/misc/pg_controldata.c index 209a20a882..b1db9a8d07 100644 --- a/src/backend/utils/misc/pg_controldata.c +++ b/src/backend/utils/misc/pg_controldata.c @@ -79,8 +79,8 @@ pg_control_system(PG_FUNCTION_ARGS) Datum pg_control_checkpoint(PG_FUNCTION_ARGS) { - Datum values[19]; - bool nulls[19]; + Datum values[18]; + bool nulls[18]; TupleDesc tupdesc; HeapTuple htup; ControlFileData *ControlFile; Regards, Bharath Rupireddy. -
Re: correct the sizes of values and nulls arrays in pg_control_checkpoint
Euler Taveira <euler@eulerto.com> — 2021-12-23T15:43:02Z
On Thu, Dec 23, 2021, at 8:39 AM, Bharath Rupireddy wrote: > pg_control_checkpoint emits 18 columns whereas the values and nulls > arrays are defined to be of size 19. Although it's not critical, > attaching a tiny patch to fix this. Good catch! I'm wondering if a constant wouldn't be useful for such case. -- Euler Taveira EDB https://www.enterprisedb.com/
-
Re: correct the sizes of values and nulls arrays in pg_control_checkpoint
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> — 2021-12-23T15:46:02Z
On Thu, Dec 23, 2021 at 9:13 PM Euler Taveira <euler@eulerto.com> wrote: > > On Thu, Dec 23, 2021, at 8:39 AM, Bharath Rupireddy wrote: > > pg_control_checkpoint emits 18 columns whereas the values and nulls > arrays are defined to be of size 19. Although it's not critical, > attaching a tiny patch to fix this. > > Good catch! I'm wondering if a constant wouldn't be useful for such case. Thanks. I thought of having a macro, but it creates a lot of diff with the previous versions as we have to change for other pg_control_XXX functions. Regards, Bharath Rupireddy.
-
Re: correct the sizes of values and nulls arrays in pg_control_checkpoint
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> — 2021-12-24T12:33:54Z
On Thu, Dec 23, 2021 at 9:16 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > On Thu, Dec 23, 2021 at 9:13 PM Euler Taveira <euler@eulerto.com> wrote: > > > > On Thu, Dec 23, 2021, at 8:39 AM, Bharath Rupireddy wrote: > > > > pg_control_checkpoint emits 18 columns whereas the values and nulls > > arrays are defined to be of size 19. Although it's not critical, > > attaching a tiny patch to fix this. > > > > Good catch! I'm wondering if a constant wouldn't be useful for such case. > > Thanks. I thought of having a macro, but it creates a lot of diff with > the previous versions as we have to change for other pg_control_XXX > functions. I've added a CF entry to not lose track - https://commitfest.postgresql.org/36/3475/ Regards, Bharath Rupireddy.
-
Re: correct the sizes of values and nulls arrays in pg_control_checkpoint
Justin Pryzby <pryzby@telsasoft.com> — 2021-12-26T00:20:00Z
On Thu, Dec 23, 2021 at 05:09:28PM +0530, Bharath Rupireddy wrote: > Hi, > > pg_control_checkpoint emits 18 columns whereas the values and nulls > arrays are defined to be of size 19. Although it's not critical, > attaching a tiny patch to fix this. LGTM It's helpful to check the history to find where the error was introduced: 4b0d28de06b28e57c540fca458e4853854fbeaf8 2ede45c3a49e484edfa143850d55eb32dba296de > diff --git a/src/backend/utils/misc/pg_controldata.c > b/src/backend/utils/misc/pg_controldata.c > index 209a20a882..b1db9a8d07 100644 > --- a/src/backend/utils/misc/pg_controldata.c > +++ b/src/backend/utils/misc/pg_controldata.c > @@ -79,8 +79,8 @@ pg_control_system(PG_FUNCTION_ARGS) > Datum > pg_control_checkpoint(PG_FUNCTION_ARGS) > { > - Datum values[19]; > - bool nulls[19]; > + Datum values[18]; > + bool nulls[18]; > TupleDesc tupdesc; > HeapTuple htup; > ControlFileData *ControlFile; -
Re: correct the sizes of values and nulls arrays in pg_control_checkpoint
Michael Paquier <michael@paquier.xyz> — 2021-12-26T08:42:55Z
On Thu, Dec 23, 2021 at 09:16:02PM +0530, Bharath Rupireddy wrote: > Thanks. I thought of having a macro, but it creates a lot of diff with > the previous versions as we have to change for other pg_control_XXX > functions. Yeah, I was wondering about that, but that's not worth the potential conflict noise with the back-branches. Hence, fixed as suggested first upthread. Thanks! -- Michael