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:
@ -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)
|
||||
|
Reference in New Issue
Block a user