Re: JDBC problem

Поиск
Список
Период
Сортировка
От Cedar Cox
Тема Re: JDBC problem
Дата
Msg-id Pine.LNX.4.21.0008270849150.19334-100000@nanu.visionforisrael.com
обсуждение исходный текст
Ответ на Re: JDBC problem  (John McKown <jmckown@prodigy.net>)
Ответы Re: JDBC problem
Список pgsql-interfaces
On Fri, 25 Aug 2000, John McKown wrote:

[talking about sequences]

> > Question:  What happens when transactions enter the picture?  Will you get
> > duplicate values, or holes, or does it work just fine?
> 
> A good question to which I don't know the answer. 
> 
> However, after thinking about it a bit, I would guess that the sequence is
> "locked" for the duration of the transaction. This would imply that all
> other transactions which needed to access the sequence would be stalled
> until this transaction ended. When the transaction ended, then sequence
> would either have the highest number assigned so far, or would be rolled
> back to the same value it had when the transaction started.
> 
> The above is just my guess. If the sequence is not "locked", then I would
> guess that an aborted transaction would cause the sequence to end up with
> holes. Actually, multiple tables and fields can share a sequence (why
> would anybody do this?). 

I'm not sure either, but I'm sure it could be used for something
interesting..

> This means that a single table could have "holes" in the sequence.
>
> Under no circumstances would I expect duplicates.

This 'locking' thing was what I was wondering about.  If 'sequence
locking' does actually take place, I don't like the idea of other
transactions having to wait but it seems necessary.  On the other hand,
holes in a sequence shouldn't be an issue for us so 'no locking' would be
just fine.  Can someone confirm?  I just want to make sure I have a
correct understanding of how it works..

Thanks
-Cedar



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Peter Mount"
Дата:
Сообщение: Re: JDBC + large objects problem
Следующее
От: Joachim Achtzehnter
Дата:
Сообщение: Re: JDBC problem