Thread: error report on slru.c
Hi all, here a patch that 1) Rise the information about the file missing on pg_clog from detail to error 2) Insert the offset information also for a missing file I did it with the 8.0beta2 sources Regards Gaetano Mendola --- slru.c.orig 2004-10-02 10:56:01.000000000 +0200 +++ slru.c 2004-10-02 11:05:40.000000000 +0200 @@ -634,9 +634,8 @@ case SLRU_OPEN_FAILED: ereport(ERROR, (errcode_for_file_access(), - errmsg("could not access status of transaction %u", xid), - errdetail("could not open file \"%s\": %m", - path))); + errmsg("could not access status of transaction %u" + "could not open file \"%s\": %m ( offset %u ) ", xid, path, offset))); break; case SLRU_CREATE_FAILED: ereport(ERROR,
Gaetano Mendola <mendola@bigfoot.com> writes: > here a patch that > 1) Rise the information about the file missing on pg_clog from > detail to error This violates the message style guidelines, IMHO. > 2) Insert the offset information also for a missing file It's hardly necessary, since the transaction number tells you everything you need to know if you really need it, and the offset is certainly not relevant to a file-open failure. regards, tom lane
Tom Lane wrote: > Gaetano Mendola <mendola@bigfoot.com> writes: > >>here a patch that >>1) Rise the information about the file missing on pg_clog from >> detail to error > > > This violates the message style guidelines, IMHO. Tom, your opinion is not humble but is is really appreciated, however I think that a missing file is not a "detail" information. >>2) Insert the offset information also for a missing file > > > It's hardly necessary, since the transaction number tells you everything > you need to know if you really need it, and the offset is certainly not > relevant to a file-open failure. Good to know, how is possible then retrive the informations about the file needed and the offset without rise the logs detail ? Regards Gaetano Mendola
Tom Lane wrote: > Gaetano Mendola <mendola@bigfoot.com> writes: > > here a patch that > > 1) Rise the information about the file missing on pg_clog from > > detail to error > > This violates the message style guidelines, IMHO. My first impression is that it should be swapped. The error is that the file could not be opened. The detail is that the files is related to transaction status information. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Peter Eisentraut <peter_e@gmx.net> writes: > Tom Lane wrote: >> This violates the message style guidelines, IMHO. > My first impression is that it should be swapped. The error is that the > file could not be opened. The detail is that the files is related to > transaction status information. No, the error is that the transaction status couldn't be accessed. The fact that it is stored in a file is implementation detail, and primary messages should not focus on implementation detail. regards, tom lane
Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.net> writes: > >>Tom Lane wrote: >> >>>This violates the message style guidelines, IMHO. > > >>My first impression is that it should be swapped. The error is that the >>file could not be opened. The detail is that the files is related to >>transaction status information. > > > No, the error is that the transaction status couldn't be accessed. The > fact that it is stored in a file is implementation detail, and primary > messages should not focus on implementation detail. Right, so the only way a DBA have is to look the details! Is there another way to know the file and the offset a transaction belong to ? Regards Gaetano Mendola