Re: select for update

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Craig James" <craig_james(at)emolecules(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: select for update
Date: 2011-04-22 20:25:05
Message-ID: 4DB19DD1020000250003CC02@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Craig James <craig_james(at)emolecules(dot)com> wrote:

> The sequence of operations goes like this (pseudo-code):

> The problem is that very occasionally the same ID will be issued
> twice. I don't see how this can be. Doesn't the "for update"
> guarantee that no other process can claim that same row?

I don't see a flaw in the pseudo-code (other than an apparent typo
on the insert). Can you show the actual code?

-Kevin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2011-04-22 20:58:44 Re: select for update
Previous Message Mario Splivalo 2011-04-22 18:35:18 Re: Reseting statistics, cluster wide