1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Reduce scope of changes for COPY FREEZE.

Allow support only for freezing tuples by explicit
command. Previous coding mistakenly extended
slightly beyond what was agreed as correct on -hackers.
So essentially a partial revoke of earlier work,
leaving just the COPY FREEZE command.
This commit is contained in:
Simon Riggs
2012-12-02 20:52:52 +00:00
parent 3114cb60a1
commit 5457a130d3
5 changed files with 57 additions and 47 deletions

View File

@ -1994,14 +1994,11 @@ CopyFrom(CopyState cstate)
* which subtransaction created it is crucial for correctness
* of this optimisation.
*/
if (ThereAreNoPriorRegisteredSnapshots() &&
if (cstate->freeze &&
ThereAreNoPriorRegisteredSnapshots() &&
ThereAreNoReadyPortals() &&
cstate->rel->rd_newRelfilenodeSubid == GetCurrentSubTransactionId())
{
hi_options |= HEAP_INSERT_COMMITTED;
if (cstate->freeze)
hi_options |= HEAP_INSERT_FROZEN;
}
hi_options |= HEAP_INSERT_FROZEN;
}
if (cstate->freeze && (hi_options & HEAP_INSERT_FROZEN) == 0)