From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
Cc: | Kirill Reshke <reshkekirill(at)gmail(dot)com>, Vitaly Davydov <v(dot)davydov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ALTER DATABASE RESET with unexistent guc doesn't report an error |
Date: | 2025-09-11 16:18:40 |
Message-ID: | 1791672.1757607520@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)kurilemu(dot)de> writes:
> On 2025-Sep-11, Kirill Reshke wrote:
>> I think we can remove "support" for ALTER DATABASE RESET TABLESPACE.
> What about ALTER USER RESET TABLESPACE?
Yeah, I think you're right. The complaint is fundamentally that
these two cases behave differently:
regression=# ALTER DATABASE regression RESET bogus;
ERROR: unrecognized configuration parameter "bogus"
regression=# ALTER DATABASE postgres RESET bogus;
ALTER DATABASE
the unobvious-to-the-user reason being that "regression" has a
pg_db_role_setting entry and "postgres" does not. But there's
also no error for
regression=# ALTER USER postgres RESET bogus;
ALTER ROLE
and by the same logic there should be. I think though that
the proposed patch addresses both cases.
Looking at the patch, the delta in database.out raises
another question:
ALTER DATABASE regression_tbd RENAME TO regression_utf8;
ALTER DATABASE regression_utf8 SET TABLESPACE regress_tblspace;
ALTER DATABASE regression_utf8 RESET TABLESPACE;
+ERROR: unrecognized configuration parameter "tablespace"
ALTER DATABASE regression_utf8 CONNECTION_LIMIT 123;
The author of this bit of test script evidently thought that
ALTER ... RESET TABLESPACE is the inverse of ALTER ... SET TABLESPACE,
and what we are seeing is that it is not. That may be a bug in
itself, but it's not what Vitaly is on about, IIUC.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ranier Vilela | 2025-09-11 16:21:38 | Re: PgStat_HashKey padding issue when passed by reference |
Previous Message | Ranier Vilela | 2025-09-11 16:15:31 | Re: Making type Datum be 8 bytes everywhere |