@@ -544,7 +544,7 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
544
544
beentry -> st_activity_start_timestamp = 0 ;
545
545
/* st_xact_start_timestamp and wait_event_info are also disabled */
546
546
beentry -> st_xact_start_timestamp = 0 ;
547
- beentry -> st_queryid = UINT64CONST (0 );
547
+ beentry -> st_query_id = UINT64CONST (0 );
548
548
proc -> wait_event_info = 0 ;
549
549
PGSTAT_END_WRITE_ACTIVITY (beentry );
550
550
}
@@ -605,7 +605,7 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
605
605
* identifier.
606
606
*/
607
607
if (state == STATE_RUNNING )
608
- beentry -> st_queryid = UINT64CONST (0 );
608
+ beentry -> st_query_id = UINT64CONST (0 );
609
609
610
610
if (cmd_str != NULL )
611
611
{
@@ -618,32 +618,32 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
618
618
}
619
619
620
620
/* --------
621
- *pgstat_report_queryid () -
621
+ *pgstat_report_query_id () -
622
622
*
623
623
* Called to update top-level query identifier.
624
624
* --------
625
625
*/
626
626
void
627
- pgstat_report_queryid (uint64 queryId ,bool force )
627
+ pgstat_report_query_id (uint64 query_id ,bool force )
628
628
{
629
629
volatile PgBackendStatus * beentry = MyBEEntry ;
630
630
631
631
/*
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
633
633
* reset
634
634
*/
635
635
if (!beentry || !pgstat_track_activities )
636
636
return ;
637
637
638
638
/*
639
- * We only report the top-level query identifiers. The storedqueryid is
639
+ * We only report the top-level query identifiers. The storedquery_id is
640
640
* reset when a backend calls pgstat_report_activity(STATE_RUNNING), or
641
641
* with an explicit call to this function using the force flag. If the
642
642
* saved query identifier is not zero it means that it's not a top-level
643
643
* command, so ignore the one provided unless it's an explicit call to
644
644
* reset the identifier.
645
645
*/
646
- if (beentry -> st_queryid != 0 && !force )
646
+ if (beentry -> st_query_id != 0 && !force )
647
647
return ;
648
648
649
649
/*
@@ -652,7 +652,7 @@ pgstat_report_queryid(uint64 queryId, bool force)
652
652
* ensure the compiler doesn't try to get cute.
653
653
*/
654
654
PGSTAT_BEGIN_WRITE_ACTIVITY (beentry );
655
- beentry -> st_queryid = queryId ;
655
+ beentry -> st_query_id = query_id ;
656
656
PGSTAT_END_WRITE_ACTIVITY (beentry );
657
657
}
658
658
@@ -1022,12 +1022,12 @@ pgstat_get_crashed_backend_activity(int pid, char *buffer, int buflen)
1022
1022
}
1023
1023
1024
1024
/* ----------
1025
- *pgstat_get_my_queryid () -
1025
+ *pgstat_get_my_query_id () -
1026
1026
*
1027
1027
* Return current backend's query identifier.
1028
1028
*/
1029
1029
uint64
1030
- pgstat_get_my_queryid (void )
1030
+ pgstat_get_my_query_id (void )
1031
1031
{
1032
1032
if (!MyBEEntry )
1033
1033
return 0 ;
@@ -1037,7 +1037,7 @@ pgstat_get_my_queryid(void)
1037
1037
* pg_stat_get_activity which is already protected, or from the same
1038
1038
* backend which means that there won't be concurrent writes.
1039
1039
*/
1040
- return MyBEEntry -> st_queryid ;
1040
+ return MyBEEntry -> st_query_id ;
1041
1041
}
1042
1042
1043
1043