Re: Postgres concurrency : urgent

From: "V Krishnaraj" <kimi(at)intercept(dot)co(dot)in>
To: Marcin Inkielman <marn(at)wsisiz(dot)edu(dot)pl>, Vadim Mikheev <vadim(at)krs(dot)ru>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: Postgres concurrency : urgent
Date: 1999-11-12 14:42:10
Message-ID: 199911120405.VAA29508@intercept-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)krs(dot)ru>

Organization: OJSC Rostelecom (Krasnoyarsk)

To: Marcin Inkielman <<marn(at)wsisiz(dot)edu(dot)pl>

Copies to: V Krishnaraj <<kimi(at)intercept(dot)co(dot)in>, pgsql-general(at)postgreSQL(dot)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>

Attachment Content-Type Size
unknown_filename text/enriched 2.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Kline 1999-11-12 14:58:01 Re: [GENERAL] troubles with datestyle
Previous Message jose soares 1999-11-12 14:17:09 Re: [GENERAL] About Date field