>> On Fri, 2008-10-31 at 15:05 +0000, Heikki Linnakangas wrote:
>>> Log Message:
>>> -----------
>>> Unite ReadBufferWithFork, ReadBufferWithStrategy, and ZeroOrReadBuffer
>>> functions into one ReadBufferExtended function, that takes the strategy
>>> and mode as argument. There's three modes, RBM_NORMAL which is the default
>>> used by plain ReadBuffer(), RBM_ZERO, which replaces ZeroOrReadBuffer, and
>>> a new mode RBM_ZERO_ON_ERROR, which allows callers to read corrupt pages
>>> without throwing an error. The FSM needs the new mode to recover from
>>> corrupt pages, which could happend if we crash after extending an FSM file,
>>> and the new page is "torn".
Hmm. I see that some messages are now like this:
(errmsg("unexpected data beyond EOF in block %u of relation %u/%u/%u/%u",
blockNum, smgr->smgr_rnode.spcNode, smgr->smgr_rnode.dbNode, smgr->smgr_rnode.relNode, forkNum),
but it seems that the file names contain symbolic fork names, not
numbers. Is it possible to build the error messages so that they report
the actual file name, or at least change the last /%u into a _%s with
the fork name?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.