pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Selva manickaraja <mavles78@gmail.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Benjamin Krajmalnik <kraj@servoyant.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Too many WAL(s) despite low transaction
Date: Mon, 11 Apr 2011 10:29:25 +0800
Message-ID: <BANLkTinvTAmezYp7Uam1MZnfip-C0HwF9Q@mail.gmail.com> (raw)
In-Reply-To: <20110403105251.GF4116@tamriel.snowman.net>
References: <20110401010336.GB4116@tamriel.snowman.net>
	<AANLkTi=U_2opbk3Kg223=++V9EfK5KGw-M-28Ec0dxCe@mail.gmail.com>
	<20110401013853.GC4116@tamriel.snowman.net>
	<AANLkTini7zev+CyTLMGFFsaZucxCR35rBsgg_Znj8F-7@mail.gmail.com>
	<20110401022209.GD4116@tamriel.snowman.net>
	<AANLkTinoAVz9qH=fV=qNxMyZnzBXsweDgGK4hQCEebZr@mail.gmail.com>
	<20110401023555.GE4116@tamriel.snowman.net>
	<AANLkTimA06euF-0t2-hZ7JifXxWsQnSmywrz97-TrBCa@mail.gmail.com>
	<F4E6A2751A2823418A21D4A160B689887B116E@fletch.stackdump.local>
	<BANLkTinsoW-XHifcX9E+wHHXaHjWgR5ytA@mail.gmail.com>
	<20110403105251.GF4116@tamriel.snowman.net>

We have let the production DB to run for about one week and monitor the
situation. As days passed the DB began to settle down and the log shipping
was more consistent. So as suggested by Stephen, we did a tape restore of
the base backup and wal-backup from the previous backup done. We have
scheduled a backup of base+wal(s) every 12 hours.

So this was the steps taken to test whether our backup is good or not.


   1. Our primary MachineA is replicated to MachineB for pass one week. And
   WAL(s) are also shipped to Machine C from where all backups are done.
   2. Backup (base+wal) restored from tape to MachineD.
   3. Use a home-written scripts to unzip and untar the base and wal to the
   appropriate directories.
   4. Database started in MachineD as a secondary to MachineA.
   5. Database in MachineD started and attempted to replicate from MachineA.
   But unable to replicate because state of base is inconsistent with MachineA.
   6. We pushed the un-backedup WAL(s) from MachineC to the archive
   directory in MachineD.
   7. It was a great sight to witness as and when the WAL(S) arrive in
   MachineC it attempts to restore and replicate with MachineA.
   8. Finally after the last WAL was restored the MachineD was in-synch as
   MachineA in full replication mode.

We suppose our backup(s) can be restored if this worked. Comments are
welcomed.

Our next plan of action is

1. To do a PITR from these backups.
2. Implement pg_compress, or pg_lesslog, pg_clearxlogtail to WAL(S) to
reduce the size of WALs.

There are other DB issues that I would like to highlight but that it's
better to begin another thread for everyone's clarity.

Thank you.

Regards,

Selvam


On Sun, Apr 3, 2011 at 6:52 PM, Stephen Frost <sfrost@snowman.net> wrote:

> * Selva manickaraja (mavles78@gmail.com) wrote:
> > Next actions to do:
> >
> >    1. Implement pg_compress, or pg_lesslog, pg_clearxlogtail
> >    2. Check on how well autovacuum is running and how much to tune it.
>
> Have you tested that you can do a restore using the base backup and
> WALs?  Have you made sure the database is consistent/correct after doing
> such a restore?  If you change to using pg_compress or anything else,
> you should be sure to repeat that testing to make sure everything works
> as expected.
>
>        Thanks,
>
>                Stephen
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk2YUYMACgkQrzgMPqB3kijQfgCeJ9F4HPrpNdRePlR4SwJ2A89W
> ikUAoIM9cM23J43vvX/wuW7Iq1UqQsac
> =JnLy
> -----END PGP SIGNATURE-----
>
>

view thread (16+ messages)

Message-ID: <BANLkTinvTAmezYp7Uam1MZnfip-C0HwF9Q@mail.gmail.com>
Permalink:  ../BANLkTinvTAmezYp7Uam1MZnfip-C0HwF9Q@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTinvTAmezYp7Uam1MZnfip-C0HwF9Q@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mavles78@gmail.com, sfrost@snowman.net, kraj@servoyant.com
  Subject: Re: Too many WAL(s) despite low transaction
  In-Reply-To: <BANLkTinvTAmezYp7Uam1MZnfip-C0HwF9Q@mail.gmail.com>
  References: <20110401010336.GB4116@tamriel.snowman.net> <AANLkTi=U_2opbk3Kg223=++V9EfK5KGw-M-28Ec0dxCe@mail.gmail.com> <20110401013853.GC4116@tamriel.snowman.net> <AANLkTini7zev+CyTLMGFFsaZucxCR35rBsgg_Znj8F-7@mail.gmail.com> <20110401022209.GD4116@tamriel.snowman.net> <AANLkTinoAVz9qH=fV=qNxMyZnzBXsweDgGK4hQCEebZr@mail.gmail.com> <20110401023555.GE4116@tamriel.snowman.net> <AANLkTimA06euF-0t2-hZ7JifXxWsQnSmywrz97-TrBCa@mail.gmail.com> <F4E6A2751A2823418A21D4A160B689887B116E@fletch.stackdump.local> <BANLkTinsoW-XHifcX9E+wHHXaHjWgR5ytA@mail.gmail.com> <20110403105251.GF4116@tamriel.snowman.net> <BANLkTinvTAmezYp7Uam1MZnfip-C0HwF9Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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