Merge pull request #2997 from citusdata/fix_master_update_node

Set current snapshot in maintenance daemon.
pull/3001/head
Hadi Moshayedi 2019-09-19 09:50:50 -07:00 committed by GitHub
commit 4875c3c81c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -375,6 +375,12 @@ CitusMaintenanceDaemonMain(Datum main_arg)
InvalidateMetadataSystemCache();
StartTransactionCommand();
/*
* Some functions in ruleutils.c, which we use to get the DDL for
* metadata propagation, require an active snapshot.
*/
PushActiveSnapshot(GetTransactionSnapshot());
if (!LockCitusExtension())
{
ereport(DEBUG1, (errmsg("could not lock the citus extension, "
@ -386,6 +392,7 @@ CitusMaintenanceDaemonMain(Datum main_arg)
Async_Notify(METADATA_SYNC_CHANNEL, NULL);
}
PopActiveSnapshot();
CommitTransactionCommand();
ProcessCompletedNotifies();