Skip to content

Commit

Permalink
[#23788] YSQL, QueryDiagnostics: Fix testPgssResetBetweenDiagnostics …
Browse files Browse the repository at this point in the history
…in pg15

Summary:
PostgreSQL 15 introduces a new function, pg_stat_statements_reset_1_7, to handle the pg_stat_statements_reset functionality. As a result, the current changes replicate the existing logic into this new function to maintain compatibility with the updated system.
Jira: DB-12692

Test Plan: ./yb_build.sh --java-test 'org.yb.pgsql.TestYbQueryDiagnostics#testPgssResetBetweenDiagnostics'

Reviewers: asaha

Reviewed By: asaha

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D39135
  • Loading branch information
IshanChhangani committed Oct 22, 2024
1 parent 8d8e7cf commit 6f10787
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/postgres/contrib/pg_stat_statements/pg_stat_statements.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,9 @@ pgss_store(const char *query, uint64 queryId,
Datum
pg_stat_statements_reset_1_7(PG_FUNCTION_ARGS)
{
if (YBIsQueryDiagnosticsEnabled())
*yb_pgss_last_reset_time = GetCurrentTimestamp();

Oid userid;
Oid dbid;
uint64 queryid;
Expand Down

0 comments on commit 6f10787

Please sign in to comment.