Re: [9.0] hot standby plus streaming replication - Mailing list pgsql-general

From Fujii Masao
Subject Re: [9.0] hot standby plus streaming replication
Date
Msg-id AANLkTikUFRYB-AiS7v+dOOCnLLRg-V-L1noZyUtyJ=_=@mail.gmail.com
Whole thread Raw
In response to Re: [9.0] hot standby plus streaming replication  (Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>)
Responses Re: [9.0] hot standby plus streaming replication  (Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>)
List pgsql-general
On Fri, Oct 1, 2010 at 4:02 PM, Michele Petrazzo - Unipex
<michele.petrazzo@unipex.it> wrote:
> - why in my tests, _whitout_ common direcotory, master and slave keep in
> sync also if I shutdown slave, add (in my last tests) something about
> 100k record (although little ones) on the master and then after woke up
> the slave in about 2/3 seconds I have all the dbs in sync?

Because the master had the WAL files containing that 100k record in its
pg_xlog directory. If those WAL files were unfortunately removed from
the master before you started the standby, the standby would not have
been in sync with the master.

You can specify how many WAL files you'd keep in the master by using
wal_keep_segments parameter.
http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html#RUNTIME-CONFIG-REPLICATION

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: libpq (C++) - Insert binary data
Next
From: Magnus Hagander
Date:
Subject: Re: Missing path in pg_config