mirror of https://github.com/citusdata/citus.git
Merge pull request #5711 from citusdata/clean_up_gpid
Prevent any monitoring view/udf to show already exited backendspull/5715/head
commit
bf5aa1e223
|
@ -513,6 +513,9 @@ CitusCleanupConnectionsAtExit(int code, Datum arg)
|
||||||
* are already given away.
|
* are already given away.
|
||||||
*/
|
*/
|
||||||
DeallocateReservedConnections();
|
DeallocateReservedConnections();
|
||||||
|
|
||||||
|
/* we don't want any monitoring view/udf to show already exited backends */
|
||||||
|
UnSetGlobalPID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,6 @@ static BackendData *MyBackendData = NULL;
|
||||||
|
|
||||||
static void BackendManagementShmemInit(void);
|
static void BackendManagementShmemInit(void);
|
||||||
static size_t BackendManagementShmemSize(void);
|
static size_t BackendManagementShmemSize(void);
|
||||||
static void UnSetGlobalPID(void);
|
|
||||||
|
|
||||||
|
|
||||||
PG_FUNCTION_INFO_V1(assign_distributed_transaction_id);
|
PG_FUNCTION_INFO_V1(assign_distributed_transaction_id);
|
||||||
|
@ -674,7 +673,7 @@ UnSetDistributedTransactionId(void)
|
||||||
/*
|
/*
|
||||||
* UnSetGlobalPID resets the global pid for the current backend.
|
* UnSetGlobalPID resets the global pid for the current backend.
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
UnSetGlobalPID(void)
|
UnSetGlobalPID(void)
|
||||||
{
|
{
|
||||||
/* backend does not exist if the extension is not created */
|
/* backend does not exist if the extension is not created */
|
||||||
|
|
|
@ -62,6 +62,7 @@ extern void InitializeBackendData(void);
|
||||||
extern void LockBackendSharedMemory(LWLockMode lockMode);
|
extern void LockBackendSharedMemory(LWLockMode lockMode);
|
||||||
extern void UnlockBackendSharedMemory(void);
|
extern void UnlockBackendSharedMemory(void);
|
||||||
extern void UnSetDistributedTransactionId(void);
|
extern void UnSetDistributedTransactionId(void);
|
||||||
|
extern void UnSetGlobalPID(void);
|
||||||
extern void AssignDistributedTransactionId(void);
|
extern void AssignDistributedTransactionId(void);
|
||||||
extern void MarkCitusInitiatedCoordinatorBackend(void);
|
extern void MarkCitusInitiatedCoordinatorBackend(void);
|
||||||
extern void AssignGlobalPID(void);
|
extern void AssignGlobalPID(void);
|
||||||
|
|
Loading…
Reference in New Issue