pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Westermann <daniel.westermann@dbi-services.com>
To: pgsql-general@postgresql.org
Subject: pg_locks.relation question
Date: Wed, 18 Apr 2018 14:05:37 +0200 (CEST)
Message-ID: <1717499812.27146.1524053137683.JavaMail.zimbra@dbi-services.com> (raw)

Hi, 

session one: 

locks=# begin; 
BEGIN 
locks=# alter table test add column b text; 
ALTER TABLE 
locks=# 

Session 2 querying pg_locks for the PID from above: 

locks=# select locktype,relation::regclass,mode from pg_locks where pid = 2026 and locktype = 'relation'; 
locktype | relation | mode 
----------+----------+--------------------- 
relation | test | AccessExclusiveLock 
relation | 17728 | AccessExclusiveLock 
relation | 17726 | ShareLock 
(3 rows) 

What are these 17728 and 17726 OIDs? Nothing else is happening except these two sessions. 

Thanks in advance 
Daniel 

view thread (3+ messages)  latest in thread

Message-ID: <1717499812.27146.1524053137683.JavaMail.zimbra@dbi-services.com>
Permalink:  ../1717499812.27146.1524053137683.JavaMail.zimbra@dbi-services.com/
Also on:    postgresql.org/message-id/1717499812.27146.1524053137683.JavaMail.zimbra@dbi-services.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: daniel.westermann@dbi-services.com
  Subject: Re: pg_locks.relation question
  In-Reply-To: <1717499812.27146.1524053137683.JavaMail.zimbra@dbi-services.com>
  References: <1717499812.27146.1524053137683.JavaMail.zimbra@dbi-services.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