On Wed, Jan 9, 2019 at 8:38 PM Michael Paquier <mich...@paquier.xyz> wrote: > On Wed, Jan 09, 2019 at 05:09:19PM -0800, Andres Freund wrote: > > IIRC we have other such errors including offset and length (and if > > not we'll grow some). It should be formatted as a genetic write > > error with the file name, no reference to log file, etc, even if > > there's no precedent. > > Yeah, there are a couple of them: > access/transam/xlog.c: > errmsg("could not read from log segment %s, offset %u: %m",
In smgr.c, we have: "could not read block %u in file \"%s\": %m" That seems to be the closet thing we have to a generic message template right now, but it's not entirely generic because it talks about blocks. Maybe we should go with something like: "could not read %u bytes in file \"%s\" at offset %u: %m" ...and use that for both WAL and smgr. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company