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

Commit544a4ee

Browse files
Merge pull request#64 from postgrespro/PGPRO-7444
Fix build due to changes in PostgreSQL 16
2 parents1ff4426 +9526428 commit544a4ee

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

‎collector.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pgws_collector_main(Datum main_arg)
470470
send_profile(profile_hash,mqh);
471471
break;
472472
default:
473-
AssertState(false);
473+
Assert(false);
474474
}
475475
break;
476476
caseSHM_MQ_DETACHED:
@@ -480,7 +480,7 @@ pgws_collector_main(Datum main_arg)
480480
"detached")));
481481
break;
482482
default:
483-
AssertState(false);
483+
Assert(false);
484484
}
485485
shm_mq_detach_compat(mqh,pgws_collector_mq);
486486
}

‎compat.h‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include"access/tupdesc.h"
1616
#include"miscadmin.h"
1717
#include"storage/shm_mq.h"
18+
#include"utils/guc_tables.h"
1819

1920
staticinlineTupleDesc
2021
CreateTemplateTupleDescCompat(intnattrs,boolhasoid)
@@ -65,4 +66,18 @@ InitPostgresCompat(const char *in_dbname, Oid dboid,
6566
#endif
6667
}
6768

69+
staticinlinevoid
70+
get_guc_variables_compat(structconfig_generic***vars,int*num_vars)
71+
{
72+
Assert(vars!=NULL);
73+
Assert(num_vars!=NULL);
74+
75+
#ifPG_VERSION_NUM >=160000
76+
*vars=get_guc_variables(num_vars);
77+
#else
78+
*vars=get_guc_variables();
79+
*num_vars=GetNumConfigOptions();
80+
#endif
81+
}
82+
6883
#endif

‎pg_wait_sampling.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ setup_gucs()
198198
profile_pid_found= false,
199199
profile_queries_found= false;
200200

201-
guc_vars=get_guc_variables();
202-
numOpts=GetNumConfigOptions();
201+
get_guc_variables_compat(&guc_vars,&numOpts);
203202

204203
for (i=0;i<numOpts;i++)
205204
{
@@ -452,7 +451,6 @@ pg_wait_sampling_get_current(PG_FUNCTION_ARGS)
452451
{
453452
MemoryContextoldcontext;
454453
TupleDesctupdesc;
455-
WaitCurrentContext*params;
456454

457455
funcctx=SRF_FIRSTCALL_INIT();
458456

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp