pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedReplication broken. Stale data in slave Database
16+ messages / 3 participants
[nested] [flat]
* Replication broken. Stale data in slave Database
@ 2015-06-24 14:43 Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 14:52 ` Re: Replication broken. Stale data in slave Database John Scalia <jayknowsunix@gmail.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 2 replies; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 14:43 UTC (permalink / raw)
To: pgsql-admin
Hi all,
We have set up a Streaming replication.
Master database serves temporal data being replicated on the Slave database.
In the event that we shut down the Master database, the slave database
contains residual data that we do not need.
Is there any way to trigger a SQL to delete all data from the slave
database in the event that the replication is broken?
Thank you for your answers.
Regards,
Alberto.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@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
-----------------------------------------------------------------------------------------
--
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 14:52 ` John Scalia <jayknowsunix@gmail.com>
1 sibling, 0 replies; 16+ messages in thread
From: John Scalia @ 2015-06-24 14:52 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: pgsql-admin
Alberto,
I assume you synchronous streaming replication, but have you looked at
asynchronous replication just using WAL files? You could have your standby
server lag behind by a fixed amount and maybe then you wouldn't have to
delete on failover. Without more details, that's the best I can offer.
--
Jay
On Wed, Jun 24, 2015 at 7:43 AM, Alberto Olivares <
alberto.olivares@snowflakesoftware.com> wrote:
> Hi all,
>
> We have set up a Streaming replication.
>
> Master database serves temporal data being replicated on the Slave
> database.
>
> In the event that we shut down the Master database, the slave database
> contains residual data that we do not need.
>
> Is there any way to trigger a SQL to delete all data from the slave
> database in the event that the replication is broken?
>
> Thank you for your answers.
>
> Regards,
> Alberto.
>
>
> *Alberto Olivares Colas*Technical Consultant
> Snowflake Software
>
> Tel.: +44 (0)2380 386578
>
> Email: alberto.olivares@snowflakesoftware.com
> Website: www.snowflakesoftware.com
> Twitter: @sflakesoftware <http://www,twitter.com@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
>
> -----------------------------------------------------------------------------------------
>
>
>
>
> *Winner of IHS Jane's ATC Award - Enabling Technology*
> *Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 16:07 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
1 sibling, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 16:07 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: pgsql-admin
> Hi all,
>
> We have set up a Streaming replication.
>
> Master database serves temporal data being replicated on the Slave
> database.
>
> In the event that we shut down the Master database, the slave database
> contains residual data that we do not need.
>
> Is there any way to trigger a SQL to delete all data from the slave
> database in the event that the replication is broken?
>
What your version PG?
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-24 15:11 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 15:11 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: pgsql-admin
Hi John and Gilberto,
Thanks for your answer.
We have a synchronous streaming replication. Database is PostgreSQL 9.1.15
on linux.
Saludos,
Alberto.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@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 17:07, Gilberto Castillo <gilberto.castillo@etecsa.cu>
wrote:
>
> > Hi all,
> >
> > We have set up a Streaming replication.
> >
> > Master database serves temporal data being replicated on the Slave
> > database.
> >
> > In the event that we shut down the Master database, the slave database
> > contains residual data that we do not need.
> >
> > Is there any way to trigger a SQL to delete all data from the slave
> > database in the event that the replication is broken?
> >
>
> What your version PG?
>
>
> 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/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 16:17 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 16:17 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: gilberto.castillo@etecsa.cu; pgsql-admin
> Hi John and Gilberto,
>
> Thanks for your answer.
>
> We have a synchronous streaming replication. Database is PostgreSQL 9.1.15
> on linux.
Uhmmmm, see you:
http://www.postgresql.org/docs/current/static/pgarchivecleanup.html
In 9.1 use script what delete for date the wal more old.
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-24 15:40 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 15:40 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: pgsql-admin
Hi Gilberto,
Thanks for your answer.
Do you know how to configure the pg_archivecleanup just in the event the
primary database goes down?
Regards,
Alberto.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@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 17:17, Gilberto Castillo <gilberto.castillo@etecsa.cu>
wrote:
>
> > Hi John and Gilberto,
> >
> > Thanks for your answer.
> >
> > We have a synchronous streaming replication. Database is PostgreSQL
> 9.1.15
> > on linux.
>
>
> Uhmmmm, see you:
> http://www.postgresql.org/docs/current/static/pgarchivecleanup.html
>
> In 9.1 use script what delete for date the wal more old.
>
>
> 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/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 16:47 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 16:47 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: gilberto.castillo@etecsa.cu; pgsql-admin
> Hi Gilberto,
>
> Thanks for your answer.
>
> Do you know how to configure the pg_archivecleanup just in the event the
> primary database goes down?
Look pg_archivecleanup is configured in the slave in version major pg 9.4
It's not your case.
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-24 16:01 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 16:01 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: pgsql-admin
Hi Gilberto,
Ups. So, I cannot try to use this solution. Any other ideas?
Thanks.
Regards,
Alberto.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@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 17:47, Gilberto Castillo <gilberto.castillo@etecsa.cu>
wrote:
>
> > Hi Gilberto,
> >
> > Thanks for your answer.
> >
> > Do you know how to configure the pg_archivecleanup just in the event the
> > primary database goes down?
>
>
> Look pg_archivecleanup is configured in the slave in version major pg 9.4
>
> It's not your case.
>
>
> 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/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 17:45 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 17:45 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: gilberto.castillo@etecsa.cu; pgsql-admin
> Hi Gilberto,
>
> Ups. So, I cannot try to use this solution. Any other ideas?
Use an cron of SO, Monthy. Call an script what delete the old wal.
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-24 16:53 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 16:53 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: pgsql-admin
Hi,
I thought about creating a cron job but we cannot run it monthly, we need
to do it just in case the replication fails because the master database
breaks.
Regards,
Alberto
On 24 Jun 2015 5:46 pm, "Gilberto Castillo" <gilberto.castillo@etecsa.cu>
wrote:
>
> > Hi Gilberto,
> >
> > Ups. So, I cannot try to use this solution. Any other ideas?
>
> Use an cron of SO, Monthy. Call an script what delete the old wal.
>
> 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/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 18:02 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:26 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 18:02 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: gilberto.castillo@etecsa.cu; pgsql-admin
> Hi,
>
> I thought about creating a cron job but we cannot run it monthly, we need
> to do it just in case the replication fails because the master database
> breaks.
You not use failover?
What use for manager the replication?
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-24 17:26 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:36 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 17:26 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: pgsql-admin
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.
On 24 Jun 2015 6:03 pm, "Gilberto Castillo" <gilberto.castillo@etecsa.cu>
wrote:
>
> > Hi,
> >
> > I thought about creating a cron job but we cannot run it monthly, we need
> > to do it just in case the replication fails because the master database
> > breaks.
>
> You not use failover?
> What use for manager the replication?
>
>
> 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/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:26 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 18:36 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:38 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 18:36 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: gilberto.castillo@etecsa.cu; pgsql-admin
> 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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:26 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:36 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-24 17:38 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:41 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 16+ messages in thread
From: Alberto Olivares @ 2015-06-24 17:38 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: pgsql-admin
Not sure if I can do that when the master database is shut down
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*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:26 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:36 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:38 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
@ 2015-06-24 18:41 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-25 08:21 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 16+ messages in thread
From: Gilberto Castillo @ 2015-06-24 18:41 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: gilberto.castillo@etecsa.cu; pgsql-admin
> 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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Replication broken. Stale data in slave Database
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:07 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:26 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:36 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:38 ` Re: Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:41 ` Re: Replication broken. Stale data in slave Database Gilberto Castillo <gilberto.castillo@etecsa.cu>
@ 2015-06-25 08:21 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 0 replies; 16+ messages in thread
From: Alberto Olivares @ 2015-06-25 08:21 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: 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.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@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.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*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 16+ messages in thread
end of thread, other threads:[~2015-06-25 08:21 UTC | newest]
Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 14:43 Replication broken. Stale data in slave Database Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 14:52 ` John Scalia <jayknowsunix@gmail.com>
2015-06-24 16:07 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:11 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:17 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 15:40 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 16:47 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:01 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 17:45 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 16:53 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:02 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:26 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:36 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-24 17:38 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-06-24 18:41 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-06-25 08:21 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox