pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: reiner peterke <zedaardv@drizzle.com>
To: Amador Alvarez <apradopg@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to track down locks held by recovery process on a slave?
Date: Sat, 5 Oct 2013 09:08:37 +0200
Message-ID: <FBEFAD41-BFC2-463F-8836-074DB85E1E6A@drizzle.com> (raw)
In-Reply-To: <CA+vGRtg+8wNugVByhLrhZX=SBnb7k9b9zZfOMPNo7nAEoRAu6w@mail.gmail.com>
References: <CA+vGRtg+8wNugVByhLrhZX=SBnb7k9b9zZfOMPNo7nAEoRAu6w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

First thought is make sure you are looking in the right database.

pg_locks shows data over the entire server, not just the connected database.
pg_class exists for each database  so if you are connected to 'my_database' but the object is in 'your_database', it won't show up in pg_class on 'my_database'.

check the database value in pg_locks to verify where you should be looking for the object.

reiner

On 5 okt 2013, at 00:48, Amador Alvarez <apradopg@gmail.com> wrote:

> Hi there,
> 
> I am using a postgres 9.2 slave for some reports and I noticed that sometimes they are held up because certain activity on the master like vacuums can affect long queries on a slave .
> 
> Looking at pg_locks view , I can see that the recovering process on the slave is holding some AccessExclusiveLock locks on relations which numbers that do not mach any pg_class.oid. 
> 
> Any idea How could I find out which relations are locked by the recovering process?
> 
> 
> Thanks in advance,
> A.A.



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (2+ messages)

Message-ID: <FBEFAD41-BFC2-463F-8836-074DB85E1E6A@drizzle.com>
Permalink:  ../FBEFAD41-BFC2-463F-8836-074DB85E1E6A@drizzle.com/
Also on:    postgresql.org/message-id/FBEFAD41-BFC2-463F-8836-074DB85E1E6A@drizzle.com

 · 

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-admin@postgresql.org
  Cc: zedaardv@drizzle.com, apradopg@gmail.com
  Subject: Re: How to track down locks held by recovery process on a slave?
  In-Reply-To: <FBEFAD41-BFC2-463F-8836-074DB85E1E6A@drizzle.com>

* 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