Thanks in advance for any help on this.
Problem Summary: I'm looking for the most efficient way possible to export a single table from Postgres/Greenplum for a large number of records (100M+) so that it can be imported by Oracle SQL Loader.
Research Background: I know from research thus far that the pg_dump utility is more efficient than Postgres COPY, so I do NOT want to use the COPY command.
Using pg_dump has many pluses, and can:
- Can use multiple threads/cores
- Can dump a single table of output
- but to CSV?
My Main Question: The critical thing I can't figure out yet is how to get pg_dump to export to csv or fixed-width plain text output.
A sidebar question: I can't seem to find a detailed description (other than, 'The pg_dump --format=custom means the data is compressed') of what exactly the "custom" pg_dump format does to the data.
The word "custom" implies that the output should be to a controllable schema, but I haven't been able to locate documentation yet of how this works.
COPYcommand andpg_dumpon a single large table? I wouldn't expect the "use multiple threads/cores" to make a whole lot of difference when dumping a single table to a single file, as the bottleneck is elsewhere.pg_dump. It's either a SQL script, or a binary dump ("custom format") only understood bypg_restore. "Custom" just means is proprietary to Postgres. You will have to use COPY (or psql's\copy)pg_dumpusesCOPYto dump the data, so that cannot be true.