pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Improve fix for not entering parallel mode when holding interrup
7+ messages / 1 participants
[nested] [flat]

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b8df690492568d7852b799b4eff3274fbbd91e78

Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c   |  9 +++++++--
src/backend/optimizer/plan/planner.c  |  6 ------
3 files changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/989ccd26c838f9393b45e547f22b64e469d1dc04

Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c   |  9 +++++++--
src/backend/optimizer/plan/planner.c  |  6 ------
3 files changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bcbdb176e1e2d62d8e39bebdfc8130bded67ef36

Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c   |  9 +++++++--
src/backend/optimizer/plan/planner.c  |  6 ------
3 files changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/62685876f7b52030a5e17e4f8e54b038b2a082f2

Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c   |  9 +++++++--
src/backend/optimizer/plan/planner.c  |  6 ------
3 files changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/06424e9a24f04234cff0ed4d333415895e99faeb

Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c   |  9 +++++++--
src/backend/optimizer/plan/planner.c  |  6 ------
3 files changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6e39ca6e7edb97e12274607e285b6a4262b94af9

Modified Files
--------------
src/backend/access/transam/parallel.c | 9 +++++++++
src/backend/executor/nodeHashjoin.c   | 9 +++++++--
src/backend/optimizer/plan/planner.c  | 6 ------
3 files changed, 16 insertions(+), 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Improve fix for not entering parallel mode when holding interrup
@ 2024-11-08 18:42  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2024-11-08 18:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve fix for not entering parallel mode when holding interrupts.

Commit ac04aa84a put the shutoff for this into the planner, which is
not ideal because it doesn't prevent us from re-using a previously
made parallel plan.  Revert the planner change and instead put the
shutoff into InitializeParallelDSM, modeling it on the existing code
there for recovering from failure to allocate a DSM segment.

However, that code path is mostly untested, and testing a bit harder
showed there's at least one bug: ExecHashJoinReInitializeDSM is not
prepared for us to have skipped doing parallel DSM setup.  I also
thought the Assert in ReinitializeParallelWorkers is pretty
ill-advised, and replaced it with a silent Min() operation.

The existing test case added by ac04aa84a serves fine to test this
version of the fix, so no change needed there.

Patch by me, but thanks to Noah Misch for the core idea that we
could shut off worker creation when !INTERRUPTS_CAN_BE_PROCESSED.
Back-patch to v12, as ac04aa84a was.

Discussion: https://postgr.es/m/CAC-SaSzHUKT=vZJ8MPxYdC_URPfax+yoA1hKTcF4ROz_Q6z0_Q@mail.gmail.com

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/943b65358e880222a66eeb13b40ad2ef8c172c6a

Modified Files
--------------
src/backend/access/transam/parallel.c | 19 ++++++++++++++++---
src/backend/executor/nodeHashjoin.c   |  9 +++++++--
src/backend/optimizer/plan/planner.c  |  6 ------
3 files changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2024-11-08 18:42 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>
2024-11-08 18:42 pgsql: Improve fix for not entering parallel mode when holding interrup Tom Lane <tgl@sss.pgh.pa.us>

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