Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-27 Thread Michael Paquier
On Fri, Jan 27, 2023 at 10:46:53AM -0500, Tom Lane wrote: > I was imagining that pg_regress could contain a function that > issues some predefined queries and complains if the results > aren't empty. It already has the ability to issue commands > to the cluster-under-test (for the initial CREATE D

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-27 Thread Tom Lane
Justin Pryzby writes: > On Fri, Jan 27, 2023 at 08:27:40AM -0500, Andrew Dunstan wrote: >> On 2023-01-26 Th 22:18, Tom Lane wrote: >>> Maybe we need to enforce this at some other level than the tests >>> themselves, perhaps in pg_regress? >> Yeah, that seems like a better way to go. Then it would

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-27 Thread Justin Pryzby
On Fri, Jan 27, 2023 at 08:27:40AM -0500, Andrew Dunstan wrote: > On 2023-01-26 Th 22:18, Tom Lane wrote: > > Michael Paquier writes: > >> On Thu, Jan 26, 2023 at 09:08:23PM -0500, Tom Lane wrote: > >>> Is it worth checking for leftover regress_xxx tablespaces as well as > >>> roles? > >> Guess so

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-27 Thread Andrew Dunstan
On 2023-01-26 Th 22:18, Tom Lane wrote: > Michael Paquier writes: >> On Thu, Jan 26, 2023 at 09:08:23PM -0500, Tom Lane wrote: >>> Is it worth checking for leftover regress_xxx tablespaces as well as >>> roles? >> Guess so. If this is to be applied to everything that fails under the >> naming r

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Tom Lane
Michael Paquier writes: > On Thu, Jan 26, 2023 at 09:08:23PM -0500, Tom Lane wrote: >> Is it worth checking for leftover regress_xxx tablespaces as well as >> roles? > Guess so. If this is to be applied to everything that fails under the > naming restrictions, there could be a point in doing the

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Michael Paquier
On Thu, Jan 26, 2023 at 09:08:23PM -0500, Tom Lane wrote: > Yeah ... if we put it into an existing script, somebody will blindly > add more tests after it someday. I suggest calling it "test_cleanup" > to pair with "test_setup". > > Is it worth checking for leftover regress_xxx tablespaces as wel

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Tom Lane
Michael Paquier writes: > On Thu, Jan 26, 2023 at 12:31:06PM -0600, Justin Pryzby wrote: >> On Thu, Jan 26, 2023 at 09:46:07AM -0500, Andrew Dunstan wrote: >>> Would it be worth adding a check right at the end of the schedule that >>> makes sure there are no such roles left? >> Yes, because the a

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Michael Paquier
On Thu, Jan 26, 2023 at 12:31:06PM -0600, Justin Pryzby wrote: > On Thu, Jan 26, 2023 at 09:46:07AM -0500, Andrew Dunstan wrote: >> Would it be worth adding a check right at the end of the schedule that >> makes sure there are no such roles left? > > Yes, because the alternative is to have cirrus

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Justin Pryzby
On Thu, Jan 26, 2023 at 09:46:07AM -0500, Andrew Dunstan wrote: > > On 2023-01-26 Th 08:00, Robert Haas wrote: > > On Thu, Jan 26, 2023 at 6:58 AM Alvaro Herrera > > wrote: > >> On 2023-Jan-24, Robert Haas wrote: > >> > >>> Adjust interaction of CREATEROLE with role properties. > >> This commit

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Andrew Dunstan
On 2023-01-26 Th 08:00, Robert Haas wrote: > On Thu, Jan 26, 2023 at 6:58 AM Alvaro Herrera > wrote: >> On 2023-Jan-24, Robert Haas wrote: >> >>> Adjust interaction of CREATEROLE with role properties. >> This commit broke the ability to run 'make installcheck' repeatedly, >> because it fails to

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Robert Haas
On Thu, Jan 26, 2023 at 6:58 AM Alvaro Herrera wrote: > On 2023-Jan-24, Robert Haas wrote: > > > Adjust interaction of CREATEROLE with role properties. > > This commit broke the ability to run 'make installcheck' repeatedly, > because it fails to drop role regress_role_limited_admin. Argh, sorry.

Re: pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-26 Thread Alvaro Herrera
On 2023-Jan-24, Robert Haas wrote: > Adjust interaction of CREATEROLE with role properties. This commit broke the ability to run 'make installcheck' repeatedly, because it fails to drop role regress_role_limited_admin. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.

pgsql: Adjust interaction of CREATEROLE with role properties.

2023-01-24 Thread Robert Haas
Adjust interaction of CREATEROLE with role properties. Previously, a CREATEROLE user without SUPERUSER could not alter REPLICATION users in any way, and could not set the BYPASSRLS attribute. However, they could manipulate the CREATEDB property even if they themselves did not possess it. With thi