ALTER DATABASE RESET with unexistent guc doesn't report an error - Mailing list pgsql-hackers

From Vitaly Davydov
Subject ALTER DATABASE RESET with unexistent guc doesn't report an error
Date
Msg-id 30783e-68c28a00-9-41004480@130449754
Whole thread Raw
Responses Re: ALTER DATABASE RESET with unexistent guc doesn't report an error
List pgsql-hackers
Dear Hackers,

I've found that ALTER DATABASE RESET with an unexistent guc does nothing without
error reporting.

ALTER DATABASE SET reports an error if guc doesn't exist:

> alter database mydb set myparam to 10;
ERROR:  unrecognized configuration parameter "myparam"

ALTER DATABASE RESET doesn't report an error at all:

> alter database mydb reset myparam;
ALTER DATABASE

I think it is a wrong behaviour. I believe, ALTER DATABASE RESET should report
an error in this case. I've also think that ALTER DATABASE RESET TABLESPACE does
nothing without any error reporting. I've prepared a simple patch to handle this
case (master branch). It adds a check for guc existence with error reporting.

With best regards,
Vitaly

Attachment

pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Display is_prev_bucket_same_wrt of xl_hash_squeeze_page
Next
From: sunil s
Date:
Subject: Re: Unnecessary delay in streaming replication due to replay lag