Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZKRu-0001bo-W2 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2020 20:27:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jZKRt-0004vQ-Is for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2020 20:27:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZKRt-0004vF-2d for pgsql-hackers@lists.postgresql.org; Thu, 14 May 2020 20:27:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZKRo-0003yv-PP for pgsql-hackers@lists.postgresql.org; Thu, 14 May 2020 20:27:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 04EKREYD001262; Thu, 14 May 2020 16:27:14 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org cc: Isaac Morland , Alvaro Herrera , Robert Haas Subject: Re: Our naming of wait events is a disaster. In-reply-to: <28683.1589405363@sss.pgh.pa.us> References: <20200512202726.GA31125@alvherre.pgsql> <9871.1589321468@sss.pgh.pa.us> <5598.1589338488@sss.pgh.pa.us> <28683.1589405363@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 13 May 2020 17:29:23 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <1169.1589487890.0@sss.pgh.pa.us> Date: Thu, 14 May 2020 16:27:14 -0400 Message-ID: <1261.1589488034@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1169.1589487890.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable I wrote: > Digging through the existing callers of SimpleLruInit, we have > name control lock subdir > "async" AsyncCtlLock "pg_notify" > "clog" CLogControlLock "pg_xact" > "commit_timestamp" CommitTsControlLock "pg_commit_ts" > "multixact_member" MultiXactMemberControlLock "pg_multixact/me= mbers" > "multixact_offset" MultiXactOffsetControlLock "pg_multixact/of= fsets" > "oldserxid" OldSerXidLock "pg_serial" > "subtrans" SubtransControlLock "pg_subtrans" > After studying that list for awhile, it seems to me that we could > do worse than to name the SLRUs to match their on-disk subdirectories, > which are names that are already user-visible. So I propose these > base names for the SLRUs: > Notify > Xact > CommitTs > MultiXactMember (or MultiXactMembers) > MultiXactOffset (or MultiXactOffsets) > Serial > Subtrans As POC for this, here's a draft patch to rename the "async" SLRU and associated locks. If people are good with this then I'll go through and do similarly for the other SLRUs. A case could be made for doing s/async/notify/ more widely in async.c; for instance it's odd that the struct protected by NotifyQueueLock didn't get renamed to NotifyQueueControl. But that seems a bit out of scope for the immediate problem, and anyway I'm not sure how far to take it. I don't really want to rename async.c's externally-visible functions, for instance. For the moment I just renamed symbols used in the SimpleLruInit() call. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="rename-async-SLRU-to-Notify.patch"; charset="us-ascii" Content-ID: <1169.1589487890.2@sss.pgh.pa.us> Content-Description: rename-async-SLRU-to-Notify.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 87502a4..27e7591 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1754,12 +1754,12 @@ postgres 27093 0.0 0.0 30096 2752 ? S= s 11:34 0:00 postgres: ser Waiting to manage space allocation in shared memory. - AsyncCtlLock - Waiting to read or update shared notification state. + NotifySLRULock + Waiting to read or update state of the Notify SLRU cache. - AsyncQueueLock - Waiting to read or update notification messages. + NotifyQueueLock + Waiting to read or update NOTIFY messages= . AutoFileLock @@ -1941,8 +1941,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss = 11:34 0:00 postgres: ser Waiting to allocate or assign a transaction id. - async - Waiting for I/O on an async (notify) buffer. + NotifyBuffer + Waiting for I/O on a Notify SLRU buffer. buffer_content @@ -4484,7 +4484,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat= _activity WHERE wait_event i Resets statistics to zero for a single SLRU cache, or for all SLR= Us in the cluster. If the argument is NULL, all counters shown in the pg_stat_slru view for all SLRU cache= s are - reset. The argument can be one of async, + reset. The argument can be one of Notify, clog, commit_timestamp, multixact_offset, multixact_member, oldserxid= , or diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 4613bd1..a3ba88d 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -107,7 +107,7 @@ * frontend during startup.) The above design guarantees that notifies f= rom * other backends will never be missed by ignoring self-notifies. * - * The amount of shared memory used for notify management (NUM_ASYNC_BUFF= ERS) + * The amount of shared memory used for notify management (NUM_NOTIFY_BUF= FERS) * can be varied without affecting anything but performance. The maximum * amount of notification data that can be queued at one time is determin= ed * by slru.c's wraparound limit; see QUEUE_MAX_PAGE below. @@ -225,7 +225,7 @@ typedef struct QueuePosition * * Resist the temptation to make this really large. While that would sav= e * work in some places, it would add cost in others. In particular, this - * should likely be less than NUM_ASYNC_BUFFERS, to ensure that backends + * should likely be less than NUM_NOTIFY_BUFFERS, to ensure that backends * catch up before the pages they'll need to read fall out of SLRU cache. */ #define QUEUE_CLEANUP_DELAY 4 @@ -244,7 +244,7 @@ typedef struct QueueBackendStatus /* * Shared memory state for LISTEN/NOTIFY (excluding its SLRU stuff) * - * The AsyncQueueControl structure is protected by the AsyncQueueLock. + * The AsyncQueueControl structure is protected by the NotifyQueueLock. * * When holding the lock in SHARED mode, backends may only inspect their = own * entries as well as the head and tail pointers. Consequently we can all= ow a @@ -254,9 +254,9 @@ typedef struct QueueBackendStatus * When holding the lock in EXCLUSIVE mode, backends can inspect the entr= ies * of other backends and also change the head and tail pointers. * - * AsyncCtlLock is used as the control lock for the pg_notify SLRU buffer= s. + * NotifySLRULock is used as the control lock for the pg_notify SLRU buff= ers. * In order to avoid deadlocks, whenever we need both locks, we always fi= rst - * get AsyncQueueLock and then AsyncCtlLock. + * get NotifyQueueLock and then NotifySLRULock. * * Each backend uses the backend[] array entry with index equal to its * BackendId (which can range from 1 to MaxBackends). We rely on this to= make @@ -292,9 +292,9 @@ static AsyncQueueControl *asyncQueueControl; /* * The SLRU buffer area through which we access the notification queue */ -static SlruCtlData AsyncCtlData; +static SlruCtlData NotifyCtlData; = -#define AsyncCtl (&AsyncCtlData) +#define NotifyCtl (&NotifyCtlData) #define QUEUE_PAGESIZE BLCKSZ #define QUEUE_FULL_WARN_INTERVAL 5000 /* warn at most once every 5s */ = @@ -506,7 +506,7 @@ AsyncShmemSize(void) size =3D mul_size(MaxBackends + 1, sizeof(QueueBackendStatus)); size =3D add_size(size, offsetof(AsyncQueueControl, backend)); = - size =3D add_size(size, SimpleLruShmemSize(NUM_ASYNC_BUFFERS, 0)); + size =3D add_size(size, SimpleLruShmemSize(NUM_NOTIFY_BUFFERS, 0)); = return size; } @@ -552,18 +552,18 @@ AsyncShmemInit(void) /* * Set up SLRU management of the pg_notify data. */ - AsyncCtl->PagePrecedes =3D asyncQueuePagePrecedes; - SimpleLruInit(AsyncCtl, "async", NUM_ASYNC_BUFFERS, 0, - AsyncCtlLock, "pg_notify", LWTRANCHE_ASYNC_BUFFERS); + NotifyCtl->PagePrecedes =3D asyncQueuePagePrecedes; + SimpleLruInit(NotifyCtl, "Notify", NUM_NOTIFY_BUFFERS, 0, + NotifySLRULock, "pg_notify", LWTRANCHE_NOTIFY_BUFFER); /* Override default assumption that writes should be fsync'd */ - AsyncCtl->do_fsync =3D false; + NotifyCtl->do_fsync =3D false; = if (!found) { /* * During start or reboot, clean out the pg_notify directory. */ - (void) SlruScanDirectory(AsyncCtl, SlruScanDirCbDeleteAll, NULL); + (void) SlruScanDirectory(NotifyCtl, SlruScanDirCbDeleteAll, NULL); } } = @@ -918,7 +918,7 @@ PreCommit_Notify(void) * Make sure that we have an XID assigned to the current transaction. * GetCurrentTransactionId is cheap if we already have an XID, but not * so cheap if we don't, and we'd prefer not to do that work while - * holding AsyncQueueLock. + * holding NotifyQueueLock. */ (void) GetCurrentTransactionId(); = @@ -949,7 +949,7 @@ PreCommit_Notify(void) { /* * Add the pending notifications to the queue. We acquire and - * release AsyncQueueLock once per page, which might be overkill + * release NotifyQueueLock once per page, which might be overkill * but it does allow readers to get in while we're doing this. * * A full queue is very uncommon and should really not happen, @@ -959,14 +959,14 @@ PreCommit_Notify(void) * transaction, but we have not yet committed to clog, so at this * point in time we can still roll the transaction back. */ - LWLockAcquire(AsyncQueueLock, LW_EXCLUSIVE); + LWLockAcquire(NotifyQueueLock, LW_EXCLUSIVE); asyncQueueFillWarning(); if (asyncQueueIsFull()) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("too many notifications in the NOTIFY queue"))); nextNotify =3D asyncQueueAddEntries(nextNotify); - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); } } } @@ -1075,7 +1075,7 @@ Exec_ListenPreCommit(void) * We need exclusive lock here so we can look at other backends' entries * and manipulate the list links. */ - LWLockAcquire(AsyncQueueLock, LW_EXCLUSIVE); + LWLockAcquire(NotifyQueueLock, LW_EXCLUSIVE); head =3D QUEUE_HEAD; max =3D QUEUE_TAIL; prevListener =3D InvalidBackendId; @@ -1101,7 +1101,7 @@ Exec_ListenPreCommit(void) QUEUE_NEXT_LISTENER(MyBackendId) =3D QUEUE_FIRST_LISTENER; QUEUE_FIRST_LISTENER =3D MyBackendId; } - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); = /* Now we are listed in the global array, so remember we're listening */ amRegisteredListener =3D true; @@ -1308,7 +1308,7 @@ asyncQueueUnregister(void) /* * Need exclusive lock here to manipulate list links. */ - LWLockAcquire(AsyncQueueLock, LW_EXCLUSIVE); + LWLockAcquire(NotifyQueueLock, LW_EXCLUSIVE); /* Mark our entry as invalid */ QUEUE_BACKEND_PID(MyBackendId) =3D InvalidPid; QUEUE_BACKEND_DBOID(MyBackendId) =3D InvalidOid; @@ -1327,7 +1327,7 @@ asyncQueueUnregister(void) } } QUEUE_NEXT_LISTENER(MyBackendId) =3D InvalidBackendId; - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); = /* mark ourselves as no longer listed in the global array */ amRegisteredListener =3D false; @@ -1336,7 +1336,7 @@ asyncQueueUnregister(void) /* * Test whether there is room to insert more notification messages. * - * Caller must hold at least shared AsyncQueueLock. + * Caller must hold at least shared NotifyQueueLock. */ static bool asyncQueueIsFull(void) @@ -1437,8 +1437,8 @@ asyncQueueNotificationToEntry(Notification *n, Async= QueueEntry *qe) * notification to write and return the first still-unwritten cell back. * Eventually we will return NULL indicating all is done. * - * We are holding AsyncQueueLock already from the caller and grab AsyncCt= lLock - * locally in this function. + * We are holding NotifyQueueLock already from the caller and grab + * NotifySLRULock locally in this function. */ static ListCell * asyncQueueAddEntries(ListCell *nextNotify) @@ -1449,8 +1449,8 @@ asyncQueueAddEntries(ListCell *nextNotify) int offset; int slotno; = - /* We hold both AsyncQueueLock and AsyncCtlLock during this operation */ - LWLockAcquire(AsyncCtlLock, LW_EXCLUSIVE); + /* We hold both NotifyQueueLock and NotifySLRULock during this operation= */ + LWLockAcquire(NotifySLRULock, LW_EXCLUSIVE); = /* * We work with a local copy of QUEUE_HEAD, which we write back to share= d @@ -1475,13 +1475,13 @@ asyncQueueAddEntries(ListCell *nextNotify) */ pageno =3D QUEUE_POS_PAGE(queue_head); if (QUEUE_POS_IS_ZERO(queue_head)) - slotno =3D SimpleLruZeroPage(AsyncCtl, pageno); + slotno =3D SimpleLruZeroPage(NotifyCtl, pageno); else - slotno =3D SimpleLruReadPage(AsyncCtl, pageno, true, + slotno =3D SimpleLruReadPage(NotifyCtl, pageno, true, InvalidTransactionId); = /* Note we mark the page dirty before writing in it */ - AsyncCtl->shared->page_dirty[slotno] =3D true; + NotifyCtl->shared->page_dirty[slotno] =3D true; = while (nextNotify !=3D NULL) { @@ -1512,7 +1512,7 @@ asyncQueueAddEntries(ListCell *nextNotify) } = /* Now copy qe into the shared buffer page */ - memcpy(AsyncCtl->shared->page_buffer[slotno] + offset, + memcpy(NotifyCtl->shared->page_buffer[slotno] + offset, &qe, qe.length); = @@ -1527,7 +1527,7 @@ asyncQueueAddEntries(ListCell *nextNotify) * asyncQueueIsFull() ensured that there is room to create this * page without overrunning the queue. */ - slotno =3D SimpleLruZeroPage(AsyncCtl, QUEUE_POS_PAGE(queue_head)); + slotno =3D SimpleLruZeroPage(NotifyCtl, QUEUE_POS_PAGE(queue_head)); = /* * If the new page address is a multiple of QUEUE_CLEANUP_DELAY, @@ -1545,7 +1545,7 @@ asyncQueueAddEntries(ListCell *nextNotify) /* Success, so update the global QUEUE_HEAD */ QUEUE_HEAD =3D queue_head; = - LWLockRelease(AsyncCtlLock); + LWLockRelease(NotifySLRULock); = return nextNotify; } @@ -1562,9 +1562,9 @@ pg_notification_queue_usage(PG_FUNCTION_ARGS) /* Advance the queue tail so we don't report a too-large result */ asyncQueueAdvanceTail(); = - LWLockAcquire(AsyncQueueLock, LW_SHARED); + LWLockAcquire(NotifyQueueLock, LW_SHARED); usage =3D asyncQueueUsage(); - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); = PG_RETURN_FLOAT8(usage); } @@ -1572,7 +1572,7 @@ pg_notification_queue_usage(PG_FUNCTION_ARGS) /* * Return the fraction of the queue that is currently occupied. * - * The caller must hold AsyncQueueLock in (at least) shared mode. + * The caller must hold NotifyQueueLock in (at least) shared mode. */ static double asyncQueueUsage(void) @@ -1601,7 +1601,7 @@ asyncQueueUsage(void) * This is unlikely given the size of the queue, but possible. * The warnings show up at most once every QUEUE_FULL_WARN_INTERVAL. * - * Caller must hold exclusive AsyncQueueLock. + * Caller must hold exclusive NotifyQueueLock. */ static void asyncQueueFillWarning(void) @@ -1665,7 +1665,7 @@ SignalBackends(void) = /* * Identify backends that we need to signal. We don't want to send - * signals while holding the AsyncQueueLock, so this loop just builds a + * signals while holding the NotifyQueueLock, so this loop just builds a * list of target PIDs. * * XXX in principle these pallocs could fail, which would be bad. Maybe @@ -1676,7 +1676,7 @@ SignalBackends(void) ids =3D (BackendId *) palloc(MaxBackends * sizeof(BackendId)); count =3D 0; = - LWLockAcquire(AsyncQueueLock, LW_EXCLUSIVE); + LWLockAcquire(NotifyQueueLock, LW_EXCLUSIVE); for (BackendId i =3D QUEUE_FIRST_LISTENER; i > 0; i =3D QUEUE_NEXT_LISTE= NER(i)) { int32 pid =3D QUEUE_BACKEND_PID(i); @@ -1710,7 +1710,7 @@ SignalBackends(void) ids[count] =3D i; count++; } - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); = /* Now send signals */ for (int i =3D 0; i < count; i++) @@ -1720,7 +1720,7 @@ SignalBackends(void) /* * Note: assuming things aren't broken, a signal failure here could * only occur if the target backend exited since we released - * AsyncQueueLock; which is unlikely but certainly possible. So we + * NotifyQueueLock; which is unlikely but certainly possible. So we * just log a low-level debug message if it happens. */ if (SendProcSignal(pid, PROCSIG_NOTIFY_INTERRUPT, ids[i]) < 0) @@ -1930,12 +1930,12 @@ asyncQueueReadAllNotifications(void) } page_buffer; = /* Fetch current state */ - LWLockAcquire(AsyncQueueLock, LW_SHARED); + LWLockAcquire(NotifyQueueLock, LW_SHARED); /* Assert checks that we have a valid state entry */ Assert(MyProcPid =3D=3D QUEUE_BACKEND_PID(MyBackendId)); pos =3D oldpos =3D QUEUE_BACKEND_POS(MyBackendId); head =3D QUEUE_HEAD; - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); = if (QUEUE_POS_EQUAL(pos, head)) { @@ -1990,7 +1990,7 @@ asyncQueueReadAllNotifications(void) * that happens it is critical that we not try to send the same message * over and over again. Therefore, we place a PG_TRY block here that wi= ll * forcibly advance our queue position before we lose control to an erro= r. - * (We could alternatively retake AsyncQueueLock and move the position + * (We could alternatively retake NotifyQueueLock and move the position * before handling each individual message, but that seems like too much * lock traffic.) */ @@ -2007,11 +2007,11 @@ asyncQueueReadAllNotifications(void) = /* * We copy the data from SLRU into a local buffer, so as to avoid - * holding the AsyncCtlLock while we are examining the entries and - * possibly transmitting them to our frontend. Copy only the part - * of the page we will actually inspect. + * holding the NotifySLRULock while we are examining the entries + * and possibly transmitting them to our frontend. Copy only the + * part of the page we will actually inspect. */ - slotno =3D SimpleLruReadPage_ReadOnly(AsyncCtl, curpage, + slotno =3D SimpleLruReadPage_ReadOnly(NotifyCtl, curpage, InvalidTransactionId); if (curpage =3D=3D QUEUE_POS_PAGE(head)) { @@ -2026,10 +2026,10 @@ asyncQueueReadAllNotifications(void) copysize =3D QUEUE_PAGESIZE - curoffset; } memcpy(page_buffer.buf + curoffset, - AsyncCtl->shared->page_buffer[slotno] + curoffset, + NotifyCtl->shared->page_buffer[slotno] + curoffset, copysize); /* Release lock that we got from SimpleLruReadPage_ReadOnly() */ - LWLockRelease(AsyncCtlLock); + LWLockRelease(NotifySLRULock); = /* * Process messages up to the stop position, end of page, or an @@ -2040,7 +2040,7 @@ asyncQueueReadAllNotifications(void) * But if it has, we will receive (or have already received and * queued) another signal and come here again. * - * We are not holding AsyncQueueLock here! The queue can only + * We are not holding NotifyQueueLock here! The queue can only * extend beyond the head pointer (see above) and we leave our * backend's pointer where it is so nobody will truncate or * rewrite pages under us. Especially we don't want to hold a lock @@ -2054,9 +2054,9 @@ asyncQueueReadAllNotifications(void) PG_FINALLY(); { /* Update shared state */ - LWLockAcquire(AsyncQueueLock, LW_SHARED); + LWLockAcquire(NotifyQueueLock, LW_SHARED); QUEUE_BACKEND_POS(MyBackendId) =3D pos; - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); } PG_END_TRY(); = @@ -2070,7 +2070,7 @@ asyncQueueReadAllNotifications(void) * * The current page must have been fetched into page_buffer from shared * memory. (We could access the page right in shared memory, but that - * would imply holding the AsyncCtlLock throughout this routine.) + * would imply holding the NotifySLRULock throughout this routine.) * * We stop if we reach the "stop" position, or reach a notification from = an * uncommitted transaction, or reach the end of the page. @@ -2177,7 +2177,7 @@ asyncQueueAdvanceTail(void) int newtailpage; int boundary; = - LWLockAcquire(AsyncQueueLock, LW_EXCLUSIVE); + LWLockAcquire(NotifyQueueLock, LW_EXCLUSIVE); min =3D QUEUE_HEAD; for (BackendId i =3D QUEUE_FIRST_LISTENER; i > 0; i =3D QUEUE_NEXT_LISTE= NER(i)) { @@ -2186,7 +2186,7 @@ asyncQueueAdvanceTail(void) } oldtailpage =3D QUEUE_POS_PAGE(QUEUE_TAIL); QUEUE_TAIL =3D min; - LWLockRelease(AsyncQueueLock); + LWLockRelease(NotifyQueueLock); = /* * We can truncate something if the global tail advanced across an SLRU @@ -2200,10 +2200,10 @@ asyncQueueAdvanceTail(void) if (asyncQueuePagePrecedes(oldtailpage, boundary)) { /* - * SimpleLruTruncate() will ask for AsyncCtlLock but will also release - * the lock again. + * SimpleLruTruncate() will ask for NotifySLRULock but will also + * release the lock again. */ - SimpleLruTruncate(AsyncCtl, newtailpage); + SimpleLruTruncate(NotifyCtl, newtailpage); } } = diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgst= at.c index e246be3..e5437dd 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -147,7 +147,7 @@ PgStat_MsgBgWriter BgWriterStats; * all SLRUs without an explicit entry (e.g. SLRUs in extensions). */ static const char *const slru_names[] =3D { - "async", + "Notify", "clog", "commit_timestamp", "multixact_offset", diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/= lwlock.c index 61bec10..c2afae3 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -134,8 +134,8 @@ static const char *const BuiltinTrancheNames[] =3D { "multixact_offset", /* LWTRANCHE_MXACTMEMBER_BUFFERS: */ "multixact_member", - /* LWTRANCHE_ASYNC_BUFFERS: */ - "async", + /* LWTRANCHE_NOTIFY_BUFFER: */ + "NotifyBuffer", /* LWTRANCHE_OLDSERXID_BUFFERS: */ "oldserxid", /* LWTRANCHE_WAL_INSERT: */ diff --git a/src/backend/storage/lmgr/lwlocknames.txt b/src/backend/storag= e/lmgr/lwlocknames.txt index db47843..b0fe6a3 100644 --- a/src/backend/storage/lmgr/lwlocknames.txt +++ b/src/backend/storage/lmgr/lwlocknames.txt @@ -30,8 +30,8 @@ AutovacuumLock 22 AutovacuumScheduleLock 23 SyncScanLock 24 RelationMappingLock 25 -AsyncCtlLock 26 -AsyncQueueLock 27 +NotifySLRULock 26 +NotifyQueueLock 27 SerializableXactHashLock 28 SerializableFinishedListLock 29 SerializablePredicateLockListLock 30 diff --git a/src/include/commands/async.h b/src/include/commands/async.h index d8814e9..4c35394 100644 --- a/src/include/commands/async.h +++ b/src/include/commands/async.h @@ -18,7 +18,7 @@ /* * The number of SLRU page buffers we use for the notification queue. */ -#define NUM_ASYNC_BUFFERS 8 +#define NUM_NOTIFY_BUFFERS 8 = extern bool Trace_notify; extern volatile sig_atomic_t notifyInterruptPending; diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index 8fda8e4..4e577b2 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -200,7 +200,7 @@ typedef enum BuiltinTrancheIds LWTRANCHE_SUBTRANS_BUFFERS, LWTRANCHE_MXACTOFFSET_BUFFERS, LWTRANCHE_MXACTMEMBER_BUFFERS, - LWTRANCHE_ASYNC_BUFFERS, + LWTRANCHE_NOTIFY_BUFFER, LWTRANCHE_OLDSERXID_BUFFERS, LWTRANCHE_WAL_INSERT, LWTRANCHE_BUFFER_CONTENT, ------- =_aaaaaaaaaa0--