Wei Weng <[EMAIL PROTECTED]> writes:
> Do you need to unlock the table fifo when you are done?
That happens at COMMIT.
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECT
On Fri, Nov 01, 2002 at 14:18:37 -0500,
Wei Weng <[EMAIL PROTECTED]> wrote:
> Do you need to unlock the table fifo when you are done?
Locks only apply for the duration of a transaction. When you commit or
roleback the lock will be released.
---(end of broadcast)-
Do you need to unlock the table fifo when you are done?
On Fri, 2002-11-01 at 11:51, Tom Lane wrote:
> Chris Gamache <[EMAIL PROTECTED]> writes:
> > I have a program that claims a row for itself
>
> > my $processid = $$;
> > my $sql_update = < > UPDATE fifo
> > set status=$processid
Chris Gamache <[EMAIL PROTECTED]> writes:
> I have a program that claims a row for itself
> my $processid = $$;
> my $sql_update = < UPDATE fifo
> set status=$processid
> WHERE id = (SELECT min(id) FROM fifo WHERE status=0);
> EOS
> The problem occurrs when two of the processes
On Fri, Nov 01, 2002 at 06:56:30 -0800,
Chris Gamache <[EMAIL PROTECTED]> wrote:
>
> The problem occurrs when two of the processes grab the exact same row at the
> exact same instant. It happens roughly 1 out of 1000 times. I'm not sure if
> setting the transactions to serializable would fix the
On Friday 01 Nov 2002 2:56 pm, Chris Gamache wrote:
> I'm having a race condition with a FIFO queue program that I've created...
> I have a program that claims a row for itself
[code sample]
> The problem occurrs when two of the processes grab the exact same row at
> the exact same instant. It h