aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2019-07-13 13:34:22 -0700
committerNoah Misch <noah@leadboat.com>2019-07-13 13:34:22 -0700
commit8a0cbb88524e8b6121597285b811640ee793b3e8 (patch)
tree3e1ef7df091b3f796204bc1444a12c406f3a8a96
parent39aadc984221f57ce7dc11dd3c8c719e10198549 (diff)
downloadpostgresql-8a0cbb88524e8b6121597285b811640ee793b3e8.tar.gz
postgresql-8a0cbb88524e8b6121597285b811640ee793b3e8.zip
Revive test of concurrent OID generation.
Commit 578b229718e8f15fa779e20f086c4b6bb3776106 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
-rw-r--r--src/bin/pgbench/t/001_pgbench_with_server.pl17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl
index dc2c72fa927..3b097a91b28 100644
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -58,27 +58,20 @@ sub pgbench
return;
}
-# Test concurrent insertion into table with serial column. This
-# indirectly exercises LWLock and spinlock concurrency. This test
-# makes a 5-MiB table.
-
-$node->safe_psql('postgres',
- 'CREATE UNLOGGED TABLE insert_tbl (id serial primary key); ');
-
+# Test concurrent OID generation via pg_enum_oid_index. This indirectly
+# exercises LWLock and spinlock concurrency.
+my $labels = join ',', map { "'l$_'" } 1 .. 1000;
pgbench(
'--no-vacuum --client=5 --protocol=prepared --transactions=25',
0,
[qr{processed: 125/125}],
[qr{^$}],
- 'concurrent insert workload',
+ 'concurrent OID generation',
{
'001_pgbench_concurrent_insert' =>
- 'INSERT INTO insert_tbl SELECT FROM generate_series(1,1000);'
+ "CREATE TYPE pg_temp.e AS ENUM ($labels); DROP TYPE pg_temp.e;"
});
-# cleanup
-$node->safe_psql('postgres', 'DROP TABLE insert_tbl;');
-
# Trigger various connection errors
pgbench(
'no-such-database',