From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: weird hang while running in HS mode |
Date: | 2010-05-13 09:47:17 |
Message-ID: | 1273744037.308.1456.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(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.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-05-13 10:08:05 | Re: weird hang while running in HS mode |
Previous Message | Andrew Dunstan | 2010-05-13 08:46:43 | Re: [HACKERS] Retiring from the PostgreSQL core team |