blocking issue when create index concurrently

From: xu jian <jamesxu(at)outlook(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: blocking issue when create index concurrently
Date: 2016-12-14 23:21:13
Message-ID: MWHPR20MB1421AEC7CEC67B159AC188F6A19A0@MWHPR20MB1421.namprd20.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

I was trying to create 2 indexes concurrently(on different table) in same database. I didn't expect the first create index operation would block the other one since they were running on different table.

However, it is not true. I found one creating index command was blocking the other one.

so I run the lock dependency query which I find from https://wiki.postgresql.org/wiki/Lock_dependency_information,

blocker_target | blocker_pid | blocker_mode | depth | target | pid | mode | seq
-----------------------------+-------------+---------------+-------+-----------------------------+-------+-----------+-------------
(virtualxid,,,,,1/2069,,,,) | 69466 | ExclusiveLock | 1 | (virtualxid,,,,,1/2069,,,,) | 69611 | ShareLock | 69466,69611

from pg_locks, I can only see locktype is virtualxid, and there is no relation info.
does anyone know why the blocking happens? I guess it might be blocked on system view or tables, but just guess.

thanks

James

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sébastien Beausoleil 2016-12-15 15:07:14 Database corrupted - PSQL 9.3 Ubuntu Server 14.04
Previous Message Achilleas Mantzios 2016-12-14 15:12:27 Re: postgres account disabled . version 9.2