Re: [HACKERS] offline consistency check and info on attributes

2011-04-26 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tomas Vondra's message of mar abr 26 17:39:19 -0300 2011: >> Dne 25.4.2011 18:16, Alvaro Herrera napsal(a): >> I think I'll move the integrity check to the db, so that it's possible >> to check the column lengths etc. (pageinspect seems like a good module >>

Re: [HACKERS] offline consistency check and info on attributes

2011-04-26 Thread Alvaro Herrera
Excerpts from Tomas Vondra's message of mar abr 26 17:39:19 -0300 2011: > Dne 25.4.2011 18:16, Alvaro Herrera napsal(a): > > 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. > > Was this a polite questi

Re: [HACKERS] offline consistency check and info on attributes

2011-04-26 Thread Tomas Vondra
Dne 25.4.2011 18:16, Alvaro Herrera napsal(a): > Excerpts from Tomas Vondra's message of dom abr 24 13:49:31 -0300 2011: > >> 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

Re: [HACKERS] offline consistency check and info on attributes

2011-04-25 Thread Alvaro Herrera
Excerpts from Tomas Vondra's message of lun abr 25 14:50:18 -0300 2011: > Yes, I know the tuple length is in HeapTupleHeader (and I'm already > checking that), but that does not allow to check lengths of the > individual columns, especially those with varlena types. > > That's a very annoying typ

Re: [HACKERS] offline consistency check and info on attributes

2011-04-25 Thread Tomas Vondra
Dne 25.4.2011 18:16, Alvaro Herrera napsal(a): > 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 b

Re: [HACKERS] offline consistency check and info on attributes

2011-04-25 Thread Alvaro Herrera
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)

[HACKERS] offline consistency check and info on attributes

2011-04-24 Thread Tomas Vondra
Hi, a recent discussion about possible data corruption (in the general list) suggests that a tool for offline integrity check might be useful. Something that might be run when the database is shut down, to check that the data files are OK. The idea is to read all heap blocks and check for various