Re: How can you get "WAL segment has already been removed" when doing synchronous replication ?!

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Hubert Lubaczewski <depesz(at)depesz(dot)com>
Cc: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>, PostgreSQL - General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How can you get "WAL segment has already been removed" when doing synchronous replication ?!
Date: 2013-07-12 07:00:22
Message-ID: CA+HiwqGOZMDnuRqRJa-oEoLwr-H3eURF=R+9Fg1G-bV5nZZ6EQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 11, 2013 at 11:31 PM, hubert depesz lubaczewski
<depesz(at)depesz(dot)com> wrote:
> On Thu, Jul 11, 2013 at 11:29:24PM +0530, Raghavendra wrote:
>> On Thu, Jul 11, 2013 at 11:18 PM, hubert depesz lubaczewski <
>> depesz(at)depesz(dot)com> wrote:
>>
>> > We are seeing situation like this:
>> > 1. 9.2.4 database
>> > 2. Master settings:
>> > name | setting
>> > ---------------------------+---------------
>> > fsync | on
>> > synchronize_seqscans | on
>> > synchronous_commit | remote_write
>> > synchronous_standby_names | *
>> > wal_sync_method | open_datasync
>> > (5 rows)
>> >
>> > Yet, every now and then we're getting:
>> > FATAL: requested WAL segment * has already been removed
>> >
>> > Assuming no part of the system is issuing "set synchronous_commit
>> > = off", how can we get in such situation?
>> >
>> > Best regards,
>> >
>> > depesz
>> >
>> >
>> Increasing the wal_keep_segments ?
>
> I know that I can increase wal_keep_segments to "solve" it, but
> shouldn't it be *impossible* to happen with synchronous replication?
> After all - all commits should wait for slave to be 100% up to date!
>

Is it possible that xlog recycling might have caused this wherein the
xlog segment which is yet to be archived/shipped is recycled? I
remember something of that sort. Check this discussion:

http://www.postgresql.org/message-id/51779B3B.1020003@lab.ntt.co.jp

Is this logged on the master or a standby?

--
Amit Langote

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message itishree sukla 2013-07-12 07:26:53 Re: Full text search
Previous Message Raghavendra 2013-07-12 06:44:07 Re: Full text search