Re: weird hang while running in HS mode

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: weird hang while running in HS mode
Date: 2010-05-13 01:49:15
Message-ID: AANLkTilKfOdUhx5rZSPp8hx2GbLCyV0ecb-Arq1G9QgF@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 13, 2010 at 3:50 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> rhaas=# rollback;
> ROLLBACK
>
> So at this point, one would think that there are no locks hanging
> around anywhere.  Back to the standby:
>
> rhaas=# select * from pgbench_accounts;
> <really long hang>

I think that this problem happens because the WAL record of ROLLBACK
is not flushed to the disk immediately (i.e., until another transaction
flushes the WAL records in wal_buffers) when we execute the ROLLBACK
command. The walsender sends only the WAL records in the disk, so the
standby server would not be able to replay the ROLLBACK and not release
the lock.

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-05-13 01:59:07 Re: comment needs to be updated for HS?
Previous Message Robert Haas 2010-05-13 01:01:04 recovery getting interrupted is not so unusual as it used to be