aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/time/snapmgr.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2017-11-05 09:25:52 -0800
committerNoah Misch <noah@leadboat.com>2017-11-05 09:26:28 -0800
commit1cac62dac0cfdcacdb2c2b1577dadf101ef7f1f4 (patch)
tree8c20f6e08a442c547e3a9fee231f275ccf1307b5 /src/backend/utils/time/snapmgr.c
parentbd8e2b3cf4cfe5f26ed314af662ef988b4cfad4b (diff)
downloadpostgresql-1cac62dac0cfdcacdb2c2b1577dadf101ef7f1f4.tar.gz
postgresql-1cac62dac0cfdcacdb2c2b1577dadf101ef7f1f4.zip
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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index de6441b2701..8e19c99806e 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1599,6 +1599,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)
{