mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Replace the XLogInsert slots with regular LWLocks.
The special feature the XLogInsert slots had over regular LWLocks is the insertingAt value that was updated atomically with releasing backends waiting on it. Add new functions to the LWLock API to do that, and replace the slots with LWLocks. This reduces the amount of duplicated code. (There's still some duplication, but at least it's all in lwlock.c now.) Reviewed by Andres Freund.
This commit is contained in:
@ -2120,12 +2120,12 @@ static struct config_int ConfigureNamesInt[] =
|
||||
},
|
||||
|
||||
{
|
||||
{"xloginsert_slots", PGC_POSTMASTER, WAL_SETTINGS,
|
||||
gettext_noop("Sets the number of slots for concurrent xlog insertions."),
|
||||
{"xloginsert_locks", PGC_POSTMASTER, WAL_SETTINGS,
|
||||
gettext_noop("Sets the number of locks used for concurrent xlog insertions."),
|
||||
NULL,
|
||||
GUC_NOT_IN_SAMPLE
|
||||
},
|
||||
&num_xloginsert_slots,
|
||||
&num_xloginsert_locks,
|
||||
8, 1, 1000,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
Reference in New Issue
Block a user