Re: Regression tests vs existing users in an installation
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Date: 2016-07-16T15:38:34Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > Tom Lane wrote: >> We've talked before about how the regression tests should be circumspect >> about what role names they create/drop, so as to avoid possibly blowing >> up an installation's existing users during "make installcheck". In >> particular I believe there was consensus that such names should begin >> with, or at least include, "regress". I got around today to instrumenting >> CreateRole to see what names we were actually creating, and was quite >> depressed as to how thoroughly that guideline is being ignored (see >> attached). > I would propose that we have one test run near the beginning or right at > the beginning of the serial schedule that sets up a small number of > roles to cover most of the needs of every other test, so that most such > other tests do not need to create any roles at all. I don't think that's a very attractive idea. It would create hazards for concurrent test cases, I fear. Moreover, an un-enforced convention of "don't create roles" isn't really any safer than an un-enforced convention of "only create roles named thus-and-such"; it just takes one person who is not familiar with the convention, and one committer not paying close attention, and we're right back where we started. I'm coming to the conclusion that the only thing that will make this materially better in the long run is automatic enforcement of a convention about what role names may be created in the regression tests. See my response to Stephen just now for a concrete proposal. regards, tom lane
Commits
-
Move rolenames test out of the core regression tests.
- c91504b958e1 12.0 landed
-
Add an enforcement mechanism for global object names in regression tests.
- 54100f5c6052 12.0 landed
-
Fix regression tests to use only global names beginning with "regress_".
- ca129e58c01f 12.0 landed
-
Disallow user-created replication origins named "pg_xxx".
- a1e61badf97b 12.0 landed