]> granicus.if.org Git - postgresql/commit
Avoid rare race condition in privileges.sql regression test.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Oct 2018 17:56:58 +0000 (13:56 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Oct 2018 17:56:58 +0000 (13:56 -0400)
commit75b3b137009991b996d56e91648cfacd1ed9f66a
treefde0562dae2d723b6d802f3cfeedc4093853cfa3
parenta485bacef177b4cd476b9437f8fb6cb8dce58944
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
src/test/regress/expected/privileges.out
src/test/regress/sql/privileges.sql