Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd524f2

Browse filesBrowse files
authored
Fix compatibility with pg18
Upstream commit postgres/postgres@525392d changed return type of ExecutorStart_hook API from void to bool.
1 parent e3b1e15 commit dd524f2
Copy full SHA for dd524f2

File tree

1 file changed

+15
-4
lines changed
Filter options

1 file changed

+15
-4
lines changed

‎pg_wait_sampling.c

Copy file name to clipboardExpand all lines: pg_wait_sampling.c
+15-4Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ static PlannedStmt *pgws_planner_hook(Query *parse,
7373
const char *query_string,
7474
#endif
7575
int cursorOptions, ParamListInfo boundParams);
76-
static void pgws_ExecutorStart(QueryDesc *queryDesc, int eflags);
76+
static
77+
#if PG_VERSION_NUM >= 180000
78+
bool
79+
#else
80+
void
81+
#endif
82+
pgws_ExecutorStart(QueryDesc *queryDesc, int eflags);
7783
static void pgws_ExecutorRun(QueryDesc *queryDesc,
7884
ScanDirection direction,
7985
uint64 count
@@ -965,16 +971,21 @@ pgws_planner_hook(Query *parse,
965971
/*
966972
* ExecutorStart hook: save queryId for collector
967973
*/
968-
static void
974+
static
975+
#if PG_VERSION_NUM >= 180000
976+
bool
977+
#else
978+
void
979+
#endif
969980
pgws_ExecutorStart(QueryDesc *queryDesc, int eflags)
970981
{
971982
int i = MyProc - ProcGlobal->allProcs;
972983
if (pgws_enabled(nesting_level))
973984
pgws_proc_queryids[i] = queryDesc->plannedstmt->queryId;
974985
if (prev_ExecutorStart)
975-
prev_ExecutorStart(queryDesc, eflags);
986+
return prev_ExecutorStart(queryDesc, eflags);
976987
else
977-
standard_ExecutorStart(queryDesc, eflags);
988+
return standard_ExecutorStart(queryDesc, eflags);
978989
}
979990

980991
static void

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.