Re: warm standby server stops doingcheckpointsafterawhile

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Frank Wittig <fw(at)weisshuhn(dot)de>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: warm standby server stops doingcheckpointsafterawhile
Date: 2007-06-04 09:54:50
Message-ID: 4663E16A.10706@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> <2007-06-01 23:00:00.001 CEST:%> LOG: GIN incomplete splits=8

Just to be sure: patch fixes *creating* of WAL log, not replaying. So, primary
db should be patched too.

During weekend I found possible deadlock in locking protocol in GIN between
concurrent UPDATE and VACUUM queries with the same GIN index involved. Strange,
but I didn't see it in 8.2 and even now I can't reproduce it. It's easy to
reproduce оnly on HEAD with recently added ReadBufferWithStrategy() call instead
of ReadBuffer(). ReadBufferWithStrategy() call was added to implement
limited-size "ring" of buffers for VACUUM. Nevertheless, it's a possible
scenario in 8.2.

Attached patch fixes that deadlock bug too. And, previous version of my patch
has a mistake which is observable on CREATE INDEX .. USING GIN query.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

Attachment Content-Type Size
patch_wal_gin.v6.gz application/x-tar 3.0 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2007-06-04 10:06:06 Re: warm standby server stops doingcheckpointsafterawhile
Previous Message Ragnar 2007-06-04 09:50:27 Re: simple select question