From: Alexander Popkov <voodoo@wenet.ru>
To: pgsql-php@postgresql.org, Paul & Natalie T <pntil@shentel.net>
Subject: Re: LOCKing method in my situation?
Date: Mon, 2 Feb 2004 00:14:23 +0300
Message-ID: <55394977757.20040202001423@wenet.ru> (raw)
In-Reply-To: <401D5A61.9000509@shentel.net>
References: <62364058618.20040201153901@wenet.ru>
<401D5A61.9000509@shentel.net>
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@wenet.ru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: voodoo@wenet.ru, pntil@shentel.net
Subject: Re: LOCKing method in my situation?
In-Reply-To: <55394977757.20040202001423@wenet.ru>
References: <62364058618.20040201153901@wenet.ru> <401D5A61.9000509@shentel.net> <55394977757.20040202001423@wenet.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox