Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit03bb2cf

Browse files
committed
Fix compability with 9.6
1 parent2bcb2b5 commit03bb2cf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎expected/load.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ View "public.pg_wait_sampling_current"
66
pid | integer |
77
event_type | text |
88
event | text |
9+
queryid | bigint |
910

1011
\d pg_wait_sampling_history
1112
View "public.pg_wait_sampling_history"
@@ -15,6 +16,7 @@ View "public.pg_wait_sampling_current"
1516
ts | timestamp with time zone |
1617
event_type | text |
1718
event | text |
19+
queryid | bigint |
1820

1921
\d pg_wait_sampling_profile
2022
View "public.pg_wait_sampling_profile"
@@ -23,6 +25,7 @@ View "public.pg_wait_sampling_profile"
2325
pid | integer |
2426
event_type | text |
2527
event | text |
28+
queryid | bigint |
2629
count | bigint |
2730

2831
DROP EXTENSION pg_wait_sampling;

‎pg_wait_sampling.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,14 +775,20 @@ pgws_planner_hook(Query *parse, int cursorOptions,
775775
if (MyProc)
776776
{
777777
inti=MyProc-ProcGlobal->allProcs;
778+
#ifPG_VERSION_NUM >=110000
778779
/*
779780
* since we depend on queryId we need to check that its size
780781
* is uint64 as we coded in pg_wait_sampling
781782
*/
782783
StaticAssertExpr(sizeof(parse->queryId)==sizeof(uint64),
783784
"queryId size is not uint64");
784-
if (proc_queryids[i]==UINT64CONST(0))
785+
#else
786+
StaticAssertExpr(sizeof(parse->queryId)==sizeof(uint32),
787+
"queryId size is not uint32");
788+
#endif
789+
if (!proc_queryids[i])
785790
proc_queryids[i]=parse->queryId;
791+
786792
}
787793

788794
/* Invoke original hook if needed */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp