pgsql: pgstattuple: Reject unlogged and temporary relations during reco
pgsql: pgstattuple: Reject unlogged and temporary relations during reco
От:
Michael Paquier <michael@paquier.xyz>
Дата:
pgstattuple: Reject unlogged and temporary relations during recovery Unlogged and temporary relations have no data on a standby, and trying to query these would lead to the following failures: ERROR: could not open file "base/MMM/NNN": No such file or directory These cases are now blocked with a much better error message. Temporary relations from other sessions were already blocked. pg_relpages() is an exception and can work for temp tables created by other sessions. While on it, the error messages are clarified to depend on the relkind. Some of the functions reported relkinds unrelated to the relation queried. Reported-by: Zsolt Parragi Author: Jim Jones Author: Kirill Reshke Author: Surya Poondla Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/82ba0876-6127-4770-b900-aa1bd52abfed@uni-muenster.de Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0091c241f6cffb2b163f18dea54c10d0b45090aa Modified Files -------------- contrib/pgstattuple/pgstatapprox.c | 11 ++--------- contrib/pgstattuple/pgstatindex.c | 36 +++++++++--------------------------- contrib/pgstattuple/pgstattuple.c | 37 +++++++++++++++++++++++++++++++------ contrib/pgstattuple/pgstattuple.h | 21 +++++++++++++++++++++ 4 files changed, 63 insertions(+), 42 deletions(-)