pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix ReinitializeParallelDSM to tolerate finding no error queues.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix ReinitializeParallelDSM to tolerate finding no error queues.
@ 2017-11-28 17:21  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-11-28 17:21 UTC (permalink / raw)
  To: pgsql-committers

Fix ReinitializeParallelDSM to tolerate finding no error queues.

Commit d4663350646ca0c069a36d906155a0f7e3372eb7 changed things so
that shm_toc_lookup would fail with an error rather than silently
returning NULL in the hope that such failures would be reported
in a useful way rather than via a system crash.  However, it
overlooked the fact that the lookup of PARALLEL_KEY_ERROR_QUEUE
in ReinitializeParallelDSM is expected to fail when no DSM segment
was created in the first place; in that case, we end up with a
backend-private memory segment that still contains an entry for
PARALLEL_KEY_FIXED but no others.  Consequently a benign failure
to initialize parallelism can escalate into an elog(ERROR);
repair.

Discussion: http://postgr.es/m/CA+Tgmob8LFw55DzH1QEREpBEA9RJ_W_amhBFCVZ6WMwUhVpOqg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/445dbd82a3192c6f4d15de012333943882020904

Modified Files
--------------
src/backend/access/transam/parallel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



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

* pgsql: Fix ReinitializeParallelDSM to tolerate finding no error queues.
@ 2017-11-28 17:21  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-11-28 17:21 UTC (permalink / raw)
  To: pgsql-committers

Fix ReinitializeParallelDSM to tolerate finding no error queues.

Commit d4663350646ca0c069a36d906155a0f7e3372eb7 changed things so
that shm_toc_lookup would fail with an error rather than silently
returning NULL in the hope that such failures would be reported
in a useful way rather than via a system crash.  However, it
overlooked the fact that the lookup of PARALLEL_KEY_ERROR_QUEUE
in ReinitializeParallelDSM is expected to fail when no DSM segment
was created in the first place; in that case, we end up with a
backend-private memory segment that still contains an entry for
PARALLEL_KEY_FIXED but no others.  Consequently a benign failure
to initialize parallelism can escalate into an elog(ERROR);
repair.

Discussion: http://postgr.es/m/CA+Tgmob8LFw55DzH1QEREpBEA9RJ_W_amhBFCVZ6WMwUhVpOqg@mail.gmail.com

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/access/transam/parallel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



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


end of thread, other threads:[~2017-11-28 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-28 17:21 pgsql: Fix ReinitializeParallelDSM to tolerate finding no error queues. Robert Haas <rhaas@postgresql.org>
2017-11-28 17:21 pgsql: Fix ReinitializeParallelDSM to tolerate finding no error queues. Robert Haas <rhaas@postgresql.org>

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