Re: INSERT WHERE NOT EXISTS

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: INSERT WHERE NOT EXISTS
Дата
Msg-id 5.2.1.1.1.20030627212624.02fa04c8@mbox.jaring.my
обсуждение исходный текст
Ответ на Re: INSERT WHERE NOT EXISTS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
At 10:05 AM 6/26/2003 -0400, Tom Lane wrote:

>Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> > (Related: I also suggested arbitrary user locks years back, but I wasn't
> > able to implement them.)
>
>Don't we have 'em already?  See contrib/userlock/.

Kinda.

The one I was thinking of was locking on an arbitrary string - which would
allows application level insert lock of even finer granularity amongst
other things.

You can then actually lock on stuff you are trying to insert and it won't
block other unrelated inserts.

Now that I think of it, one could achieve something possibly close enough
with the existing userlock, just lock on the first/last/hash 32 bits of the
data you want to insert. Sure some inserts will clash, but it's still
better than blocking all other inserts. The 16 bit group could be for the
tables.

D'oh. Sure took me a long while to realize this... <sheepish grin>.

Link.

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Vacuum (table performance)
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: developers.postgresql.org