From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: offline consistency check and info on attributes |
Date: | 2011-04-25 16:16:33 |
Message-ID: | 1303748073-sup-5070@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2011-04-25 16:17:12 | Re: Extension Packaging |
Previous Message | Aidan Van Dyk | 2011-04-25 16:14:32 | Re: Extension Packaging |