public inbox for [email protected]  
help / color / mirror / Atom feed
ROW SHARE/SELECT ... FOR UPDATE + foreign keys
2+ messages / 2 participants
[nested] [flat]

* ROW SHARE/SELECT ... FOR UPDATE + foreign keys
@ 2005-07-21 19:47 Thomas F. O'Connell <[email protected]>
  2005-07-22 05:13 ` Re: ROW SHARE/SELECT ... FOR UPDATE + foreign keys Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Thomas F. O'Connell @ 2005-07-21 19:47 UTC (permalink / raw)
  To: pgsql-docs

What would people think of adding a note to the ROW SHARE section of  
Table-Level Locks remarking on the fact that referential integrity  
checks expressed through foreign keys do SELECT ... FOR UPDATES.

http://www.postgresql.org/docs/8.0/static/explicit- 
locking.html#LOCKING-TABLES

It was somewhat challenging today to try to track down a pervasive  
locking issue related to a table not directly referenced in a stored  
procedure but that was referenced by a key in a table that was being  
updated.

I'm not sure how this changes with the new shared row locking  
implementation in 8.1...

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ROW SHARE/SELECT ... FOR UPDATE + foreign keys
  2005-07-21 19:47 ROW SHARE/SELECT ... FOR UPDATE + foreign keys Thomas F. O'Connell <[email protected]>
@ 2005-07-22 05:13 ` Bruce Momjian <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2005-07-22 05:13 UTC (permalink / raw)
  To: Thomas F. O'Connell <[email protected]>; +Cc: pgsql-docs

Thomas F. O'Connell wrote:
> What would people think of adding a note to the ROW SHARE section of  
> Table-Level Locks remarking on the fact that referential integrity  
> checks expressed through foreign keys do SELECT ... FOR UPDATES.
> 
> http://www.postgresql.org/docs/8.0/static/explicit- 
> locking.html#LOCKING-TABLES
> 
> It was somewhat challenging today to try to track down a pervasive  
> locking issue related to a table not directly referenced in a stored  
> procedure but that was referenced by a key in a table that was being  
> updated.
> 
> I'm not sure how this changes with the new shared row locking  
> implementation in 8.1...
> 

8.1 will use _shared_ row locks for such cases.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-07-22 05:13 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-21 19:47 ROW SHARE/SELECT ... FOR UPDATE + foreign keys Thomas F. O'Connell <[email protected]>
2005-07-22 05:13 ` Bruce Momjian <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox