Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and
Date: 2008-11-03 15:14:33
Message-ID: 20081103151433.GH4509@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


>> 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.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2008-11-03 15:39:38 pgsql: Update URL to Docbook DSSSL stylesheets, per Gabriele Bartolini.
Previous Message Alvaro Herrera 2008-11-03 15:10:17 pgsql: Fix mistakes in comment headers

Browse pgsql-hackers by date

  From Date Subject
Next Message Dickson S. Guedes 2008-11-03 15:22:21 Re: Simple postgresql.conf wizard
Previous Message Tom Lane 2008-11-03 15:13:36 Re: don't use MAKE_PTR/OFFSET for shmem pointers