mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Make all built-in lwlock tranche IDs fixed.
This makes the values more stable, which seems like a good thing for anybody who needs to look at at them. Alexander Korotkov and Amit Kapila
This commit is contained in:
@@ -162,7 +162,7 @@ SimpleLruShmemSize(int nslots, int nlsns)
|
||||
|
||||
void
|
||||
SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
|
||||
LWLock *ctllock, const char *subdir)
|
||||
LWLock *ctllock, const char *subdir, int tranche_id)
|
||||
{
|
||||
SlruShared shared;
|
||||
bool found;
|
||||
@@ -215,7 +215,7 @@ SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
|
||||
|
||||
Assert(strlen(name) + 1 < SLRU_MAX_NAME_LENGTH);
|
||||
strlcpy(shared->lwlock_tranche_name, name, SLRU_MAX_NAME_LENGTH);
|
||||
shared->lwlock_tranche_id = LWLockNewTrancheId();
|
||||
shared->lwlock_tranche_id = tranche_id;
|
||||
shared->lwlock_tranche.name = shared->lwlock_tranche_name;
|
||||
shared->lwlock_tranche.array_base = shared->buffer_locks;
|
||||
shared->lwlock_tranche.array_stride = sizeof(LWLockPadded);
|
||||
|
||||
Reference in New Issue
Block a user