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 <alvhe...@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to