@@ -544,7 +544,7 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
544544 beentry -> st_activity_start_timestamp = 0 ;
545545 /* st_xact_start_timestamp and wait_event_info are also disabled */
546546 beentry -> st_xact_start_timestamp = 0 ;
547- beentry -> st_queryid = UINT64CONST (0 );
547+ beentry -> st_query_id = UINT64CONST (0 );
548548 proc -> wait_event_info = 0 ;
549549 PGSTAT_END_WRITE_ACTIVITY (beentry );
550550 }
@@ -605,7 +605,7 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
605605 * identifier.
606606 */
607607 if (state == STATE_RUNNING )
608- beentry -> st_queryid = UINT64CONST (0 );
608+ beentry -> st_query_id = UINT64CONST (0 );
609609
610610 if (cmd_str != NULL )
611611 {
@@ -618,32 +618,32 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
618618}
619619
620620/* --------
621- * pgstat_report_queryid () -
621+ * pgstat_report_query_id () -
622622 *
623623 * Called to update top-level query identifier.
624624 * --------
625625 */
626626void
627- pgstat_report_queryid (uint64 queryId , bool force )
627+ pgstat_report_query_id (uint64 query_id , bool force )
628628{
629629 volatile PgBackendStatus * beentry = MyBEEntry ;
630630
631631 /*
632- * if track_activities is disabled, st_queryid should already have been
632+ * if track_activities is disabled, st_query_id should already have been
633633 * reset
634634 */
635635 if (!beentry || !pgstat_track_activities )
636636 return ;
637637
638638 /*
639- * We only report the top-level query identifiers. The stored queryid is
639+ * We only report the top-level query identifiers. The stored query_id is
640640 * reset when a backend calls pgstat_report_activity(STATE_RUNNING), or
641641 * with an explicit call to this function using the force flag. If the
642642 * saved query identifier is not zero it means that it's not a top-level
643643 * command, so ignore the one provided unless it's an explicit call to
644644 * reset the identifier.
645645 */
646- if (beentry -> st_queryid != 0 && !force )
646+ if (beentry -> st_query_id != 0 && !force )
647647 return ;
648648
649649 /*
@@ -652,7 +652,7 @@ pgstat_report_queryid(uint64 queryId, bool force)
652652 * ensure the compiler doesn't try to get cute.
653653 */
654654 PGSTAT_BEGIN_WRITE_ACTIVITY (beentry );
655- beentry -> st_queryid = queryId ;
655+ beentry -> st_query_id = query_id ;
656656 PGSTAT_END_WRITE_ACTIVITY (beentry );
657657}
658658
@@ -1022,12 +1022,12 @@ pgstat_get_crashed_backend_activity(int pid, char *buffer, int buflen)
10221022}
10231023
10241024/* ----------
1025- * pgstat_get_my_queryid () -
1025+ * pgstat_get_my_query_id () -
10261026 *
10271027 * Return current backend's query identifier.
10281028 */
10291029uint64
1030- pgstat_get_my_queryid (void )
1030+ pgstat_get_my_query_id (void )
10311031{
10321032 if (!MyBEEntry )
10331033 return 0 ;
@@ -1037,7 +1037,7 @@ pgstat_get_my_queryid(void)
10371037 * pg_stat_get_activity which is already protected, or from the same
10381038 * backend which means that there won't be concurrent writes.
10391039 */
1040- return MyBEEntry -> st_queryid ;
1040+ return MyBEEntry -> st_query_id ;
10411041}
10421042
10431043
0 commit comments