Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 903482B2868 for ; Mon, 25 Jun 2012 12:46:33 -0300 (ADT) Received: from eq1.mail.transversal.net ([91.207.39.93]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SjBUk-0004N5-57 for pgsql-admin@postgresql.org; Mon, 25 Jun 2012 15:46:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=transversal.com; s=s; h=Message-Id:MIME-Version:Content-Type:Date:Subject:To:From; bh=7Ds69Cp/clCRvqLMeZNl4XmVNBK3X1GvkDI/yVJpJX4=; b=SXN8AzlDxQgnQkA38gSFvm/llC5vgeL/tDZZ0kR3/H17lvvi04q9GqBe+fg7ZhWYbbEFBfLM5pv00A47cDpEgrUZnwbvcsZIJDxMnDY8jxRenDEfrEWP+BJHC1gpXxBzaCgFCX4CdtFTkxHe6aXuzsUGF/YCxI5DlD/0JDaGvEc=; From: Rob Cowell To: "'pgsql-admin@postgresql.org'" Subject: replication recovery/startup question Thread-Topic: replication recovery/startup question Thread-Index: Ac1S6OTmxe3r1H21S+e6MOaxiKu/9Q== Date: Mon, 25 Jun 2012 15:40:48 +0000 Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.1.129] Content-Type: multipart/alternative; boundary="_000_34B2FD7B1B3A4840A030C0E428FC5DA6D0BEFEEXCHANGETransvers_" MIME-Version: 1.0 Message-Id: <1SjBRT-0000RM-TA@eq1.mail.transversal.net> X-Pg-Spam-Score: -4.3 (----) X-Archive-Number: 201206/119 X-Sequence-Number: 39710 --_000_34B2FD7B1B3A4840A030C0E428FC5DA6D0BEFEEXCHANGETransvers_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 proces= s 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 proc= ess streaming 3D/560752D0 The log files in ~data/pg_xlog show : ls -lart -rw------- 1 postgres postgres 16777216 Jun 25 13:36 000000010000003F00000= 04C -rw------- 1 postgres postgres 16777216 Jun 25 13:36 000000010000003F00000= 04D -rw------- 1 postgres postgres 16777216 Jun 25 13:37 000000010000003F00000= 050 -rw------- 1 postgres postgres 16777216 Jun 25 13:46 000000010000003F00000= 052 -rw------- 1 postgres postgres 16777216 Jun 25 14:24 000000010000003F00000= 053 -rw------- 1 postgres postgres 16777216 Jun 25 14:50 000000010000003F00000= 054 -rw------- 1 postgres postgres 16777216 Jun 25 14:59 000000010000003F00000= 055 -rw------- 1 postgres postgres 16777216 Jun 25 15:03 000000010000003F00000= 056 -rw------- 1 postgres postgres 16777216 Jun 25 15:06 000000010000003F00000= 057 -rw------- 1 postgres postgres 16777216 Jun 25 15:10 000000010000003F00000= 058 drwx------ 4 postgres postgres 69632 Jun 25 15:24 . -rw------- 1 postgres postgres 16777216 Jun 25 15:29 000000010000003D00000= 055 -rw------- 1 postgres postgres 16777216 Jun 25 15:30 000000010000003D00000= 056 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 slav= e really still playing catchup (based on the names of the logfiles in pg_xl= og) ? Cheers, Rob. --_000_34B2FD7B1B3A4840A030C0E428FC5DA6D0BEFEEXCHANGETransvers_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I started replicating my Postgres9.1.3 server on Fri= day, 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̵= 7; I’m wondering if the replication has caught up or is still catchin= g up.

 

Master :

post<= span style=3D"font-size:9.0pt;font-family:"Lucida Console"">gres&= nbsp; 3964  3926  0 Jun21 ?      &n= bsp; 00:00:32 postgres: archiver process  = last was 000000010000003D00000055

post<= span style=3D"font-size:9.0pt;font-family:"Lucida Console"">gres = 15080  3926  0 Jun22 ?        = 00:02:39 postgres: wal sender process dbrepl xx= x.xxx.xxx.xxx(46496) streaming 3D/560752D0

 

Slave :

post<= span style=3D"font-size:9.0pt;font-family:"Lucida Console"">gres&= nbsp; 5048  5040  0 Jun22 ?      &n= bsp; 00:11:37 postgres: startup process   = recovering 000000010000003D00000056

post<= span style=3D"font-size:9.0pt;font-family:"Lucida Console"">gres&= nbsp; 6714  5040  0 Jun22 ?      &n= bsp; 00:06:24 postgres: wal receiver process &n= bsp; streaming 3D/560752D0

 

The log files in ~data/pg_xlog show :

 

ls -lart=

<list truncated>

-rw-------  1 postgre= s postgres 16777216 Jun 25 13:36 000000010000003F0000004C=

-rw-------  1 postgre= s postgres 16777216 Jun 25 13:36 000000010000003F0000004D=

-rw-------  1 postgre= s postgres 16777216 Jun 25 13:37 000000010000003F00000050=

-rw-------  1 postgre= s postgres 16777216 Jun 25 13:46 000000010000003F00000052=

-rw-------  1 postgre= s postgres 16777216 Jun 25 14:24 000000010000003F00000053=

-rw-------  1 postgre= s postgres 16777216 Jun 25 14:50 000000010000003F00000054=

-rw-------  1 postgre= s postgres 16777216 Jun 25 14:59 000000010000003F00000055=

-rw-------  1 postgre= s postgres 16777216 Jun 25 15:03 000000010000003F00000056=

-rw-------  1 postgre= s postgres 16777216 Jun 25 15:06 000000010000003F00000057=

-rw-------  1 postgre= s postgres 16777216 Jun 25 15:10 000000010000003F00000058=

drwx------  4 postgre= s postgres    69632 Jun 25 15:24 .

-rw-------  1 postgre= s postgres 16777216 Jun 25 15:29 000000010000003D00000055=

-rw-------  1 postgre= s postgres 16777216 Jun 25 15:30 000000010000003D00000056=

 

 

Why would the output from ‘ls’ show olde= r 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 maste= r/slave are in sync, or is the slave really still playing catchup (based on= the names of the logfiles in pg_xlog) ?

 

Cheers,

Rob.

--_000_34B2FD7B1B3A4840A030C0E428FC5DA6D0BEFEEXCHANGETransvers_--