diff --git a/src/backend/distributed/operations/split_shard_replication_setup.c b/src/backend/distributed/operations/split_shard_replication_setup.c index 70d2888b5..363ca516d 100644 --- a/src/backend/distributed/operations/split_shard_replication_setup.c +++ b/src/backend/distributed/operations/split_shard_replication_setup.c @@ -146,7 +146,7 @@ worker_split_shard_replication_setup(PG_FUNCTION_ARGS) ShardInfoHashMap); /* store handle in statically allocated shared memory*/ - StoreSharedMemoryHandle(dsmHandle); + StoreShardSplitSharedMemoryHandle(dsmHandle); PG_RETURN_VOID(); } diff --git a/src/backend/distributed/shardsplit/shardsplit_shared_memory.c b/src/backend/distributed/shardsplit/shardsplit_shared_memory.c index bd3750591..e2d7f1460 100644 --- a/src/backend/distributed/shardsplit/shardsplit_shared_memory.c +++ b/src/backend/distributed/shardsplit/shardsplit_shared_memory.c @@ -19,7 +19,7 @@ #include "utils/memutils.h" const char *SharedMemoryNameForHandleManagement = - "Shard memory handle for shard split"; + "Shared memory handle for shard split"; static shmem_startup_hook_type prev_shmem_startup_hook = NULL; @@ -91,7 +91,7 @@ GetShardSplitInfoSMHeader(char *slotName) errmsg("Expected slot name but found NULL"))); } - dsm_handle dsmHandle = GetSharedMemoryHandle(); + dsm_handle dsmHandle = GetShardSplitSharedMemoryHandle(); ShardSplitInfoSMHeader *shardSplitInfoSMHeader = GetShardSplitInfoSMHeaderFromDSMHandle(dsmHandle); @@ -242,13 +242,13 @@ ShardSplitShmemInit(void) /* - * StoreSharedMemoryHandle stores a handle of shared memory + * StoreShardSplitSharedMemoryHandle stores a handle of shared memory * allocated and populated by 'worker_split_shard_replication_setup' UDF. * This handle is stored in a different shared memory segment with name - * 'SHARED_MEMORY_FOR_SPLIT_SHARD_HANDLE_MANAGEMENT'. + * 'Shared memory handle for shard split'. */ void -StoreSharedMemoryHandle(dsm_handle dsmHandle) +StoreShardSplitSharedMemoryHandle(dsm_handle dsmHandle) { bool found = false; ShardSplitShmemData *smData = ShmemInitStruct(SharedMemoryNameForHandleManagement, @@ -289,12 +289,12 @@ StoreSharedMemoryHandle(dsm_handle dsmHandle) /* - * GetSharedMemoryHandle returns the shared memory handle stored + * GetShardSplitSharedMemoryHandle returns the shared memory handle stored * by 'worker_split_shard_replication_setup' UDF. This handle * is requested by wal sender processes during logical replication phase. */ dsm_handle -GetSharedMemoryHandle(void) +GetShardSplitSharedMemoryHandle(void) { bool found = false; ShardSplitShmemData *smData = ShmemInitStruct(SharedMemoryNameForHandleManagement, diff --git a/src/include/distributed/shardsplit_shared_memory.h b/src/include/distributed/shardsplit_shared_memory.h index 1fcd4a840..31e89f99a 100644 --- a/src/include/distributed/shardsplit_shared_memory.h +++ b/src/include/distributed/shardsplit_shared_memory.h @@ -53,8 +53,8 @@ typedef struct ShardSplitShmemData /* Functions for creating and accessing shared memory used for dsm handle managment */ void InitializeShardSplitSMHandleManagement(void); -void StoreSharedMemoryHandle(dsm_handle dsmHandle); -dsm_handle GetSharedMemoryHandle(void); +void StoreShardSplitSharedMemoryHandle(dsm_handle dsmHandle); +dsm_handle GetShardSplitSharedMemoryHandle(void); /* Functions for creating and accessing shared memory segments consisting shard split information */ extern ShardSplitInfoSMHeader * CreateSharedMemoryForShardSplitInfo(int