Sat Jan 29 00:13:33 PST 2005
- Previous message: [Slony1-general] Failover
- Next message: [Slony1-general] slon + nagios monitoring
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On January 28, 2005 03:46 pm, Fiel Cabral wrote: > I'm asking because one of the HOWTOs contained this: > "Slony-I does not yet automatically copy table definitions from a master > when a slave subscribes to it, so we need to import this data. We do this > with pg_dump." > > I have two nodes. Node 1 is the master and it has the database > containing the data to be replicated. Node 2 is the slave and it has > the database with identical table definitions but the tables are all > empty. Is it necessary to run pg_dump to copy the *data* from node 1 > to node 2 before initializing node 2 as a slave? Or will slony copy > the data by itself? You use pg_dump -s (schema only no data). slony will populate the table with data. > > Thanks. Have a good weekend. > > -Fiel Cabral > > On Fri, 28 Jan 2005 17:59:09 -0500, Christopher Browne > > <cbbrowne at ca.afilias.info> wrote: > > Fiel Cabral wrote: > > >My question is about this portion of slony-I-failover.txt: > > >>After failover, getting back node1 > > >> > > >> > > >> > > >> > > >> > > >> After the above failover, the data stored on node1 must be > > >> considered out of sync with the rest of the nodes. Therefore, the > > >> only way to get node1 back and transfer the master role to it is > > >> to rebuild it from scratch as a slave, let it catch up and then > > >> follow the switchover procedure. > > > > > >Is it necesssary to pg_dump the master's DB to the slave's DB in the > > >process of "rebuilding it from scratch as a slave"? > > > > > >Or is it possible to not do the pg_dump and just "let it catch up"? > > > > Consider the situation of a table that you never update, but rather only > > ever insert to. > > > > (This is common for transaction tables.) > > > > If no "dump" of the data from the provider takes place, and all you do > > is to add in the changes, that will NEVER include any of the older > > records. > > > > What is done is in fact not a pg_dump, but rather, internally, a > > "COPY_SET" event. > > > > COPY_SET goes through each of the tables that are being replicated in > > the set, and uses 'COPY table to stdout' to dump the contents of each > > table. That's kind of analagous to a pg_dump, and there is no choice > > but to do something reasonably similar to that if you actually want a > > consistent replica. > > > > If you don't care for a consistent replica, I'm not sure what to offer > > you... > > _______________________________________________ > Slony1-general mailing list > Slony1-general at gborg.postgresql.org > http://gborg.postgresql.org/mailman/listinfo/slony1-general -- Darcy Buskermolen Wavefire Technologies Corp. ph: 250.717.0200 fx: 250.763.1759 http://www.wavefire.com
- Previous message: [Slony1-general] Failover
- Next message: [Slony1-general] slon + nagios monitoring
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list