diff options
author | Noah Misch <noah@leadboat.com> | 2017-11-05 09:25:52 -0800 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2017-11-05 09:26:47 -0800 |
commit | 2a2e2e85e0f67213816126d654615413930dd8b3 (patch) | |
tree | aca731eedc84440c92a5364bbdcfc75fd4c4fb34 /src/backend/utils/time/snapmgr.c | |
parent | 946f165182a2e643c18fa21b563dc3ccc0c9ada7 (diff) |
Ignore CatalogSnapshot when checking COPY FREEZE prerequisites.
This restores the ability, essentially lost in commit
ffaa44cb559db332baeee7d25dedd74a61974203, to use COPY FREEZE under
REPEATABLE READ isolation. Back-patch to 9.4, like that commit.
Reviewed by Tom Lane.
Discussion: https://postgr.es/m/CA+TgmoahWDm-7fperBxzU9uZ99LPMUmEpSXLTw9TmrOgzwnORw@mail.gmail.com
Diffstat (limited to 'src/backend/utils/time/snapmgr.c')
-rw-r--r-- | src/backend/utils/time/snapmgr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index a70605b0375..331c91044f2 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -1343,6 +1343,14 @@ DeleteAllExportedSnapshotFiles(void) FreeDir(s_dir); } +/* + * ThereAreNoPriorRegisteredSnapshots + * Is the registered snapshot count less than or equal to one? + * + * Don't use this to settle important decisions. While zero registrations and + * no ActiveSnapshot would confirm a certain idleness, the system makes no + * guarantees about the significance of one registered snapshot. + */ bool ThereAreNoPriorRegisteredSnapshots(void) { |