Re: pg_locks.relation question

2018-04-18 Thread Daniel Westermann
On Wed, Apr 18, 2018 at 5:35 PM, Daniel Westermann < [ mailto:daniel.westerm...@dbi-services.com | daniel.westerm...@dbi-services.com ] > wrote: Hi, session one: locks=# begin; BEGIN locks=# alter table test add column b text; ALTER TABLE locks=# Session 2 querying pg_locks for the

Re: pg_locks.relation question

2018-04-18 Thread Pavan Deolasee
On Wed, Apr 18, 2018 at 5:35 PM, Daniel Westermann < daniel.westerm...@dbi-services.com> wrote: > 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 locktyp

pg_locks.relation question

2018-04-18 Thread Daniel Westermann
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 | mod