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

Re: LOCKing method in my situation?

From: Alexander Popkov <voodoo(at)wenet(dot)ru>
To: pgsql-php(at)postgresql(dot)org, Paul & Natalie T <pntil(at)shentel(dot)net>
Subject: Re: LOCKing method in my situation?
Date: 2004-02-01 21:14:23
Message-ID: 55394977757.20040202001423@wenet.ru (view raw or flat)
Thread:
Lists: pgsql-php
Hello Paul,

Sunday, February 1, 2004, 10:58:25 PM, you wrote:

PNT> Alexander:

PNT> It sounds like a lock preventing concurrent writes would be your best 
PNT> bet.  This would mean that only one instance of your script can be 
PNT> *changing* the table at one time, but it has no effect on transactions 
PNT> that only read from that.

PNT> If I read the docs correctly:
PNT> http://www.postgresql.org/docs/7.4/static/explicit-locking.html

PNT> You want to obtain a ROW EXCLUSIVE lock, e.g.,

PNT> LOCK TABLE <table name> IN ROW EXCLUSIVE;

Thanks! I am read this doc carefully. I am understand what i need:
i need _any_ lock method, which conflicts along, but not conflict with
ROW SHARE MODE (for working concurrent selects). I am choose
IN SHARE UPDATE EXCLUSIVE MODE and test it on 3 pgsql consoles - it
worked ;)

Big thanks!

-- 
Best regards,
 Alexander                            mailto:voodoo(at)wenet(dot)ru


In response to

pgsql-php by date

Next:From: Muhyiddin A.M HayatDate: 2004-02-02 04:55:27
Subject: Load Image from File to Store in ByteA Field
Previous:From: Paul & Natalie TDate: 2004-02-01 19:58:25
Subject: Re: LOCKing method in my situation?

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