Re: Replication broken. Stale data in slave Database

From: Alberto Olivares <alberto(dot)olivares(at)snowflakesoftware(dot)com>
To: gilberto(dot)castillo(at)etecsa(dot)cu
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Replication broken. Stale data in slave Database
Date: 2015-06-25 08:21:02
Message-ID: CAGdoAziCw5ayhGbprJwwPczmcZT=LW21kkF_cura698NtJPT8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Tel.: +44 (0)2380 386578

Email: alberto(dot)olivares(at)snowflakesoftware(dot)com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter(dot)com(at)sflakesoftware/>
Follow us on LinkedIn <http://www.linkedin.com/company/snowflake-software>

*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*

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

On 24 June 2015 at 19:41, Gilberto Castillo <gilberto(dot)castillo(at)etecsa(dot)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(dot)castillo(at)etecsa(dot)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*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Saravanan S 2015-06-25 09:38:26 Re: PostgreSQL to Oracle DBLink
Previous Message Guillaume Lelarge 2015-06-25 08:17:53 Re: Trying to change the owner of some tables