Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit372b970

Browse files
committed
Remove ill-advised pre-check for DSM segment exhaustion.
dsm_control->nitems never decreases, so this is testing whether theserver has *ever* run out of DSM segments, not whether it is*currently* out of DSM segments.Reported off-list by Amit Kapila.
1 parent33a2c5e commit372b970

File tree

1 file changed

+0
-12
lines changed
  • src/backend/storage/ipc

1 file changed

+0
-12
lines changed

‎src/backend/storage/ipc/dsm.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -466,18 +466,6 @@ dsm_create(Size size, int flags)
466466
if (!dsm_init_done)
467467
dsm_backend_startup();
468468

469-
/*
470-
* If we've been instructed to return NULL when it's not possible to
471-
* register another segment, check whether we seem to be at the limit.
472-
* This allows us to avoid the overhead of creating a new segment only to
473-
* immediately destroy it again. Since we don't take the lock here, the
474-
* value we read might be slightly stale, but the remote possibility of
475-
* an unnecessary failure here shouldn't trouble anyone too much.
476-
*/
477-
if ((flags&DSM_CREATE_NULL_IF_MAXSEGMENTS)!=0
478-
&&dsm_control->nitems >=dsm_control->maxitems)
479-
returnNULL;
480-
481469
/* Create a new segment descriptor. */
482470
seg=dsm_create_descriptor();
483471

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp