pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Drop test user when done with it.
9+ messages / 5 participants
[nested] [flat]
* pgsql: Drop test user when done with it.
@ 2019-06-24 16:37 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 9+ messages in thread
From: Tom Lane @ 2019-06-24 16:37 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Drop test user when done with it.
Commit d7f8d26d9 added a test case that created a user, but forgot
to drop it again. This is no good; for one thing, it causes repeated
"make installcheck" runs to fail.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f31111bbe81db0e84fb486c6423a234c47091b30
Modified Files
--------------
src/test/regress/expected/stats_ext.out | 1 +
src/test/regress/sql/stats_ext.sql | 1 +
2 files changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-25 06:40 Dean Rasheed <dean.a.rasheed@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 9+ messages in thread
From: Dean Rasheed @ 2019-06-25 06:40 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
On Mon, 24 Jun 2019 at 17:37, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Drop test user when done with it.
>
> Commit d7f8d26d9 added a test case that created a user, but forgot
> to drop it again. This is no good; for one thing, it causes repeated
> "make installcheck" runs to fail.
>
Ah, I see .. yes, my bad. Thanks for fixing.
Regards,
Dean
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-26 04:21 Michael Paquier <michael@paquier.xyz>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 9+ messages in thread
From: Michael Paquier @ 2019-06-26 04:21 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
On Mon, Jun 24, 2019 at 04:37:13PM +0000, Tom Lane wrote:
> Drop test user when done with it.
>
> Commit d7f8d26d9 added a test case that created a user, but forgot
> to drop it again. This is no good; for one thing, it causes repeated
> "make installcheck" runs to fail.
If we are on that, we still have src/test/modules/test_pg_dump/ which
is not repeatable with multiple installchecks:
https://www.postgresql.org/message-id/20181130163728.GE3415@tamriel.snowman.net
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-26 13:42 Tom Lane <tgl@sss.pgh.pa.us>
parent: Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2019-06-26 13:42 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Jun 24, 2019 at 04:37:13PM +0000, Tom Lane wrote:
>> Commit d7f8d26d9 added a test case that created a user, but forgot
>> to drop it again. This is no good; for one thing, it causes repeated
>> "make installcheck" runs to fail.
> If we are on that, we still have src/test/modules/test_pg_dump/ which
> is not repeatable with multiple installchecks:
> https://www.postgresql.org/message-id/20181130163728.GE3415@tamriel.snowman.net
OK, hadn't run into that personally, but let's fix that too. Anything
that can be run with "installcheck" has to satisfy the restrictions
of being re-runnable and careful about what global names it uses.
regards, tom lane
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-26 14:50 Tom Lane <tgl@sss.pgh.pa.us>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2019-06-26 14:50 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org, Stephen Frost <sfrost@snowman.net>
I wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> If we are on that, we still have src/test/modules/test_pg_dump/ which
>> is not repeatable with multiple installchecks:
>> https://www.postgresql.org/message-id/20181130163728.GE3415@tamriel.snowman.net
> OK, hadn't run into that personally, but let's fix that too. Anything
> that can be run with "installcheck" has to satisfy the restrictions
> of being re-runnable and careful about what global names it uses.
Actually, now that I re-read that thread, maybe what we need to do is
mark test_pg_dump as something not to be run by "make installcheck"?
I'm not quite sure what *does* run it, but the context is evidently
that it's supposed to be run by some overarching script that's then
going to run pg_dump on the ending database state. So it's not meant
to be run against a generic pre-existing installation, and it doesn't
have to follow the rules for being safe for that --- but then we need
to be sure that it doesn't get called that way if someone does "make
installcheck" in a parent directory.
regards, tom lane
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-26 15:53 Stephen Frost <sfrost@snowman.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Frost @ 2019-06-26 15:53 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
Greetings,
On Wed, Jun 26, 2019 at 10:51 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
> > Michael Paquier <michael@paquier.xyz> writes:
> >> If we are on that, we still have src/test/modules/test_pg_dump/ which
> >> is not repeatable with multiple installchecks:
> >>
> https://www.postgresql.org/message-id/20181130163728.GE3415@tamriel.snowman.net
>
> > OK, hadn't run into that personally, but let's fix that too. Anything
> > that can be run with "installcheck" has to satisfy the restrictions
> > of being re-runnable and careful about what global names it uses.
>
> Actually, now that I re-read that thread, maybe what we need to do is
> mark test_pg_dump as something not to be run by "make installcheck"?
> I'm not quite sure what *does* run it, but the context is evidently
> that it's supposed to be run by some overarching script that's then
> going to run pg_dump on the ending database state. So it's not meant
> to be run against a generic pre-existing installation, and it doesn't
> have to follow the rules for being safe for that --- but then we need
> to be sure that it doesn't get called that way if someone does "make
> installcheck" in a parent directory.
On my phone atm, but this feels very deja vu...
Isn’t this the one run from pg_upgrade’s tests? We don’t want to break that
(and hopefully we haven’t but maybe something did...). Pretty sure we had
nearly the same discussion this past fall...
Thanks,
Stephen
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-26 18:59 Alvaro Herrera <alvherre@2ndquadrant.com>
parent: Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 9+ messages in thread
From: Alvaro Herrera @ 2019-06-26 18:59 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
On 2019-Jun-26, Stephen Frost wrote:
> Isn’t this the one run from pg_upgrade’s tests? We don’t want to break that
> (and hopefully we haven’t but maybe something did...). Pretty sure we had
> nearly the same discussion this past fall...
https://postgr.es/m/20180904203012.GG20696@paquier.xyz ?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-26 19:07 Stephen Frost <sfrost@snowman.net>
parent: Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Frost @ 2019-06-26 19:07 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
Greetings,
* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> On 2019-Jun-26, Stephen Frost wrote:
>
> > Isn’t this the one run from pg_upgrade’s tests? We don’t want to break that
> > (and hopefully we haven’t but maybe something did...). Pretty sure we had
> > nearly the same discussion this past fall...
>
> https://postgr.es/m/20180904203012.GG20696@paquier.xyz ?
Yes, thanks, and specifically this:
https://www.postgresql.org/message-id/20181130163728.GE3415%40tamriel.snowman.net
Adding 'DROP IF EXISTS' to the top to have things cleaned up so that the
run can be repeated is fine. Removing things at the end of the test
script would defeat the entire purpose of those tests.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: Drop test user when done with it.
@ 2019-06-27 08:12 Michael Paquier <michael@paquier.xyz>
parent: Stephen Frost <sfrost@snowman.net>
0 siblings, 0 replies; 9+ messages in thread
From: Michael Paquier @ 2019-06-27 08:12 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org
On Wed, Jun 26, 2019 at 03:07:33PM -0400, Stephen Frost wrote:
> Yes, thanks, and specifically this:
>
> https://www.postgresql.org/message-id/20181130163728.GE3415%40tamriel.snowman.net
>
> Adding 'DROP IF EXISTS' to the top to have things cleaned up so that the
> run can be repeated is fine. Removing things at the end of the test
> script would defeat the entire purpose of those tests.
The problem is that if you do an installcheck, then the role persists
in the instance of Postgres installed. That's not a good thing, and
contrary to the test policy. And your solution does nothing about
that.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2019-06-27 08:12 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 16:37 pgsql: Drop test user when done with it. Tom Lane <tgl@sss.pgh.pa.us>
2019-06-25 06:40 ` Dean Rasheed <dean.a.rasheed@gmail.com>
2019-06-26 04:21 ` Michael Paquier <michael@paquier.xyz>
2019-06-26 13:42 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-06-26 14:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-06-26 15:53 ` Stephen Frost <sfrost@snowman.net>
2019-06-26 18:59 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-06-26 19:07 ` Stephen Frost <sfrost@snowman.net>
2019-06-27 08:12 ` Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox