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

postgres 15 support#54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
shinderuk merged 1 commit intopostgrespro:masterfromRekGRpth:patch-1
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletionscollector.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -350,12 +350,7 @@ collector_main(Datum main_arg)
pqsignal(SIGTERM, handle_sigterm);
pqsignal(SIGUSR1, procsignal_sigusr1_handler);
BackgroundWorkerUnblockSignals();

#if PG_VERSION_NUM >= 110000
InitPostgres(NULL, InvalidOid, NULL, InvalidOid, NULL, false);
#else
InitPostgres(NULL, InvalidOid, NULL, InvalidOid, NULL);
#endif
InitPostgresCompat(NULL, InvalidOid, NULL, InvalidOid, false, false, NULL);
SetProcessingMode(NormalProcessing);

/* Make pg_wait_sampling recognisable in pg_stat_activity */
Expand Down
20 changes: 20 additions & 0 deletionscompat.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
#include "postgres.h"

#include "access/tupdesc.h"
#include "miscadmin.h"

#include "pg_wait_sampling.h"

Expand DownExpand Up@@ -33,3 +35,21 @@ CreateTemplateTupleDescCompat(int nattrs, bool hasoid)
return CreateTemplateTupleDesc(nattrs, hasoid);
#endif
}

inline void
InitPostgresCompat(const char *in_dbname, Oid dboid,
const char *username, Oid useroid,
bool load_session_libraries,
bool override_allow_connections,
char *out_dbname)
{
#if PG_VERSION_NUM >= 150000
InitPostgres(in_dbname, dboid, username, useroid, load_session_libraries,
override_allow_connections, out_dbname);
#elif PG_VERSION_NUM >= 110000
InitPostgres(in_dbname, dboid, username, useroid, out_dbname,
override_allow_connections);
#else
InitPostgres(in_dbname, dboid, username, useroid, out_dbname);
#endif
}
5 changes: 5 additions & 0 deletionspg_wait_sampling.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -88,5 +88,10 @@ extern shm_mq_result shm_mq_send_compat(shm_mq_handle *mqh, Size nbytes,
const void *data, bool nowait,
bool force_flush);
extern TupleDesc CreateTemplateTupleDescCompat(int nattrs, bool hasoid);
extern void InitPostgresCompat(const char *in_dbname, Oid dboid,
const char *username, Oid useroid,
bool load_session_libraries,
bool override_allow_connections,
char *out_dbname);

#endif

[8]ページ先頭

©2009-2025 Movatter.jp