pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Cowell <Rob.Cowell@transversal.com>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: replication recovery/startup question
Date: Mon, 25 Jun 2012 15:40:48 +0000
Message-ID: <1SjBRT-0000RM-TA@eq1.mail.transversal.net> (raw)

Hi,

I started replicating my Postgres9.1.3 server on Friday, and it seems to be working well.
The master server database is quite large (somewhere in the order of 85GB) so the rsync to copy the base_backup took a while to complete.

However, looking at the log files and 'ps' I'm wondering if the replication has caught up or is still catching up.

Master :
postgres  3964  3926  0 Jun21 ?        00:00:32 postgres: archiver process   last was 000000010000003D00000055
postgres 15080  3926  0 Jun22 ?        00:02:39 postgres: wal sender process dbrepl xxx.xxx.xxx.xxx(46496) streaming 3D/560752D0

Slave :
postgres  5048  5040  0 Jun22 ?        00:11:37 postgres: startup process   recovering 000000010000003D00000056
postgres  6714  5040  0 Jun22 ?        00:06:24 postgres: wal receiver process   streaming 3D/560752D0

The log files in ~data/pg_xlog show :

ls -lart
<list truncated>
-rw-------  1 postgres postgres 16777216 Jun 25 13:36 000000010000003F0000004C
-rw-------  1 postgres postgres 16777216 Jun 25 13:36 000000010000003F0000004D
-rw-------  1 postgres postgres 16777216 Jun 25 13:37 000000010000003F00000050
-rw-------  1 postgres postgres 16777216 Jun 25 13:46 000000010000003F00000052
-rw-------  1 postgres postgres 16777216 Jun 25 14:24 000000010000003F00000053
-rw-------  1 postgres postgres 16777216 Jun 25 14:50 000000010000003F00000054
-rw-------  1 postgres postgres 16777216 Jun 25 14:59 000000010000003F00000055
-rw-------  1 postgres postgres 16777216 Jun 25 15:03 000000010000003F00000056
-rw-------  1 postgres postgres 16777216 Jun 25 15:06 000000010000003F00000057
-rw-------  1 postgres postgres 16777216 Jun 25 15:10 000000010000003F00000058
drwx------  4 postgres postgres    69632 Jun 25 15:24 .
-rw-------  1 postgres postgres 16777216 Jun 25 15:29 000000010000003D00000055
-rw-------  1 postgres postgres 16777216 Jun 25 15:30 000000010000003D00000056


Why would the output from 'ls' show older filenames (0....1....3D...xx) as newer in date than the "0....1....3F...xx" filenames?
Does Postgres re-cycle old log filenames ?

Does the output from 'ps' mean the master/slave are in sync, or is the slave really still playing catchup (based on the names of the logfiles in pg_xlog) ?

Cheers,
Rob.

view thread (2+ messages)  latest in thread

Message-ID: <1SjBRT-0000RM-TA@eq1.mail.transversal.net>
Permalink:  ../1SjBRT-0000RM-TA@eq1.mail.transversal.net/
Also on:    postgresql.org/message-id/1SjBRT-0000RM-TA@eq1.mail.transversal.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Rob.Cowell@transversal.com
  Subject: Re: replication recovery/startup question
  In-Reply-To: <1SjBRT-0000RM-TA@eq1.mail.transversal.net>

* 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