Skip site navigation (1) Skip section navigation (2)

Re: testing hot standby

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: testing hot standby
Date: 2010-04-12 06:21:38
Message-ID: x2t3f0b79eb1004112321lc113dbf5v71e591b54711eade@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sat, Apr 10, 2010 at 5:39 AM, Jaime Casanova
<jcasanov(at)systemguards(dot)com(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Jaime CasanovaDate: 2010-04-12 06:23:27
Subject: Re: testing hot standby
Previous:From: Pavel StehuleDate: 2010-04-12 06:16:16
Subject: Re: GSoC - proposal - Materialized Views in PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group