Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and
Date
Msg-id 20081103151433.GH4509@alvh.no-ip.org
Whole thread Raw
In response to Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-committers
>> 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.

pgsql-committers by date:

Previous
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Fix mistakes in comment headers
Next
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Update URL to Docbook DSSSL stylesheets, per Gabriele Bartolini.