pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix missing initializations of MyProc.delayChkptEnd 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix missing initializations of MyProc.delayChkptEnd @ 2023-06-11 01:34 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2023-06-11 01:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing initializations of MyProc.delayChkptEnd This commit fixes an oversight introduced in 10520f4, that has added delayChkptEnd to PGPROC to avoid ABI breakages on stable branches, where two spots have missed to initialize this variable (delayChkpt was switched back from int to bool, and it was initialized as 0 so there was no consequences for it): - InitProcess(), where the per-process data structures of a backend are initialized. - InitAuxiliaryProcess(), same but for auxiliary processes. An interruption during relation truncation while this flag is set could cause an assertion failure when a follow-up process does a relation truncation while reusing the same PGPROC entry. A second effect could be incorrect checkpoint end delays. While on it, add an assertion in ProcArrayClearTransaction() for delayChkptEnd to be in line with 5788e25. This is needed only for v14. This issue affects v11~v14, but not v15~, as we use a single field called delayChkptFlags to delay checkpoints there. Author: suyu.cmj (mengjuan.cmj@alibaba-inc.com) Reviewed-by: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/9c3d2a49-db5f-43cb-840b-d58f9a684295.mengjuan.cmj@alibaba-inc.com Backpatch-through: 11 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c6043fcbb23875926f3b674b2e22dfaa9c6cf300 Modified Files -------------- src/backend/storage/ipc/procarray.c | 1 + src/backend/storage/lmgr/proc.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix missing initializations of MyProc.delayChkptEnd @ 2023-06-11 01:34 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2023-06-11 01:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing initializations of MyProc.delayChkptEnd This commit fixes an oversight introduced in 10520f4, that has added delayChkptEnd to PGPROC to avoid ABI breakages on stable branches, where two spots have missed to initialize this variable (delayChkpt was switched back from int to bool, and it was initialized as 0 so there was no consequences for it): - InitProcess(), where the per-process data structures of a backend are initialized. - InitAuxiliaryProcess(), same but for auxiliary processes. An interruption during relation truncation while this flag is set could cause an assertion failure when a follow-up process does a relation truncation while reusing the same PGPROC entry. A second effect could be incorrect checkpoint end delays. While on it, add an assertion in ProcArrayClearTransaction() for delayChkptEnd to be in line with 5788e25. This is needed only for v14. This issue affects v11~v14, but not v15~, as we use a single field called delayChkptFlags to delay checkpoints there. Author: suyu.cmj (mengjuan.cmj@alibaba-inc.com) Reviewed-by: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/9c3d2a49-db5f-43cb-840b-d58f9a684295.mengjuan.cmj@alibaba-inc.com Backpatch-through: 11 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/37236ca0694550a5caac5ca382bea19005833ee3 Modified Files -------------- src/backend/storage/ipc/procarray.c | 1 + src/backend/storage/lmgr/proc.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix missing initializations of MyProc.delayChkptEnd @ 2023-06-11 01:34 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2023-06-11 01:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing initializations of MyProc.delayChkptEnd This commit fixes an oversight introduced in 10520f4, that has added delayChkptEnd to PGPROC to avoid ABI breakages on stable branches, where two spots have missed to initialize this variable (delayChkpt was switched back from int to bool, and it was initialized as 0 so there was no consequences for it): - InitProcess(), where the per-process data structures of a backend are initialized. - InitAuxiliaryProcess(), same but for auxiliary processes. An interruption during relation truncation while this flag is set could cause an assertion failure when a follow-up process does a relation truncation while reusing the same PGPROC entry. A second effect could be incorrect checkpoint end delays. While on it, add an assertion in ProcArrayClearTransaction() for delayChkptEnd to be in line with 5788e25. This is needed only for v14. This issue affects v11~v14, but not v15~, as we use a single field called delayChkptFlags to delay checkpoints there. Author: suyu.cmj (mengjuan.cmj@alibaba-inc.com) Reviewed-by: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/9c3d2a49-db5f-43cb-840b-d58f9a684295.mengjuan.cmj@alibaba-inc.com Backpatch-through: 11 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a9c3472e02c853b5fa577707243c310c2ec72317 Modified Files -------------- src/backend/storage/ipc/procarray.c | 1 + src/backend/storage/lmgr/proc.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix missing initializations of MyProc.delayChkptEnd @ 2023-06-11 01:34 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2023-06-11 01:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing initializations of MyProc.delayChkptEnd This commit fixes an oversight introduced in 10520f4, that has added delayChkptEnd to PGPROC to avoid ABI breakages on stable branches, where two spots have missed to initialize this variable (delayChkpt was switched back from int to bool, and it was initialized as 0 so there was no consequences for it): - InitProcess(), where the per-process data structures of a backend are initialized. - InitAuxiliaryProcess(), same but for auxiliary processes. An interruption during relation truncation while this flag is set could cause an assertion failure when a follow-up process does a relation truncation while reusing the same PGPROC entry. A second effect could be incorrect checkpoint end delays. While on it, add an assertion in ProcArrayClearTransaction() for delayChkptEnd to be in line with 5788e25. This is needed only for v14. This issue affects v11~v14, but not v15~, as we use a single field called delayChkptFlags to delay checkpoints there. Author: suyu.cmj (mengjuan.cmj@alibaba-inc.com) Reviewed-by: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/9c3d2a49-db5f-43cb-840b-d58f9a684295.mengjuan.cmj@alibaba-inc.com Backpatch-through: 11 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9920552e1e4e5b5a203f2444f71202d7d46782f8 Modified Files -------------- src/backend/storage/ipc/procarray.c | 1 + src/backend/storage/lmgr/proc.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-06-11 01:34 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-06-11 01:34 pgsql: Fix missing initializations of MyProc.delayChkptEnd Michael Paquier <michael@paquier.xyz> 2023-06-11 01:34 pgsql: Fix missing initializations of MyProc.delayChkptEnd Michael Paquier <michael@paquier.xyz> 2023-06-11 01:34 pgsql: Fix missing initializations of MyProc.delayChkptEnd Michael Paquier <michael@paquier.xyz> 2023-06-11 01:34 pgsql: Fix missing initializations of MyProc.delayChkptEnd Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox