@@ -612,17 +612,18 @@ pg_query_state(PG_FUNCTION_ARGS)
612612foreach (i ,msgs )
613613{
614614List * qs_stack ;
615- shm_mq_msg * msg = (shm_mq_msg * )lfirst (i );
615+ shm_mq_msg * current_msg = (shm_mq_msg * )lfirst (i );
616616proc_state * p_state = (proc_state * )palloc (sizeof (proc_state ));
617617
618- if (msg -> result_code != QS_RETURNED )
618+ if (current_msg -> result_code != QS_RETURNED )
619619continue ;
620620
621- AssertState (msg -> result_code == QS_RETURNED );
621+ AssertState (current_msg -> result_code == QS_RETURNED );
622622
623- qs_stack = deserialize_stack (msg -> stack ,msg -> stack_depth );
623+ qs_stack = deserialize_stack (current_msg -> stack ,
624+ current_msg -> stack_depth );
624625
625- p_state -> proc = msg -> proc ;
626+ p_state -> proc = current_msg -> proc ;
626627p_state -> stack = qs_stack ;
627628p_state -> frame_index = 0 ;
628629p_state -> frame_cursor = list_head (qs_stack );
@@ -943,10 +944,10 @@ GetRemoteBackendWorkers(PGPROC *proc)
943944for (i = 0 ;i < msg -> number ;i ++ )
944945{
945946pid_t pid = msg -> pids [i ];
946- PGPROC * proc = BackendPidGetProc (pid );
947- if (!proc || !proc -> pid )
947+ PGPROC * current_proc = BackendPidGetProc (pid );
948+ if (!current_proc || !current_proc -> pid )
948949continue ;
949- result = lcons (proc ,result );
950+ result = lcons (current_proc ,result );
950951}
951952
952953#if PG_VERSION_NUM < 100000