Re: PQdeleteTuple function in libpq

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: PQdeleteTuple function in libpq
Дата
Msg-id BANLkTi=oTCboHLx79ZzZEqJDy5LNsfvZzA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PQdeleteTuple function in libpq  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Thu, Jun 2, 2011 at 10:57 AM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Excerpts from Merlin Moncure's message of jue jun 02 11:33:28 -0400 2011:
>> On Thu, Jun 2, 2011 at 10:02 AM, Alvaro Herrera
>> <alvherre@commandprompt.com> wrote:
>
>> > Seems pretty wasteful if you want to delete a single tuple from a large
>> > result.  I think if you desired to compact the result to free some
>> > memory after deleting a large fraction of the tuples in the result it
>> > could be useful to do that, otherwise just live with the unused holes in
>> > the storage area as suggested by Pavel.
>>
>> That would work, but it would potentially invalidate external pointers
>> to internal result data.  If you wanted to do this, it might be better
>> to expose a compaction feature which can be invoked directly.
>
> Wouldn't that also invalidate external pointers?

sure -- but at least they are being deliberately invalidated instead
of automatically through some other function (i'm thinking about the
stl vector pointer invalidation issues here).  also since compaction
could be fairly slow, it would be hard to exactly judge when it should
be done.

merlin


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pgpool versus sequences
Следующее
От: Marko Kreen
Дата:
Сообщение: Re: Please test peer (socket ident) auth on *BSD