mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 18:40:38 +00:00
Fix running Postgres in "vanilla mode", without neon storage
Some tests do that
This commit is contained in:
@@ -126,6 +126,12 @@ pg_init_communicator_new(void)
|
||||
{
|
||||
BackgroundWorker bgw;
|
||||
|
||||
if (pageserver_connstring[0] == '\0' && pageserver_grpc_urls[0] == '\0')
|
||||
{
|
||||
/* running with local storage */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialize the background worker process */
|
||||
memset(&bgw, 0, sizeof(bgw));
|
||||
bgw.bgw_flags = BGWORKER_SHMEM_ACCESS;
|
||||
@@ -382,6 +388,12 @@ communicator_new_init(void)
|
||||
Assert(cis != NULL);
|
||||
Assert(my_bs == NULL);
|
||||
|
||||
if (pageserver_connstring[0] == '\0' && pageserver_grpc_urls[0] == '\0')
|
||||
{
|
||||
/* running with local storage */
|
||||
return;
|
||||
}
|
||||
|
||||
if (MyBgworkerEntry && strcmp(MyBgworkerEntry->bgw_function_name, "communicator_new_bgworker_main") == 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1621,7 +1621,7 @@ pg_init_libpagestore(void)
|
||||
if (neon_auth_token)
|
||||
neon_log(LOG, "using storage auth token from NEON_AUTH_TOKEN environment variable");
|
||||
|
||||
if (pageserver_connstring[0] || pageserver_connstring[0])
|
||||
if (pageserver_connstring[0] || pageserver_grpc_urls[0])
|
||||
{
|
||||
neon_log(PageStoreTrace, "set neon_smgr hook");
|
||||
smgr_hook = smgr_neon;
|
||||
|
||||
Reference in New Issue
Block a user