git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 56df07b) | patch
Add proper errcodes to new error messages for read() failures
2018年7月23日 00:37:36 +0000 (09:37 +0900)
2018年7月23日 00:37:36 +0000 (09:37 +0900)
commit e41d0a1090b75fed4c033c2e404643382348f88e
Add proper errcodes to new error messages for read() failures

Those would use the default ERRCODE_INTERNAL_ERROR, but for foreseeable
failures an errcode ought to be set, ERRCODE_DATA_CORRUPTED making the
most sense here.

While on the way, fix one errcode_for_file_access missing in origin.c
since the code has been created, and remove one assignment of errno to 0
before calling read(), as this was around to fit with what was present
before 811b6e36 where errno would not be set when not enough bytes are
read. I have noticed the first one, and Tom has pinged me about the
second one.

Author: Michael Paquier
Reported-by: Tom Lane
Discussion: https://postgr.es/m/27265.1531925836@sss.pgh.pa.us
src/backend/access/transam/xlog.c diff | blob | blame | history
src/backend/replication/logical/origin.c diff | blob | blame | history
src/backend/replication/logical/snapbuild.c diff | blob | blame | history
src/backend/replication/slot.c diff | blob | blame | history
src/backend/replication/walsender.c diff | blob | blame | history
src/backend/utils/cache/relmapper.c diff | blob | blame | history
src/common/controldata_utils.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /