Re: offline consistency check and info on attributes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: offline consistency check and info on attributes
Дата
Msg-id 1303748073-sup-5070@alvh.no-ip.org
обсуждение исходный текст
Ответ на offline consistency check and info on attributes  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: offline consistency check and info on attributes  (Tomas Vondra <tv@fuzzy.cz>)
Re: offline consistency check and info on attributes  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-hackers
Excerpts from Tomas Vondra's message of dom abr 24 13:49:31 -0300 2011:

> Right now I do have a very simple tool that reads a given file and
> performs a lot of checks at the block level (as described in bufpage.h),
> and the next step should be validating basic structure of the tuples
> (lengths). And that's the point where I'm stuck right now - I'm thinking
> what might be the most elegant way to get info about attributes, without
> access to the pg_attribute catalog (the tool is intended for offline
> checks).

Each tuple declares its length.  You don't need to know each attribute's
length to check that.  Doing attribute-level checks is probably
pointless without catalog access.

> I've figured out the catalog-to-file mapping (in relmapper.c), but now
> I'm wondering - it's just another relation, so I'd have to read the
> block, parse the items and interpret them (not sure how to do that
> without the pg_attribute data itself). So I wonder - what would be an
> elegant solution?

This reminds me -- we need to have pg_filedump be able to dump the
relmapper stuff.  I was going to write a patch for it but then I forgot.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Aidan Van Dyk
Дата:
Сообщение: Re: Extension Packaging
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Extension Packaging