pg_basebackup or dump for starting replication process

Started by Marcos Pegoraroabout 8 years ago2 messagesgeneral
Jump to latest
#1Marcos Pegoraro
marcos@f10.com.br

For replication purposes only, there are any difference between pg_basebackup
or dump to copy data from Master to Slave ?
On Docs is written that pg_basebackup can be used both for point-in-time
recovery and as the starting point for a log shipping or streaming
replication standby servers.

We are using just Dump, there are any caveat of using it for logical
replication ?

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Marcos Pegoraro (#1)
Re: pg_basebackup or dump for starting replication process

PegoraroF10 wrote:

For replication purposes only, there are any difference between pg_basebackup
or dump to copy data from Master to Slave ?
On Docs is written that pg_basebackup can be used both for point-in-time
recovery and as the starting point for a log shipping or streaming
replication standby servers.

We are using just Dump, there are any caveat of using it for logical
replication ?

For *logical* replication you can start with a "pg_dump --schema-only",
but for *physical* replication only a pg_basebackup will do.

Make sure that he tables are empty before you start logical replication.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com