Skip to content

Commit be14c0b

Browse files
author
Commitfest Bot
committed
[CF 7548] v2 - Fall back to serializing when parallel apply runs out of DSM segments
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/7548 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CA+fm-RNBhpKnPArvZj-Ev8A8wD-vi3dkM1g-YM0KSysKin8Veg@mail.gmail.com Author(s): Baji Shaik
2 parents 2af6dd3 + 335ecf3 commit be14c0b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/backend/replication/logical/applyparallelworker.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ pa_setup_dsm(ParallelApplyWorkerInfo *winfo)
358358
segsize = shm_toc_estimate(&e);
359359

360360
/* Create the shared memory segment and establish a table of contents. */
361-
seg = dsm_create(shm_toc_estimate(&e), 0);
361+
seg = dsm_create(shm_toc_estimate(&e), DSM_CREATE_NULL_IF_MAXSEGMENTS);
362362
if (!seg)
363363
return false;
364364

‎src/backend/utils/mmgr/dsa.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ make_new_segment(dsa_area *area, size_t requested_pages)
22472247
/* Create the segment. */
22482248
oldowner = CurrentResourceOwner;
22492249
CurrentResourceOwner = area->resowner;
2250-
segment = dsm_create(total_size, 0);
2250+
segment = dsm_create(total_size, DSM_CREATE_NULL_IF_MAXSEGMENTS);
22512251
CurrentResourceOwner = oldowner;
22522252
if (segment == NULL)
22532253
return NULL;

0 commit comments

Comments
 (0)