Re: Regression tests vs existing users in an installation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regression tests vs existing users in an installation
Дата
Msg-id 25245.1468683514@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Regression tests vs existing users in an installation  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Regression tests vs existing users in an installation  (Robert Haas <robertmhaas@gmail.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Regression tests vs existing users in an installation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Reviewing freeze map code