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;
}
|
(4 rows)
+BEGIN;
CREATE TABLE vistest (LIKE testeoc);
+COPY vistest FROM stdin CSV;
+COMMIT;
+SELECT xmax, * FROM vistest;
+ xmax | a
+------+----
+ 0 | a0
+ 0 | b
+(2 rows)
+
BEGIN;
TRUNCATE vistest;
COPY vistest FROM stdin CSV;
COMMIT;
TRUNCATE vistest;
COPY vistest FROM stdin CSV FREEZE;
-NOTICE: FREEZE option specified but pre-conditions not met
BEGIN;
INSERT INTO vistest VALUES ('z');
SAVEPOINT s1;
TRUNCATE vistest;
ROLLBACK TO SAVEPOINT s1;
COPY vistest FROM stdin CSV FREEZE;
-NOTICE: FREEZE option specified but pre-conditions not met
SELECT * FROM vistest;
a
----