Skip site navigation (1) Skip section navigation (2)

pgsql: Improve error messages in md.c.

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve error messages in md.c.
Date: 2009-08-05 18:01:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Improve error messages in md.c. When a filesystem operation like open() or
fsync() fails, say "file" rather than "relation" when printing the filename.

This makes messages that display block numbers a bit confusing. For example,
in message 'could not read block 150000 of file "base/1234/5678.1"', 150000
is the block number from the beginning of the relation, ie. segment 0, not
150000th block within that segment. Per discussion, users aren't usually
interested in the exact location within the file, so we can live with that.

To ease constructing error messages, add FilePathName(File) function to
return the pathname of a virtual fd.

Modified Files:
        fd.c (r1.149 -> r1.150)
        md.c (r1.148 -> r1.149)
        fd.h (r1.64 -> r1.65)


pgsql-committers by date

Next:From: Tom LaneDate: 2009-08-05 18:02:27
Subject: Re: [COMMITTERS] pgsql: Use DocBook XSL stylesheets for man page building This switches
Previous:From: Joe ConwayDate: 2009-08-05 16:11:07
Subject: pgsql: Implement dblink_get_notify().

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group