Re: testing hot standby - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: testing hot standby
Date
Msg-id x2t3f0b79eb1004112321lc113dbf5v71e591b54711eade@mail.gmail.com
Whole thread Raw
In response to testing hot standby  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Responses Re: testing hot standby  (Jaime Casanova <jcasanov@systemguards.com.ec>)
List pgsql-hackers
On Sat, Apr 10, 2010 at 5:39 AM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> i'm startint to try Hot Standby & Streaming Replication, so i started
> a replication:

Great!

> but, my main concern is why it was asking for
> "000000010000000000000006"? is this normal?

The standby server tries to replay all of the available WAL files in the
archive and pg_xlog directory at first. Then, when an invalid record is
found or no more WAL file is available, it starts streaming replication
and tries to read the missing WAL files from the primary.

In your testing, an invalid record was found in 000000010000000000000006,
then the standby was waiting for it to be shipped from the primary.

> is this standby's way of
> saying i'm working but i have nothing to do?

Since SR is a record-based log-shipping, the standby can receive the WAL
records from the primary before the WAL file has been filled up. So, in
your case, I guess the standby was receiving the WAL records which belong
to 000000010000000000000006 from the primary.

> when that happens after a standby restart, is normal that i have to
> wait until the file is created before it can accept connections?

No. All the WAL records for the standby to accept connections should be
shipped before any additional WAL records are written. Didn't the standby
accept connections before executing pgbench?

Regards,

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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: GSoC - proposal - Materialized Views in PostgreSQL
Next
From: Jaime Casanova
Date:
Subject: Re: testing hot standby