replication recovery/startup question - Mailing list pgsql-admin

From Rob Cowell
Subject replication recovery/startup question
Date
Msg-id 1SjBRT-0000RM-TA@eq1.mail.transversal.net
Whole thread Raw
Responses Re: replication recovery/startup question
List pgsql-admin

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.

pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: starting postgres with an empty px_xlog folder
Next
From: 김준철
Date:
Subject: Re: a very slow SQL