Hi,

Thanks for looking into the problem immediately.
I'll answer all questions that have been raised

1. What error message does it put out
I'm getting 2 messages. First message is 'ERROR: Can't serialize access due to concurrent update'. This is perfect. I am trying to access already locked rows.
In such a case I want to wait for other transactions to complete.
Whenever I got the message, I put a wait, and retry, programatically. I'm reopening the cursor programatically every 1 second, until the cursor open suceeds.
When I do this, it waits and goes thru the first few times.
After a few times, there lots of messages are spewed out in the postgres server log. A typical message looks like this.
NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally a
nd possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate you
r database system connection and exit.
Please reconnect to the database system and repeat your query.


2. I'm surprised that select for update is not implemented. I looked at the manual and it says this is implemented in v 6.5.1. So also my programs are behaving consistent with Select for Update (Giving conccurent access message on already locked rows).

3.I'm not sure whether what I want is
> > LOCK <<tablename>> IN ACCESS EXCLUSIVE MODE;
I'll have to test this.
What exactly I want is, I want the selects on transactions to wait till the main locking transaction updates and commits. I want to queue all requests in a serialzed fashion.

Thanks and regards,

Kimi


Date sent: Fri, 12 Nov 1999 08:25:15 +0700
From: Vadim Mikheev <[EMAIL PROTECTED]>
Organization: OJSC Rostelecom (Krasnoyarsk)
To: Marcin Inkielman <[EMAIL PROTECTED]>
Copies to: V Krishnaraj <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [GENERAL] Postgres concurrency : urgent

> Marcin Inkielman wrote:
> >
> > I 'm using :
> >
> > LOCK <<tablename>> IN ACCESS EXCLUSIVE MODE;
> ^^^^^^
> This blocks concurrent read access - is it what you really want?
>
> > to control concurrent transactions - it works for me
> > (postgres 6.5.2)
>
> Vadim
>
> ************
>
>



************


Reply via email to