mirror of
https://github.com/hanzoai/postgres.git
synced 2026-10-30 18:33:07 +00:00
An assertion test added in commit93393e7could fail when pg_prewarm() was called on objects without storage, such as partitioned tables. This resulted in the following failure in assert-enabled builds: Failed Assert("RelFileNumberIsValid(rlocator.relNumber)") Note that, in non-assert builds, pg_prewarm() just failed with an error in that case, so there was no ill effect in practice. This commit fixes the issue by having pg_prewarm() raise an error early if the specified object has no storage. This approach is similar to the fix in commitfb7767134for pg_freespacemap. Back-patched to v17, where the issue was introduced. Author: Masahiro Ikeda <[email protected]> Reviewed-by: Dilip Kumar <[email protected]> Reviewed-by: Richard Guo <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17
27 lines
566 B
Makefile
27 lines
566 B
Makefile
# contrib/pg_prewarm/Makefile
|
|
|
|
MODULE_big = pg_prewarm
|
|
OBJS = \
|
|
$(WIN32RES) \
|
|
autoprewarm.o \
|
|
pg_prewarm.o
|
|
|
|
EXTENSION = pg_prewarm
|
|
DATA = pg_prewarm--1.1--1.2.sql pg_prewarm--1.1.sql pg_prewarm--1.0--1.1.sql
|
|
PGFILEDESC = "pg_prewarm - preload relation data into system buffer cache"
|
|
|
|
REGRESS = pg_prewarm
|
|
|
|
TAP_TESTS = 1
|
|
|
|
ifdef USE_PGXS
|
|
PG_CONFIG = pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
include $(PGXS)
|
|
else
|
|
subdir = contrib/pg_prewarm
|
|
top_builddir = ../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
endif
|