Re: Replication broken. Stale data in slave Database - Mailing list pgsql-admin

From Alberto Olivares
Subject Re: Replication broken. Stale data in slave Database
Date
Msg-id CAGdoAziCw5ayhGbprJwwPczmcZT=LW21kkF_cura698NtJPT8Q@mail.gmail.com
Whole thread Raw
In response to Re: Replication broken. Stale data in slave Database  ("Gilberto Castillo" <gilberto.castillo@etecsa.cu>)
List pgsql-admin
Yes, We turn off both databases when there is a problem with the master. But, we need something that automatically clears out the slave database when data is stale because there was a problem in the master database.

Alberto Olivares Colas
Technical Consultant
Snowflake Software



Winner of IHS Jane's ATC Award - Enabling Technology

Registered in England & Wales. Registered Number: 4294244
-----------------------------------------------------------------------------------------




On 24 June 2015 at 19:41, Gilberto Castillo <gilberto.castillo@etecsa.cu> wrote:

> Not sure if I can do that when the master database is shut down

Yes, In fact both server must be turned off for safety.


> On 24 Jun 2015 6:36 pm, "Gilberto Castillo" <gilberto.castillo@etecsa.cu>
> wrote:
>
>> > Hi,
>> >
>> > Yes we have failover. If after a few minutes the master database goes
>> up
>> > the replication works again which is fine.
>> >
>> > But I need something that deletes all records in the slave database
>> > meanwhile master database is down. The reason is because we are
>> sending
>> > not
>> > updated data when this happens and we prefer deleted what it is in the
>> > slave database.
>>
>> Uhmmmm, use rsync of the folder wal in the master and slave.
>>
>>
>>

Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba



Winner of IHS Jane's ATC Award - Enabling Technology

pgsql-admin by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Trying to change the owner of some tables
Next
From: naveen kumar
Date:
Subject: Re: configure: error: no acceptable C compiler found in $PATH