Re: weird hang while running in HS mode - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: weird hang while running in HS mode
Date
Msg-id 1273744037.308.1456.camel@ebony
Whole thread Raw
In response to Re: weird hang while running in HS mode  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: weird hang while running in HS mode
List pgsql-hackers
On Thu, 2010-05-13 at 10:49 +0900, Fujii Masao wrote:
> On Thu, May 13, 2010 at 3:50 AM, Robert Haas <robertmhaas@gmail.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.

Rollbacks are always flushed to disk, so this explanation doesn't work.
Even if it were it would take no longer than ~1 sec if everything were
working correctly on the test system.

The "weird hang" is a lock wait and is perfectly normal in database
systems. Robert says he hasn't checked whether it is reproduceable, so
there is no evidence to show there is anything other than pilot error,
at this point.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Retiring from the PostgreSQL core team
Next
From: Fujii Masao
Date:
Subject: Re: weird hang while running in HS mode