Hi,


Thanks for looking into the problem immediately.

I'll answer all questions that have been raised


<bold>1. What error message does it put out</bold>

   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 

<color><param>7F00,0000,0000</param>> > LOCK <<<<tablename>> IN ACCESS EXCLUSIVE MODE;

</color>I'll have to test this.

<bold>What exactly I want is,</bold> 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 <<vadim@krs.ru>

Organization:   	OJSC Rostelecom (Krasnoyarsk)

To:             	Marcin Inkielman <<marn@wsisiz.edu.pl>

Copies to:      	V Krishnaraj <<kimi@intercept.co.in>, pgsql-general@postgreSQL.org

Subject:        	Re: [GENERAL] Postgres concurrency : urgent


<color><param>7F00,0000,0000</param>> 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

> 

> ************

> 

> 



<nofill>

