Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1dc7ca1

Browse filesBrowse files
committed
Switched to transactions
1 parent 898b976 commit 1dc7ca1
Copy full SHA for 1dc7ca1

1 file changed

+4-10Lines changed: 4 additions & 10 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/t/047_hnsw_vacuum_write.pl‎

Copy file name to clipboardExpand all lines: test/t/047_hnsw_vacuum_write.pl
+4-10Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,15 @@
2121
$node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v vector_l2_ops);");
2222

2323
$node->pgbench(
24-
"--no-vacuum --client=5 --time=1",
24+
"--no-vacuum --client=5 --transactions=1000",
2525
0,
2626
[qr{actually processed}],
2727
[qr{^$}],
2828
"VACUUM write",
2929
{
30-
"047_hnsw_vacuum_write_insert" => "INSERT INTO tst (v) VALUES (ARRAY[$array_sql]);",
31-
"047_hnsw_vacuum_write_delete" => "DELETE FROM tst WHERE i = (SELECT i FROM tst ORDER BY i LIMIT 1 FOR UPDATE SKIP LOCKED);",
32-
"047_hnsw_vacuum_write_vacuum" => q(
33-
SELECT pg_try_advisory_lock(42)::integer AS gotlock \gset
34-
\if :gotlock
35-
VACUUM tst;
36-
SELECT pg_advisory_unlock(42);
37-
\endif
38-
)
30+
"047_hnsw_vacuum_write_insert\@500" => "INSERT INTO tst (v) VALUES (ARRAY[$array_sql]);",
31+
"047_hnsw_vacuum_write_delete\@500" => "DELETE FROM tst WHERE i = (SELECT i FROM tst ORDER BY i LIMIT 1 FOR UPDATE SKIP LOCKED);",
32+
"047_hnsw_vacuum_write_vacuum\@1" => "VACUUM tst;"
3933
}
4034
);
4135

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.