On 2025-11-09 04:06, Tom Lane wrote:

> Philip Warner <[email protected]> writes: 
>> I just got bitten by dumping and restoring a database to a new cluster,
>> and the default_text_search_config was not copied for the database.
> 
>> A check of the dump file shows no 'ALTER DATABASE' command.
> 
> IIRC you'd need to use --create to prod pg_dump to produce
> a CREATE DATABASE command as well as any database-level
> ALTER commands.

Is that a good approach? The --create option should create the DB, yes. 
But...DB settings should, IMO, be done as part of the normal state dump/restore 

ie. If I have previously issued a "create database" then a pg_restore should be 
able to create a matching database.

Would there be any appetite for a patch to at least implement this as an 
option? Which leads to setting other config parameters and the settings for 
ALLOW_CONNECTIONS and CONNECTION LIMIT.


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to