Commit 63461a63 authored by Robert Haas's avatar Robert Haas

Make builtin lwlock tranche names consistent.

Previously, we had a mix of styles.

Amit Kapila
parent caefc11e
...@@ -4675,7 +4675,7 @@ XLOGShmemInit(void) ...@@ -4675,7 +4675,7 @@ XLOGShmemInit(void)
(WALInsertLockPadded *) allocptr; (WALInsertLockPadded *) allocptr;
allocptr += sizeof(WALInsertLockPadded) * NUM_XLOGINSERT_LOCKS; allocptr += sizeof(WALInsertLockPadded) * NUM_XLOGINSERT_LOCKS;
XLogCtl->Insert.WALInsertLockTranche.name = "WALInsertLocks"; XLogCtl->Insert.WALInsertLockTranche.name = "wal_insert";
XLogCtl->Insert.WALInsertLockTranche.array_base = WALInsertLocks; XLogCtl->Insert.WALInsertLockTranche.array_base = WALInsertLocks;
XLogCtl->Insert.WALInsertLockTranche.array_stride = sizeof(WALInsertLockPadded); XLogCtl->Insert.WALInsertLockTranche.array_stride = sizeof(WALInsertLockPadded);
......
...@@ -474,7 +474,7 @@ ReplicationOriginShmemInit(void) ...@@ -474,7 +474,7 @@ ReplicationOriginShmemInit(void)
int i; int i;
replication_states_ctl->tranche_id = LWTRANCHE_REPLICATION_ORIGIN; replication_states_ctl->tranche_id = LWTRANCHE_REPLICATION_ORIGIN;
replication_states_ctl->tranche.name = "ReplicationOrigins"; replication_states_ctl->tranche.name = "replication_origin";
replication_states_ctl->tranche.array_base = replication_states_ctl->tranche.array_base =
&replication_states[0].lock; &replication_states[0].lock;
replication_states_ctl->tranche.array_stride = replication_states_ctl->tranche.array_stride =
......
...@@ -138,7 +138,7 @@ ReplicationSlotsShmemInit(void) ...@@ -138,7 +138,7 @@ ReplicationSlotsShmemInit(void)
ShmemInitStruct("ReplicationSlot Ctl", ReplicationSlotsShmemSize(), ShmemInitStruct("ReplicationSlot Ctl", ReplicationSlotsShmemSize(),
&found); &found);
ReplSlotIOLWLockTranche.name = "Replication Slot IO Locks"; ReplSlotIOLWLockTranche.name = "replication_slot_io";
ReplSlotIOLWLockTranche.array_base = ReplSlotIOLWLockTranche.array_base =
((char *) ReplicationSlotCtl) + offsetof(ReplicationSlotCtlData, replication_slots) +offsetof(ReplicationSlot, io_in_progress_lock); ((char *) ReplicationSlotCtl) + offsetof(ReplicationSlotCtlData, replication_slots) +offsetof(ReplicationSlot, io_in_progress_lock);
ReplSlotIOLWLockTranche.array_stride = sizeof(ReplicationSlot); ReplSlotIOLWLockTranche.array_stride = sizeof(ReplicationSlot);
......
...@@ -90,13 +90,13 @@ InitBufferPool(void) ...@@ -90,13 +90,13 @@ InitBufferPool(void)
+ PG_CACHE_LINE_SIZE, + PG_CACHE_LINE_SIZE,
&foundIOLocks)); &foundIOLocks));
BufferIOLWLockTranche.name = "Buffer IO Locks"; BufferIOLWLockTranche.name = "buffer_io";
BufferIOLWLockTranche.array_base = BufferIOLWLockArray; BufferIOLWLockTranche.array_base = BufferIOLWLockArray;
BufferIOLWLockTranche.array_stride = sizeof(LWLockMinimallyPadded); BufferIOLWLockTranche.array_stride = sizeof(LWLockMinimallyPadded);
LWLockRegisterTranche(LWTRANCHE_BUFFER_IO_IN_PROGRESS, LWLockRegisterTranche(LWTRANCHE_BUFFER_IO_IN_PROGRESS,
&BufferIOLWLockTranche); &BufferIOLWLockTranche);
BufferContentLWLockTranche.name = "Buffer Content Locks"; BufferContentLWLockTranche.name = "buffer_content";
BufferContentLWLockTranche.array_base = BufferContentLWLockTranche.array_base =
((char *) BufferDescriptors) + offsetof(BufferDesc, content_lock); ((char *) BufferDescriptors) + offsetof(BufferDesc, content_lock);
BufferContentLWLockTranche.array_stride = sizeof(BufferDescPadded); BufferContentLWLockTranche.array_stride = sizeof(BufferDescPadded);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment