public inbox for [email protected]
help / color / mirror / Atom feedFrom: Euler Taveira <[email protected]>
To: Jeff Janes <[email protected]>
Cc: [email protected]
Subject: Re: Add <caution> for ALTER TEXT SEARCH CONFIGURATION
Date: Mon, 25 Nov 2019 10:51:23 -0300
Message-ID: <CAHE3wggE-k5y2Gnu45soTi5vJsJY12zqVZ_-VwNPHxtsUgFMrA@mail.gmail.com> (raw)
In-Reply-To: <CAMkU=1wQ-t=7gVoWRv6+yik+yZ20dEEwGjCXumNpHEFKLtxfVg@mail.gmail.com>
References: <CAMkU=1wQ-t=7gVoWRv6+yik+yZ20dEEwGjCXumNpHEFKLtxfVg@mail.gmail.com>
Em sex., 15 de nov. de 2019 às 16:10, Jeff Janes
<[email protected]> escreveu:
>
> If you alter one of the built-in text search configurations, the modifications to it will not get dumped by pg_dump, and thus won't get propagated by pg_upgrade leading to silent behavior changes in the new cluster (as well in any other type of restoration from pg_dump output)
>
It was a bad design to allow changes in builtin text search objects.
User expects that all modifications should be propagated while dumping
a cluster.
Since pg_ts_config_map does not have an oid column, it is not easy to
guess that a text search configuration was modified (unless we dump
the initial table and compare row-by-row). We could disallow changes
in builtin text search objects but it could potentially break some
scenarios. Even if it breaks a scenario, a workaround with another
user-defined text search configuration is possible.
> I would say it is bad practise to alter one of those anyway, rather than copy and alter the copy. But I wasn't aware until now of just how bad of an idea it was. I think that this needs to be warned about in the docs for ALTER TEXT SEARCH CONFIGURATION. If I were monkeying around in $SHAREDLIB/tsearch_data, I'd expect traps like this, but not when executing things from SQL after reading the docs on the command.
>
Let's start with a tangible idea: add a big "caution" and also a
WARNING while ALTER TEXT SEARCH CONFIGURATION whose schema is
pg_catalog.
--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Add <caution> for ALTER TEXT SEARCH CONFIGURATION
In-Reply-To: <CAHE3wggE-k5y2Gnu45soTi5vJsJY12zqVZ_-VwNPHxtsUgFMrA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox