Revive test of concurrent OID generation.

Commit 578b229718 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
This commit is contained in:
Noah Misch 2019-07-13 13:34:22 -07:00
parent 39aadc9842
commit 8a0cbb8852
1 changed files with 5 additions and 12 deletions

View File

@ -58,27 +58,20 @@ sub pgbench
return; return;
} }
# Test concurrent insertion into table with serial column. This # Test concurrent OID generation via pg_enum_oid_index. This indirectly
# indirectly exercises LWLock and spinlock concurrency. This test # exercises LWLock and spinlock concurrency.
# makes a 5-MiB table. my $labels = join ',', map { "'l$_'" } 1 .. 1000;
$node->safe_psql('postgres',
'CREATE UNLOGGED TABLE insert_tbl (id serial primary key); ');
pgbench( pgbench(
'--no-vacuum --client=5 --protocol=prepared --transactions=25', '--no-vacuum --client=5 --protocol=prepared --transactions=25',
0, 0,
[qr{processed: 125/125}], [qr{processed: 125/125}],
[qr{^$}], [qr{^$}],
'concurrent insert workload', 'concurrent OID generation',
{ {
'001_pgbench_concurrent_insert' => '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 # Trigger various connection errors
pgbench( pgbench(
'no-such-database', 'no-such-database',