Re: Thanks, naming conventions, and count() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Thanks, naming conventions, and count()
Date
Msg-id 15231.988645476@sss.pgh.pa.us
Whole thread Raw
In response to Re: Thanks, naming conventions, and count()  (Vince Vielhaber <vev@michvhf.com>)
Responses Re: Thanks, naming conventions, and count()  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Vince Vielhaber <vev@michvhf.com> writes:
>> Oh, you did a direct postgres backend connect.  Yes, that will work
>> fine.  Good idea if the postmaster is down.  I originally thought you
>> meant reading the pg_class file raw.  Of course, that would be really
>> hard because there is no way to know what numeric file is pg_class!

> But would it work on a crashed database that won't come up

No.

It's not that hard to know "which numeric file is pg_class" --- that
info has to be hard-wired in at some level.  (The backends cannot learn
pg_class's own relfilenode number by examining its pg_class entry...)

It might be worth making a simple utility (could be based on Bryan
White's pg_check) to grovel through the raw pg_class bits and extract
relfilenode info the hard way.  You'd only need it in certain disaster
scenarios, but when you did need it you'd need it bad.

So far we have not seen a report of a situation where this seemed to be
useful, so I'm not that excited about having it... WAL dump and
interrogation utilities are higher on my want list.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: SAPDB Open Souce
Next
From: Tom Lane
Date:
Subject: Re: Re: Any optimizations to the join code in 7.1?