From: | Vadim Mikheev <vadim(at)krs(dot)ru> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org, pgsql-sql(at)postgreSQL(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
Subject: | Re: [HACKERS] Re: [SQL] inserts/updates problem understressing ! |
Date: | 1999-07-26 02:50:28 |
Message-ID: | 379BCCF4.B95C7092@krs.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Robinson | 1999-07-26 04:12:39 | Re: [HACKERS] A multi-lang patch for psql 6.5.1 |
Previous Message | Philip Warner | 1999-07-26 02:43:56 | RFC: Security and Impersonation - Initial Plan |
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Jackson | 1999-07-26 04:04:50 | (no subject) |
Previous Message | Vadim Mikheev | 1999-07-26 02:43:00 | Re: [SQL] inserts/updates problem under stressing ! |