Re: pg_dump not dumping default_text_search_config WAI? - Mailing list pgsql-hackers

From Philip Warner
Subject Re: pg_dump not dumping default_text_search_config WAI?
Date
Msg-id A1B34FC7-6299-4FCC-A57B-73A6A342EC97@rhyme.com.au
Whole thread Raw
In response to Re: pg_dump not dumping default_text_search_config WAI?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump not dumping default_text_search_config WAI?
List pgsql-hackers
On 2025-11-09 04:06, Tom Lane wrote:

> Philip Warner <pjw@rhyme.com.au> 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.

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: MSVC: Improve warning options set
Next
From: "cca5507"
Date:
Subject: Re: Use bsearch() instead of a manual binary search in syscache.c