Re: preserving forensic information when we freeze

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: preserving forensic information when we freeze
Дата
Msg-id CA+TgmoYt-8YV4ucafntVu0BTAaR8fw-YWko79c+fCJ1=BM+vVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: preserving forensic information when we freeze  (Greg Stark <stark@mit.edu>)
Ответы Re: preserving forensic information when we freeze  (Andres Freund <andres@2ndquadrant.com>)
Re: preserving forensic information when we freeze  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Jan 2, 2014 at 12:26 AM, Greg Stark <stark@mit.edu> wrote:
>> I fail to see why.  What is so ugly about this:
>
>> select x.* from pgbench_accounts a, pg_tuple_header(a.tableoid, a.ctid) x;
>
> Two points:
>
> 1) it's a bit weird to go to this effort to eliminate system columns by
> using a scheme that depends on having a system column -- ctid
>
> 2) refetching a row could conceivably end up retrieving different data than
> was present when the row was originally read. (In some cases that might
> actually be the intended behaviour)
>
> If this came up earlier I'm sorry but I suppose it's too hard to have a
> function like foo(tab.*) which magically can tell that the record is a heap
> tuple and look in the header? And presumably throw an error if passed a non
> heap tuple.

Yeah, that was tried.  Doesn't work:

http://www.postgresql.org/message-id/CA+TgmoZWZZw_wr8aDHWc8iEjWEiHXLPXRaNqyrfb8mw0schEhg@mail.gmail.com

At any rate, my goal isn't really to get rid of system columns, but to
address Jim Nasby's gripe that the changes thus far committed make it
difficult to use system columns to determine whether a given tuple has
been frozen.  It sounds like the consensus is that a system column is
a better way of doing that than a function, so I suppose the next step
is to try to hammer out the details.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Rushabh Lathia
Дата:
Сообщение: ERROR: missing chunk number 0 for toast value
Следующее
От: "Erik Rijkers"
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)