mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Optimize COPY FREEZE with CREATE TABLE also.
Jeff Davis, additional test by me
This commit is contained in:
@ -2002,7 +2002,8 @@ CopyFrom(CopyState cstate)
|
||||
if (cstate->freeze &&
|
||||
ThereAreNoPriorRegisteredSnapshots() &&
|
||||
ThereAreNoReadyPortals() &&
|
||||
cstate->rel->rd_newRelfilenodeSubid == GetCurrentSubTransactionId())
|
||||
(cstate->rel->rd_newRelfilenodeSubid == GetCurrentSubTransactionId() ||
|
||||
cstate->rel->rd_createSubid == GetCurrentSubTransactionId()))
|
||||
hi_options |= HEAP_INSERT_FROZEN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user