Tom Lane wrote:
Thanks for the great info.Bryce Nesbitt <bry...@obviously.com> writes:1) Why the AccessExclusiveLock on create table?It has to install a trigger on the referenced table. There has been some discussion that maybe CREATE TRIGGER could take just ExclusiveLock and not AccessExclusiveLock, but it hasn't been done yet; and I'm not sure how much that would help you anyway. It would only help if the referenced table (contexts) is essentially read-only to the rest of your workload, else it'll block anyhow. In our case all the long running access is read-only. We have a poorly designed table that several postgres consultants have burned out on trying to fix. Most notably there are also zillions of short read-only references that presently block while the create table attempts to gain the AccessExclusiveLock. -Bryce |
- [SQL] AccessExclusiveLock on CREATE TABLE REFERENCES deadloc... Bryce Nesbitt
- Re: [SQL] AccessExclusiveLock on CREATE TABLE REFERENCE... Tom Lane
- Re: [SQL] AccessExclusiveLock on CREATE TABLE REFER... Bryce Nesbitt
- Re: [SQL] AccessExclusiveLock on CREATE TABLE REFERENCE... Erik Jones