Re: OperationalError: FATAL: lock AccessShareLock on object 0/1260/0 is already
daveg <daveg@sonic.net>
From: daveg <daveg@sonic.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2011-08-23T07:24:47Z
Lists: pgsql-hackers
Attachments
- lock_already_held_print.patch (text/plain)
On Sun, Aug 14, 2011 at 12:16:39AM -0400, Robert Haas wrote: > On Fri, Aug 12, 2011 at 7:19 PM, daveg <daveg@sonic.net> wrote: > > This seems to be bug month for my client. Now there are seeing periods > > where all new connections fail immediately with the error: > > > > FATAL: lock AccessShareLock on object 0/1260/0 is already held ... > > What can I do to help track this down? > > I've seen that error (though not that exact fact pattern) caused by > bad RAM. It's unclear to me what else could cause it. > > In terms of debugging, it seems like it might be sensible to start by > injecting some debugging code that dumps out the contents of the LOCK > and LOCALLOCK structures at the point the error occurs. I've made up the attached patch to print this, please suggest any additions. I'll deploy this on a couple of the production hosts that have had the issue this evening, but there is no telling when or if it will strike next. -dg -- David Gould daveg@sonic.net 510 536 1443 510 282 0869 If simplicity worked, the world would be overrun with insects.