postgres/contrib/pg_walinspect
Michael Paquier b81a71aa05 Assign error codes where missing for user-facing failures
All the errors triggered in the code paths patched here would cause the
backend to issue an internal_error errcode, which is a state that should
be used only for "can't happen" situations.  However, these code paths
are reachable by the regression tests, and could be seen by users in
valid cases.  Some regression tests expect internal errcodes as they
manipulate the backend state to cause corruption (like checksums), or
use elog() because it is more convenient (like injection points), these
have no need to change.

This reduces the number of internal failures triggered in a check-world
by more than half, while providing correct errcodes for these valid
cases.

Reviewed-by: Robert Haas
Discussion: https://postgr.es/m/Zic_GNgos5sMxKoa@paquier.xyz
2024-07-04 09:48:40 +09:00
..
expected During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo point. 2023-10-19 14:47:29 -04:00
sql During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo point. 2023-10-19 14:47:29 -04:00
.gitignore
Makefile Refactor and improve tests of pg_walinspect 2023-03-13 13:03:29 +09:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_walinspect--1.0--1.1.sql Add show_data option to pg_get_wal_block_info. 2023-03-31 14:02:52 -07:00
pg_walinspect--1.0.sql Use float8 datatype for percentiles in pg_walinspect stat functions 2022-09-12 10:01:00 +02:00
pg_walinspect.c Assign error codes where missing for user-facing failures 2024-07-04 09:48:40 +09:00
pg_walinspect.control pg_walinspect: Add pg_get_wal_fpi_info() 2023-01-23 13:55:18 +09:00
walinspect.conf Fix buildfarm failures in pg_walinspect tests. 2022-04-08 03:21:12 -07:00