pgsql: Improve error messages in md.c.

Поиск
Список
Период
Сортировка
От heikki@postgresql.org (Heikki Linnakangas)
Тема pgsql: Improve error messages in md.c.
Дата
Msg-id 20090805180154.F264D75331E@cvs.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Improve error messages in md.c.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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:
--------------
    pgsql/src/backend/storage/file:
        fd.c (r1.149 -> r1.150)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/file/fd.c?r1=1.149&r2=1.150)
    pgsql/src/backend/storage/smgr:
        md.c (r1.148 -> r1.149)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/md.c?r1=1.148&r2=1.149)
    pgsql/src/include/storage:
        fd.h (r1.64 -> r1.65)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/fd.h?r1=1.64&r2=1.65)

В списке pgsql-committers по дате отправления:

Предыдущее
От: joe@postgresql.org (Joe Conway)
Дата:
Сообщение: pgsql: Implement dblink_get_notify().
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Add matchorig, matchsynonyms, and keepsynonyms options to