Open rafiss opened 2 years ago
copying over @cucaroach's notes from https://github.com/cockroachdb/cockroach/issues/86792
PG has an optimized version of COPY that works in the following scenario:
- COPY has FREEZE annotation
- COPY is under explicit transaction
- Target table was created under same transaction and isn't yet visible
I don't know about edge cases (like can this transaction read from or do more writes to the table after the COPY? can the table also have secondary indexes?)
I also don't know what the state of CRDB's transactional DDL is but if we had it we could just catch this scenario and hand over the COPY to the bulkio import path I think. @dt @ajwerner thoughts? The rationale here is we want a way to speed up the initial bulk full table copies DMS services do.
@cucaroach is this still a priority for 23.1?
@cucaroach is this still a priority for 23.1?
No, its too limited in applicability, I discussed it in #91831
Thanks. Moving this to the backlog then.
Support the FREEZE option for COPY.
https://www.postgresql.org/docs/current/sql-copy.html
Some of this may not be applicable to CRDB.
Jira issue: CRDB-18317
Epic CRDB-18320