mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-05 20:42:54 +00:00
Perform seqscan to fill LFC chunks with data so that on-disk file size included size of table (#10775)
## Problem See https://github.com/neondatabase/neon/issues/10755 Random access pattern of pgbench leaves sparse chunks, which makes the on-disk size of file.cache unpredictable. ## Summary of changes Perform seqscan to fill LFC chunks with data so that on-disk file size included size of table. --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
This commit is contained in:
committed by
GitHub
parent
3e8bf2159d
commit
8bdb1828c8
@@ -72,6 +72,11 @@ def test_lfc_resize(neon_simple_env: NeonEnv, pg_bin: PgBin):
|
||||
|
||||
thread.join()
|
||||
|
||||
# Fill LFC: seqscan should fetch the whole table in cache.
|
||||
# It is needed for further correct evaluation of LFC file size
|
||||
# (a sparse chunk of LFC takes less than 1 MB on disk).
|
||||
cur.execute("select sum(abalance) from pgbench_accounts")
|
||||
|
||||
# Before shrinking the cache, check that it really is large now
|
||||
(lfc_file_size, lfc_file_blocks) = get_lfc_size()
|
||||
assert int(lfc_file_blocks) > 128 * 1024
|
||||
|
||||
Reference in New Issue
Block a user