Partitioned tables and locks - Mailing list pgsql-general

From James Sewell
Subject Partitioned tables and locks
Date
Msg-id CAANVwEuOb+B9y2P7h0NruC-dAmf2p1xLJSjm5UMXwTBPAxtjvg@mail.gmail.com
Whole thread Raw
Responses Re: Partitioned tables and locks
List pgsql-general
Is it expected that a lock on a partitioned table will take out 2 locks per child regardless of the number of children which are excluded at plan time?

For example I can select count(*) from a table with 3500 partitions in transaction, and see 7000 AccessShareLocks show up till I finish the transaction.

Bonus question - sometimes if I query pg_locks fast enough I can see ~30K locks - how could this possibly be the case. This is on an otherwise idle system.

Cheers,
James


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

pgsql-general by date:

Previous
From: Olivier Gautherot
Date:
Subject: Re: READ UNCOMMITTED in postgres
Next
From: Andrey Borodin
Date:
Subject: Commit to primary with unavailable sync standby