Unverified Commit f202a36b authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

Only create pgcopydb schema and table_size table when --cache is used. (#210)

* Only create pgcopydb schema and table_size table when --cache is used.

Otherwise, create a temporary table instead, so that read-only roles can be
used on the source database connection to drive the database copy.

* Fix tests.

The pgcopydb list table-parts code needed to know about the new facility
where we may create a temporary table and then need to prepend pgcopydb to
the search_path.

Also refactor the new logic in schema_prepare_pgcopydb_table_size() to make
it easier to follow. It was getting too complex to read for what it does.
parent ace33e82
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment