diff options
| author | John Naylor | 2024-04-07 05:27:34 +0000 |
|---|---|---|
| committer | John Naylor | 2024-04-08 07:39:49 +0000 |
| commit | 8a1b31e6e59631807a08a4e9465134c343bbdf5e (patch) | |
| tree | 72f147d6442438d8ce033c981a90a7b9c43a904c /src/test | |
| parent | bb766cde63b4f624d029b34c9cdd3d0a94fd5b46 (diff) | |
Use bump context for TID bitmaps stored by vacuum
Vacuum does not pfree individual entries, and only frees the entire
storage space when finished with it. This allows using a bump context,
eliminating the chunk header in each leaf allocation. Most leaf
allocations will be 16 to 32 bytes, so that's a significant savings.
TidStoreCreateLocal gets a boolean parameter to indicate that the
created store is insert-only.
This requires a separate tree context for iteration, since we free
the iteration state after iteration completes.
Discussion: https://postgr.es/m/CANWCAZac%3DpBePg3rhX8nXkUuaLoiAJJLtmnCfZsPEAS4EtJ%3Dkg%40mail.gmail.com
Discussion: https://postgr.es/m/CANWCAZZQFfxvzO8yZHFWtQV+Z2gAMv1ku16Vu7KWmb5kZQyd1w@mail.gmail.com
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/modules/test_tidstore/test_tidstore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/modules/test_tidstore/test_tidstore.c b/src/test/modules/test_tidstore/test_tidstore.c index 32c6c477b72..0a3a58722de 100644 --- a/src/test/modules/test_tidstore/test_tidstore.c +++ b/src/test/modules/test_tidstore/test_tidstore.c @@ -116,7 +116,8 @@ test_create(PG_FUNCTION_ARGS) dsa_pin_mapping(TidStoreGetDSA(tidstore)); } else - tidstore = TidStoreCreateLocal(tidstore_max_size); + /* VACUUM uses insert only, so we test the other option. */ + tidstore = TidStoreCreateLocal(tidstore_max_size, false); tidstore_empty_size = TidStoreMemoryUsage(tidstore); |
