mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
adjust query id feature to use pg_stat_activity.query_id
Previously, it was pg_stat_activity.queryid to match the
pg_stat_statements queryid column. This is an adjustment to patch
4f0b0966c8. This also adjusts some of the internal function calls to
match. Catversion bumped.
Reported-by: Álvaro Herrera, Julien Rouhaud
Discussion: https://postgr.es/m/20210408032704.GA7498@alvherre.pgsql
This commit is contained in:
@@ -167,7 +167,7 @@ typedef struct PgBackendStatus
|
||||
int64 st_progress_param[PGSTAT_NUM_PROGRESS_PARAM];
|
||||
|
||||
/* query identifier, optionally computed using post_parse_analyze_hook */
|
||||
uint64 st_queryid;
|
||||
uint64 st_query_id;
|
||||
} PgBackendStatus;
|
||||
|
||||
|
||||
@@ -297,14 +297,14 @@ extern void pgstat_clear_backend_activity_snapshot(void);
|
||||
|
||||
/* Activity reporting functions */
|
||||
extern void pgstat_report_activity(BackendState state, const char *cmd_str);
|
||||
extern void pgstat_report_queryid(uint64 queryId, bool force);
|
||||
extern void pgstat_report_query_id(uint64 query_id, bool force);
|
||||
extern void pgstat_report_tempfile(size_t filesize);
|
||||
extern void pgstat_report_appname(const char *appname);
|
||||
extern void pgstat_report_xact_timestamp(TimestampTz tstamp);
|
||||
extern const char *pgstat_get_backend_current_activity(int pid, bool checkUser);
|
||||
extern const char *pgstat_get_crashed_backend_activity(int pid, char *buffer,
|
||||
int buflen);
|
||||
extern uint64 pgstat_get_my_queryid(void);
|
||||
extern uint64 pgstat_get_my_query_id(void);
|
||||
|
||||
|
||||
/* ----------
|
||||
|
||||
Reference in New Issue
Block a user