From: Vadim Mikheev <vadim@krs.ru>
To: Philip Warner <pjw@rhyme.com.au>
Cc: pgsql-hackers@postgreSQL.org, pgsql-sql@postgreSQL.org, Oleg Bartunov <oleg@sai.msu.su>
Subject: Re: [HACKERS] Re: [SQL] inserts/updates problem understressing !
Date: Mon, 26 Jul 1999 10:50:28 +0800
Message-ID: <379BCCF4.B95C7092@krs.ru> (raw)
References: <3.0.5.32.19990725101824.00b92c50@mail.rhyme.com.au>
Philip Warner wrote:
>
> The usual way around this sort of problem is to update the counter as the
> first thing you do in any transaction. This locks the row and prevents any
> possible deadlock:
But if there was no record then nothing will be locked...
Without ability to read dirty data LOCK is the only way.
...
> diagnostics' is not yet applied (I may not have mailed it yet...), and I am
> not sure if plpgsql starts a new TX for each statment - if so, you need to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It doesn't.
> start a TX in the procedure, or prior to valling it.
Vadim
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-sql@postgresql.org
Cc: vadim@krs.ru, pjw@rhyme.com.au, oleg@sai.msu.su
Subject: Re: [HACKERS] Re: [SQL] inserts/updates problem understressing !
In-Reply-To: <379BCCF4.B95C7092@krs.ru>
References: <3.0.5.32.19990725101824.00b92c50@mail.rhyme.com.au> <379BCCF4.B95C7092@krs.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