Skip to content

Commit 140d7f9

Browse files
committed
Revert "get_cloudsync_context must be allocated in a global context"
This reverts commit 4e614f1.
1 parent 4e614f1 commit 140d7f9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/postgresql/cloudsync_postgresql.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ static cloudsync_context *pg_cloudsync_context = NULL;
4848
static cloudsync_context *get_cloudsync_context(void) {
4949
if (pg_cloudsync_context == NULL) {
5050
// Create context - db_t is not used in PostgreSQL mode
51-
MemoryContext old = MemoryContextSwitchTo(TopMemoryContext);
5251
pg_cloudsync_context = cloudsync_context_create(NULL);
53-
MemoryContextSwitchTo(old);
5452
if (!pg_cloudsync_context) {
5553
ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("Not enough memory to create a database context")));
5654
}

0 commit comments

Comments
 (0)