Skip site navigation (1) Skip section navigation (2)

question: foreign key constraints and AccessExclusive locks

From: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: question: foreign key constraints and AccessExclusive locks
Date: 2013-01-06 03:08:58
Message-ID: CAKuK5J0SY-oM0syve0eGggoxDvx6f9+4m9hYg6JpPQ7C2Bm0XQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
When adding a foreign key constraint on tableA which references
tableB, why is an AccessExclusive lock on tableB necessary? Wouldn't a
lock that prevents writes be sufficient, or does PostgreSQL have to
modify *both* tables in some fashion? I'm using PostgreSQL 8.4 on
Linux.

-- 
Jon


Responses

pgsql-hackers by date

Next:From: Tomas VondraDate: 2013-01-06 03:13:12
Subject: Re: too much pgbench init output
Previous:From: Tatsuo IshiiDate: 2013-01-06 02:03:18
Subject: Re: too much pgbench init output

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group