From cffbe81c227ad62111a19bd82f2b84d405a2c8e6 Mon Sep 17 00:00:00 2001 From: Koval Dmitry Date: Wed, 27 Oct 2021 14:43:31 +0300 Subject: [PATCH 1/2] Change for online upgrade --- src/pathman_workers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pathman_workers.c b/src/pathman_workers.c index 1bfda8f1..7b37d7ba 100644 --- a/src/pathman_workers.c +++ b/src/pathman_workers.c @@ -195,6 +195,9 @@ start_bgworker(const char *bgworker_name, snprintf(worker.bgw_library_name, BGW_MAXLEN, "pg_pathman"); worker.bgw_flags = BGWORKER_SHMEM_ACCESS | +#if defined(PGPRO_EE) && PG_VERSION_NUM == 130000 /* FIXME: need to replace "==" to ">=" in future */ + BGWORKER_CLASS_PERSISTENT | +#endif BGWORKER_BACKEND_DATABASE_CONNECTION; worker.bgw_start_time = BgWorkerStart_RecoveryFinished; worker.bgw_restart_time = BGW_NEVER_RESTART; From ca078423cbf8299ad71b1ca98ff7cc6e5c74222f Mon Sep 17 00:00:00 2001 From: Koval Dmitry Date: Wed, 27 Oct 2021 17:43:12 +0300 Subject: [PATCH 2/2] Fixed PG_VERSION_NUM condition --- src/pathman_workers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pathman_workers.c b/src/pathman_workers.c index 7b37d7ba..38d61622 100644 --- a/src/pathman_workers.c +++ b/src/pathman_workers.c @@ -195,7 +195,7 @@ start_bgworker(const char *bgworker_name, snprintf(worker.bgw_library_name, BGW_MAXLEN, "pg_pathman"); worker.bgw_flags = BGWORKER_SHMEM_ACCESS | -#if defined(PGPRO_EE) && PG_VERSION_NUM == 130000 /* FIXME: need to replace "==" to ">=" in future */ +#if defined(PGPRO_EE) && PG_VERSION_NUM >= 130000 && PG_VERSION_NUM < 140000 /* FIXME: need to remove last condition in future */ BGWORKER_CLASS_PERSISTENT | #endif BGWORKER_BACKEND_DATABASE_CONNECTION;