mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 17:40:37 +00:00
Merge branch 'main' into bojan-psbench-over-kvstore
This commit is contained in:
@@ -49,7 +49,15 @@ def test_random_writes(zenith_with_baseline: PgCompare):
|
||||
count integer default 0
|
||||
);
|
||||
""")
|
||||
cur.execute(f"INSERT INTO Big (pk) values (generate_series(1,{n_rows}))")
|
||||
|
||||
# Insert n_rows in batches to avoid query timeouts
|
||||
rows_inserted = 0
|
||||
while rows_inserted < n_rows:
|
||||
rows_to_insert = min(1000 * 1000, n_rows - rows_inserted)
|
||||
low = rows_inserted + 1
|
||||
high = rows_inserted + rows_to_insert
|
||||
cur.execute(f"INSERT INTO Big (pk) values (generate_series({low},{high}))")
|
||||
rows_inserted += rows_to_insert
|
||||
|
||||
# Get table size (can't be predicted because padding and alignment)
|
||||
cur.execute("SELECT pg_relation_size('Big');")
|
||||
|
||||
@@ -17,8 +17,8 @@ import pytest
|
||||
# into memory in the page server.
|
||||
pytest.param(100000, 100, 0),
|
||||
# Also test with a larger table, with and without parallelism
|
||||
pytest.param(10000000, 1, 0, marks=pytest.mark.slow),
|
||||
pytest.param(10000000, 1, 4, marks=pytest.mark.slow)
|
||||
pytest.param(10000000, 1, 0),
|
||||
pytest.param(10000000, 1, 4)
|
||||
])
|
||||
def test_seqscans(zenith_with_baseline: PgCompare, rows: int, iters: int, workers: int):
|
||||
env = zenith_with_baseline
|
||||
|
||||
Reference in New Issue
Block a user