diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-10-16 13:56:58 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-10-16 13:56:58 -0400 |
commit | 7bee1d520d12e5880a733e4b1c1fb53bf69df03a (patch) | |
tree | 674b931eae26f797f58b4d1075856de21db47add /src | |
parent | 0a576cd2a9ab8267720709481cdbbd5e06988821 (diff) | |
download | postgresql-7bee1d520d12e5880a733e4b1c1fb53bf69df03a.tar.gz postgresql-7bee1d520d12e5880a733e4b1c1fb53bf69df03a.zip |
Avoid rare race condition in privileges.sql regression test.
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
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/privileges.out | 1 | ||||
-rw-r--r-- | src/test/regress/sql/privileges.sql | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out index ec84ea0e259..b7b8c813a03 100644 --- a/src/test/regress/expected/privileges.out +++ b/src/test/regress/expected/privileges.out @@ -1155,6 +1155,7 @@ select has_column_privilege('mytable',2::int2,'select'); (1 row) +drop table mytable; -- Grant options SET SESSION AUTHORIZATION regress_user1; CREATE TABLE atest4 (a int); diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql index fee0c3b34b4..1ae079349fb 100644 --- a/src/test/regress/sql/privileges.sql +++ b/src/test/regress/sql/privileges.sql @@ -715,6 +715,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_user3; select has_column_privilege('mytable',2::int2,'select'); +drop table mytable; -- Grant options |