Re: preserving forensic information when we freeze

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: preserving forensic information when we freeze
Дата
Msg-id 3433.1388689412@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: preserving forensic information when we freeze  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: preserving forensic information when we freeze  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jan 2, 2014 at 12:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> In any case, upon further reflection I'm not convinced that doing this
>> with a SELECT-based query is the right thing, no matter whether the query
>> looks at a function or a system column; because by definition, you'll only
>> be able to see tuples that are visible to your current snapshot.  For real
>> forensics work, you need to be able to see all tuples, which makes me
>> think that something akin to pgstattuple is the right API; that is "return
>> a set of the header info for all tuples on such-and-such pages of this
>> relation".  That should dodge any performance problem, because the
>> heap_open overhead could be amortized across lots of tuples, and it also
>> sidesteps all problems with adding new system columns.

> I both agree and disagree with this.  I think that pgstattuple is
> useful, and I further agree that adding a stat to it about how much of
> the heap is frozen would be worthwhile.  However, an aggregate number
> isn't always what you want, and being able to scrutinize specific
> tuples is, I think, a useful thing.

Oh, I guess I referenced the wrong contrib module, because what I was
trying to propose is a function that returns a setof record, one row for
each physical tuple it finds.  There are some functions in
contrib/pageinspect that work like that, but not pgstattuple.  I don't
think pageinspect's API is ideal because it's tightly tied to processing
one page at a time, but it does show information a bit like what we need
here.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: preserving forensic information when we freeze
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)