diff options
| author | Michael P | 2011-07-15 06:30:12 +0000 |
|---|---|---|
| committer | Michael P | 2011-07-15 06:31:41 +0000 |
| commit | 5e13a79645239f25615dfc9ee1d177f44e0bbc09 (patch) | |
| tree | 594b6617c6b3a1f8a5f7c5b4b3b8b79dc246416b | |
| parent | fb2a3a864dee367f2cfe76a3a4fff5e02cb94fc1 (diff) | |
Fix for bug 3366724: Autovacuum warning on datanode
This was caused by autovacuum launcher on Datanode.
As autovacuum is not authorized to get GXID and snapshot from GTM,
bypass this warning.
Global snapshot is not necessary for launcher as autovacuum analyze and
worker are in charge of table cleanup.
| -rw-r--r-- | src/backend/storage/ipc/procarray.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 5477df663b..783b352708 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -1243,18 +1243,25 @@ GetSnapshotData(Snapshot snapshot) /* else fallthrough */ } - /* If we have no snapshot, we will use a local one. + /* + * If we have no snapshot, we will use a local one. * If we are in normal mode, we output a warning though. * We currently fallback and use a local one at initdb time, * as well as when a new connection occurs. + * This is also the case for autovacuum launcher. + * * IsPostmasterEnvironment - checks for initdb * IsNormalProcessingMode() - checks for new connections + * IsAutoVacuumLauncherProcess - checks for autovacuum launcher process */ - if (IS_PGXC_DATANODE && snapshot_source == SNAPSHOT_UNDEFINED - && IsPostmasterEnvironment && IsNormalProcessingMode()) - { - elog(WARNING, "Do not have a GTM snapshot available"); - } + if (IS_PGXC_DATANODE && + snapshot_source == SNAPSHOT_UNDEFINED && + IsPostmasterEnvironment && + IsNormalProcessingMode() && + !IsAutoVacuumLauncherProcess()) + { + elog(WARNING, "Do not have a GTM snapshot available"); + } #endif /* |
