Skip to content

Commit d54bb24

Browse files
committed
Move elog(DEBUG4) call outside the locked area, per suggestion from Tom Lane.
1 parent 7e2be4e commit d54bb24

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/backend/storage/ipc/sinvaladt.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.68 2008/03/17 11:50:27 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.69 2008/03/18 12:36:43 alvherre Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -330,12 +330,8 @@ SIInsertDataEntry(SharedInvalidationMessage *data)
330330
* queries, but if a backend is sitting idle then it won't be starting
331331
* transactions and so won't be reading SI entries.
332332
*/
333-
if (numMsgs == (MAXNUMMESSAGES * 70 / 100) &&
334-
IsUnderPostmaster)
335-
{
336-
elog(DEBUG4, "SI table is 70%% full, signaling postmaster");
333+
if (numMsgs == (MAXNUMMESSAGES * 70 / 100) && IsUnderPostmaster)
337334
signal_postmaster = true;
338-
}
339335

340336
/*
341337
* Insert new message into proper slot of circular buffer
@@ -346,7 +342,10 @@ SIInsertDataEntry(SharedInvalidationMessage *data)
346342
LWLockRelease(SInvalLock);
347343

348344
if (signal_postmaster)
345+
{
346+
elog(DEBUG4, "SI table is 70%% full, signaling postmaster");
349347
SendPostmasterSignal(PMSIGNAL_WAKEN_CHILDREN);
348+
}
350349

351350
return true;
352351
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy