summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/specs/fk-contention.spec
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
commit311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 (patch)
tree0ec307299b1dada3701e42f4ca6eda57d708261e /src/test/isolation/specs/fk-contention.spec
parentInitial commit. (diff)
downloadpostgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.tar.xz
postgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.zip
Adding upstream version 15.4.upstream/15.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/isolation/specs/fk-contention.spec')
-rw-r--r--src/test/isolation/specs/fk-contention.spec19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/isolation/specs/fk-contention.spec b/src/test/isolation/specs/fk-contention.spec
new file mode 100644
index 0000000..f11a1d8
--- /dev/null
+++ b/src/test/isolation/specs/fk-contention.spec
@@ -0,0 +1,19 @@
+setup
+{
+ CREATE TABLE foo (a int PRIMARY KEY, b text);
+ CREATE TABLE bar (a int NOT NULL REFERENCES foo);
+ INSERT INTO foo VALUES (42);
+}
+
+teardown
+{
+ DROP TABLE foo, bar;
+}
+
+session s1
+setup { BEGIN; }
+step ins { INSERT INTO bar VALUES (42); }
+step com { COMMIT; }
+
+session s2
+step upd { UPDATE foo SET b = 'Hello World'; }