Skip to content

Commit 8a0cbb8

Browse files
committed
Revive test of concurrent OID generation.
Commit 578b229 replaced it with a concurrent "nextval" test. That version does not detect PostgreSQL's incompatibility with xlc 13.1.3, so bring back an OID-based test that does. Back-patch to v12, where that commit first appeared. Discussion: https://postgr.es/m/20190707170035.GA1485546@rfd.leadboat.com
1 parent 39aadc9 commit 8a0cbb8

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/bin/pgbench/t/001_pgbench_with_server.pl

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,20 @@ sub pgbench
5858
return;
5959
}
6060

61-
# Test concurrent insertion into table with serial column. This
62-
# indirectly exercises LWLock and spinlock concurrency. This test
63-
# makes a 5-MiB table.
64-
65-
$node->safe_psql('postgres',
66-
'CREATE UNLOGGED TABLE insert_tbl (id serial primary key); ');
67-
61+
# Test concurrent OID generation via pg_enum_oid_index. This indirectly
62+
# exercises LWLock and spinlock concurrency.
63+
my $labels = join ',', map { "'l$_'" } 1 .. 1000;
6864
pgbench(
6965
'--no-vacuum --client=5 --protocol=prepared --transactions=25',
7066
0,
7167
[qr{processed: 125/125}],
7268
[qr{^$}],
73-
'concurrent insert workload',
69+
'concurrent OID generation',
7470
{
7571
'001_pgbench_concurrent_insert' =>
76-
'INSERT INTO insert_tbl SELECT FROM generate_series(1,1000);'
72+
"CREATE TYPE pg_temp.e AS ENUM ($labels); DROP TYPE pg_temp.e;"
7773
});
7874

79-
# cleanup
80-
$node->safe_psql('postgres', 'DROP TABLE insert_tbl;');
81-
8275
# Trigger various connection errors
8376
pgbench(
8477
'no-such-database',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy