pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: yamt@mwd.biglobe.ne.jp
To: drkp@csail.mit.edu
Cc: pgsql-hackers@postgresql.org
Cc: Kevin.Grittner@wicourts.gov
Cc: heikki.linnakangas@enterprisedb.com
Subject: Re: SSI bug?
Date: Mon, 11 Apr 2011 03:57:19 +0000 (UTC)
Message-ID: <20110411035719.4839E19CF5D@mail.netbsd.org> (raw)
In-Reply-To: <20110407020210.D851019CF0A@mail.netbsd.org>
References: <20110407020210.D851019CF0A@mail.netbsd.org>

hi,

> hi,
> 
>> I think I see what is going on now. We are sometimes failing to set the
>> commitSeqNo correctly on the lock. In particular, if a lock assigned to
>> OldCommittedSxact is marked with InvalidSerCommitNo, it will never be
>> cleared.
>> 
>> The attached patch corrects this:
>>  TransferPredicateLocksToNewTarget should initialize a new lock
>>  entry's commitSeqNo to that of the old one being transferred, or take
>>  the minimum commitSeqNo if it is merging two lock entries.
>> 
>>  Also, CreatePredicateLock should initialize commitSeqNo for to
>>  InvalidSerCommitSeqNo instead of to 0. (I don't think using 0 would
>>  actually affect anything, but we should be consistent.)
>> 
>>  I also added a couple of assertions I used to track this down: a
>>  lock's commitSeqNo should never be zero, and it should be
>>  InvalidSerCommitSeqNo if and only if the lock is not held by
>>  OldCommittedSxact.
>> 
>> Takashi, does this patch fix your problem with leaked SIReadLocks?
> 
> i'm currently running bf6848bc8c82e82f857d48185554bc3e6dcf1013 with this
> patch applied.  i haven't seen the symptom yet.  i'll keep it running for
> a while.

i haven't seen the symptom since them.  so i guess it was fixed by
your patch.  thanks!

YAMAMOTO Takashi

> 
> btw, i've noticed the following message in the server log.  is it normal?
> 
> LOG:  could not truncate directory "pg_serial": apparent wraparound
> 
> YAMAMOTO Takashi
> 
>> 
>> Dan
>> 
>> 
>> -- 
>> Dan R. K. Ports              MIT CSAIL                http://drkp.net/
> 
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers



view thread (71+ messages)  latest in thread

Message-ID: <20110411035719.4839E19CF5D@mail.netbsd.org>
Permalink:  ../20110411035719.4839E19CF5D@mail.netbsd.org/
Also on:    postgresql.org/message-id/20110411035719.4839E19CF5D@mail.netbsd.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: yamt@mwd.biglobe.ne.jp, drkp@csail.mit.edu, Kevin.Grittner@wicourts.gov, heikki.linnakangas@enterprisedb.com
  Subject: Re: SSI bug?
  In-Reply-To: <20110411035719.4839E19CF5D@mail.netbsd.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox