git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd85e9f)
Avoid rare race condition in privileges.sql regression test.
2018年10月16日 17:56:58 +0000 (13:56 -0400)
2018年10月16日 17:56:58 +0000 (13:56 -0400)
We created a temp table, then switched to a new session, leaving
the old session to clean up its temp objects in background. If that
took long enough, the eventual attempt to drop the user that owns
the temp table could fail, as exhibited today by sidewinder.
Fix by dropping the temp table explicitly when we're done with it.

It's been like this for quite some time, so back-patch to all
supported branches.

Report: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sidewinder&dt=2018年10月16日%2014%3A45%3A00


diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out
index aebc89c1b08431b980bdb5721e5cf599cab40bac..7d5d1f0bc1ea16d5a574eec40b31699c56fbce31 100644 (file)
--- a/src/test/regress/expected/privileges.out
+++ b/src/test/regress/expected/privileges.out
@@ -1189,6 +1189,7 @@ select has_column_privilege('mytable',2::int2,'select');
(1 row)
+drop table mytable;
-- Grant options
SET SESSION AUTHORIZATION regress_priv_user1;
CREATE TABLE atest4 (a int);
diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql
index 0c0bba6cf7fe47acfc97f10981bb20305c7bc8ee..cf9fa9f7823640a1d6423dd5e83174d38ee8fe7d 100644 (file)
--- a/src/test/regress/sql/privileges.sql
+++ b/src/test/regress/sql/privileges.sql
@@ -732,6 +732,7 @@ select has_column_privilege('mytable','........pg.dropped.2........','select');
select has_column_privilege('mytable',2::int2,'select');
revoke select on table mytable from regress_priv_user3;
select has_column_privilege('mytable',2::int2,'select');
+drop table mytable;
-- Grant options
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /