Skip to content

Commit 6f10787

Browse files
[#23788] YSQL, QueryDiagnostics: Fix testPgssResetBetweenDiagnostics 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
1 parent 8d8e7cf commit 6f10787

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/postgres/contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,9 @@ pgss_store(const char *query, uint64 queryId,
19501950
Datum
19511951
pg_stat_statements_reset_1_7(PG_FUNCTION_ARGS)
19521952
{
1953+
if (YBIsQueryDiagnosticsEnabled())
1954+
*yb_pgss_last_reset_time = GetCurrentTimestamp();
1955+
19531956
Oid userid;
19541957
Oid dbid;
19551958
uint64 queryid;

0 commit comments

Comments
 (0)