Improve test coverage in bump.c
authorDavid Rowley <drowley@postgresql.org>
Tue, 16 Apr 2024 04:21:31 +0000 (16:21 +1200)
committerDavid Rowley <drowley@postgresql.org>
Tue, 16 Apr 2024 04:21:31 +0000 (16:21 +1200)
commitbea97cd02ebb347ab469b78673c2b33a72109669
tree3649cbfb67ca118da5101eac3a6287b83f294035
parent768ceeeaa127a8001d60ad6a62846a8be3f35d93
Improve test coverage in bump.c

There were no callers of BumpAllocLarge() in the regression tests, so
here we add a sort with a tuple large enough to use that path in bump.c.

Also, BumpStats() wasn't being called, so add a test to sysviews.sql to
call pg_backend_memory_contexts() while a bump context exists in the
backend.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/20240414223305.m3i5eju6zylabvln@awork3.anarazel.de
src/test/regress/expected/sysviews.out
src/test/regress/expected/tuplesort.out
src/test/regress/sql/sysviews.sql
src/test/regress/sql/tuplesort.sql