From: | Torsten Förtsch <torsten(dot)foertsch(at)gmx(dot)net> |
---|---|
To: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | locks held during commit with synchronous replication |
Date: | 2013-10-21 16:38:06 |
Message-ID: | 5265586E.10800@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I noticed that with synchronous replication I often see locks like this:
-[ RECORD 10 ]-----+--------------------
locktype | object
database | 0
relation |
page |
tuple |
virtualxid |
transactionid |
classid | 1262
objid | 0
objsubid | 0
virtualtransaction | 13/42806
pid | 9794
mode | AccessExclusiveLock
granted | t
fastpath | f
According to the manual classid is an oid in pg_class. If so, the 1262
resolves to pg_database. What objid=0 means, I have no idea.
For how long is this lock held?
Am I right in assuming that it is held from the start of the commit
until the transaction is streamed and written to disk by the synchronous
replica?
Does that mean that only one transaction can be committed at a time? I
have to admit I haven't thought much about that before. Lock contention
has never been a problem here.
Thanks,
Torsten
From | Date | Subject | |
---|---|---|---|
Next Message | Moshe Jacobson | 2013-10-21 16:43:21 | Re: Bug? Function with side effects not evaluated in CTE |
Previous Message | Stephen Frost | 2013-10-21 16:36:38 | Re: pg_dump resulting in excessive memory use by postmaster process |