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

From Heikki Linnakangas
Subject Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and
Date
Msg-id 49187678.4020209@enterprisedb.com
Whole thread Raw
In response to Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-committers
Heikki Linnakangas wrote:
> Alvaro Herrera wrote:
>> 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?
>
> Agreed. There was some messages like that before, this patch just
> changed some error messages I had missed before. I'll change them all to
> match the file names ("%u/%u/%u_%s").

I guess I should just change those error messages to use relpath().
relpath() seems perfectly safe to call from those places; there's e.g.
no catalog access.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-committers by date:

Previous
From: heikki@postgresql.org (Heikki Linnakangas)
Date:
Subject: pgsql: Fix 'Q' format char parsing in the new to_timestamp() code.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix bugs in sqlchar_to_unicode and unicode_to_sqlchar: both were