1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-18 12:22:09 +03:00

Ignore CatalogSnapshot when checking COPY FREEZE prerequisites.

This restores the ability, essentially lost in commit
ffaa44cb55, 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
This commit is contained in:
Noah Misch
2017-11-05 09:25:52 -08:00
parent cf0612aa2c
commit 7932891ab9
2 changed files with 23 additions and 3 deletions

View File

@@ -1447,6 +1447,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)
{