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

Commitb79a816

Browse files
author
Marina Polyakova
committed
Merge remote-tracking branch 'origin/PGPRO-8877'
Conflicts:compat.hCaused by:-22212ba (PGPRO-8877) PostgreSQL 17 support.-ed9f977 (master) Drop support for Postgres < 12
2 parents8eaa130 +22212ba commitb79a816

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

‎collector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ pgws_collector_main(Datum main_arg)
348348
pqsignal(SIGTERM,handle_sigterm);
349349
pqsignal(SIGUSR1,procsignal_sigusr1_handler);
350350
BackgroundWorkerUnblockSignals();
351-
InitPostgresCompat(NULL,InvalidOid,NULL,InvalidOid,false, false,NULL);
351+
InitPostgresCompat(NULL,InvalidOid,NULL,InvalidOid,0,NULL);
352352
SetProcessingMode(NormalProcessing);
353353

354354
/* Make pg_wait_sampling recognisable in pg_stat_activity */

‎compat.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,26 @@ shm_mq_send_compat(shm_mq_handle *mqh, Size nbytes, const void *data,
2828
#endif
2929
}
3030

31+
#ifPG_VERSION_NUM<170000
32+
#defineINIT_PG_LOAD_SESSION_LIBS0x0001
33+
#defineINIT_PG_OVERRIDE_ALLOW_CONNS0x0002
34+
#endif
35+
3136
staticinlinevoid
3237
InitPostgresCompat(constchar*in_dbname,Oiddboid,
3338
constchar*username,Oiduseroid,
34-
boolload_session_libraries,
35-
booloverride_allow_connections,
39+
bits32flags,
3640
char*out_dbname)
3741
{
3842
#ifPG_VERSION_NUM >=170000
39-
InitPostgres(in_dbname,dboid,username,useroid, (load_session_libraries ?INIT_PG_LOAD_SESSION_LIBS :0) |
40-
(override_allow_connections ?INIT_PG_OVERRIDE_ALLOW_CONNS :0),out_dbname);
43+
InitPostgres(in_dbname,dboid,username,useroid,flags,out_dbname);
4144
#elifPG_VERSION_NUM >=150000
42-
InitPostgres(in_dbname,dboid,username,useroid,load_session_libraries,
43-
override_allow_connections,out_dbname);
45+
InitPostgres(in_dbname,dboid,username,useroid,
46+
flags&INIT_PG_LOAD_SESSION_LIBS,
47+
flags&INIT_PG_OVERRIDE_ALLOW_CONNS,out_dbname);
4448
#else
4549
InitPostgres(in_dbname,dboid,username,useroid,out_dbname,
46-
override_allow_connections);
50+
flags&INIT_PG_OVERRIDE_ALLOW_CONNS);
4751
#endif
4852
}
4953

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp