Re: [HACKERS] Last ID Problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Last ID Problem
Дата
Msg-id 20733.1107298226@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] Last ID Problem  (Neil Conway <neilc@samurai.com>)
Список pgsql-novice
Neil Conway <neilc@samurai.com> writes:
> On Tue, 2005-02-01 at 11:24 -0300, Alvaro Herrera wrote:
>> How about the TID?

> That wouldn't be sufficiently stable for use by client applications, I
> believe: a concurrent VACUUM FULL could mean your TID no longer points
> at what you think it does.

It'd be safe enough within the same transaction, since VACUUM can't kill
a tuple inserted by an open transaction; nor could VACUUM FULL touch the
table at all, since you'll be holding at least a writer's lock on the
table.

But this is all moot since INSERT/UPDATE RETURNING is really the way to
go, on grounds of functionality, speed, and not breaking backward
compatibility for existing client code.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Last ID Problem
Следующее
От: Akbar
Дата:
Сообщение: how to know which object depend of it?