pg_dump -h host_ip -U postgres -d source_db -t aa_nqrgs.act_26022017 |
psql -h destination_host_ip -U postgres -d destination_db
I have tried this command to transfer a table from one server to another, but it shows an error like 'invalid command \N'. How can I resolve this?
copy
command can't continue properly. So you need to find out what went wrong. If you pass-a
option topsql
it will output all steps, thus giving you a hint on where the processing of the script failed. – a_horse_with_no_name Mar 8 '17 at 8:09pg_dump
is much faster than insertion into FDW, in my experience. – sudo Mar 14 '17 at 23:53