pg15_onder_gpid
Onder Kalaci 2022-08-18 17:25:16 +02:00
parent 80d220110c
commit 4471584379
2 changed files with 3 additions and 1 deletions

View File

@ -867,6 +867,7 @@ AssignDistributedTransactionId(void)
void void
AssignGlobalPID(void) AssignGlobalPID(void)
{ {
elog(WARNING, "AssignGlobalPID");
uint64 globalPID = INVALID_CITUS_INTERNAL_BACKEND_GPID; uint64 globalPID = INVALID_CITUS_INTERNAL_BACKEND_GPID;
bool distributedCommandOriginator = false; bool distributedCommandOriginator = false;
@ -901,6 +902,7 @@ AssignGlobalPID(void)
void void
SetBackendDataGlobalPID(uint64 globalPID) SetBackendDataGlobalPID(uint64 globalPID)
{ {
elog(WARNING, "SetBackendDataGlobalPID");
SpinLockAcquire(&MyBackendData->mutex); SpinLockAcquire(&MyBackendData->mutex);
MyBackendData->globalPID = globalPID; MyBackendData->globalPID = globalPID;

View File

@ -166,7 +166,7 @@ step "s3-select-distributed-waiting-queries"
// only works for the coordinator // only works for the coordinator
step "s3-show-actual-gpids" step "s3-show-actual-gpids"
{ {
SELECT global_pid > 0 as gpid_exists, query FROM citus_stat_activity WHERE state = 'active' AND query IN (SELECT blocked_statement FROM citus_lock_waits UNION SELECT current_statement_in_blocking_process FROM citus_lock_waits) ORDER BY 1 DESC; SELECT global_pid > 0 as gpid_exists, global_pid, query FROM citus_stat_activity WHERE state = 'active' AND query IN (SELECT blocked_statement FROM citus_lock_waits UNION SELECT current_statement_in_blocking_process FROM citus_lock_waits) ORDER BY 1 DESC;
} }
// session s1 and s4 executes the commands on the same worker node // session s1 and s4 executes the commands on the same worker node