Обсуждение: invalid value for parameter "default_text_search_config": "public.pg"

Поиск
Список
Период
Сортировка

invalid value for parameter "default_text_search_config": "public.pg"

От
Les
Дата:
I try to execute this on a very simple table, in a production database:

alter table product.product add proc_order int8;
create index idx_product_proc_order_status on product.product(proc_order nulls last, product_status_id /* this has type uuid */ );

and I get this error:

SQL Error [22023]: ERROR: invalid value for parameter "default_text_search_config": "public.pg"
  Where: while setting parameter "default_text_search_config" to "public.pg" parallel worker

I have been using this database for many weeks now, and never got a similar message. I don't understand how the creation of an index on an int8 and an uuid field is related to full text search.

Thanks,

    Laszlo

Re: invalid value for parameter "default_text_search_config": "public.pg"

От
"David G. Johnston"
Дата:
On Thursday, July 20, 2023, Les <nagylzs@gmail.com> wrote:
I try to execute this on a very simple table, in a production database:

Please provide version information and any extensions you may have installed.

David J.

Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Les
Дата:
Version:

PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

Extensions installed:

oid  |extname |extowner|extnamespace|extrelocatable|extversion|extconfig|extcondition|
-----+--------+--------+------------+--------------+----------+---------+------------+
13540|plpgsql |      10|          11|false         |1.0       |NULL     |NULL        |
25139|pgcrypto|   16385|        2200|true          |1.3       |NULL     |NULL        |
25193|hstore  |   16385|        2200|true          |1.8       |NULL     |NULL        |



David G. Johnston <david.g.johnston@gmail.com> ezt írta (időpont: 2023. júl. 21., P, 7:41):
On Thursday, July 20, 2023, Les <nagylzs@gmail.com> wrote:
I try to execute this on a very simple table, in a production database:

Please provide version information and any extensions you may have installed.

David J.

Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Adrian Klaver
Дата:
On 7/20/23 22:25, Les wrote:
> I try to execute this on a very simple table, in a production database:
> 
> alter table product.product add proc_order int8;
> create index idx_product_proc_order_status on product.product(proc_order 
> nulls last, product_status_id /* this has type uuid */ );
> 
> and I get this error:
> 
> SQL Error [22023]: ERROR: invalid value for parameter 
> "default_text_search_config": "public.pg <http://public.pg>"
>    Where: while setting parameter "default_text_search_config" to 
> "public.pg <http://public.pg>" parallel worker

What client are you using to run the commands?

> 
> I have been using this database for many weeks now, and never got a 
> similar message. I don't understand how the creation of an index on an 
> int8 and an uuid field is related to full text search.
> 
> Thanks,
> 
>      Laszlo
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Adrian Klaver
Дата:
On 7/21/23 08:14, Les wrote:

Please reply to list also.
Ccing list to get reply back on list.

> First I got this error when using a custom python program with asyncpg 
> driver. https://magicstack.github.io/asyncpg/current/ 
> <https://magicstack.github.io/asyncpg/current/>
> 
> Then I tried the "CREATE INDEX" command from Dbeaver (which uses JDBC) 
> and I got the same error.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Les
Дата:

> SQL Error [22023]: ERROR: invalid value for parameter
> "default_text_search_config": "public.pg <http://public.pg>"
>    Where: while setting parameter "default_text_search_config" to
> "public.pg <http://public.pg>" parallel worker

What client are you using to run the commands?

I just checked and it also throws this error when I execute the following SELECT from plain psql:

 select
                        pft.id as file_type_id,
                        pft.code as file_type_code,
                        pfs.id as file_status_id,
                        pfs.code as file_status_code,
                        count(pf.id) as cnt
                    from
                        product.product_file pf
                        inner join product.product p on p.id=pf.product_id
                        inner join product.product_file_type pft  on pft.id = pf.product_file_type_id
                        inner join product.product_file_status pfs  on pfs.id = pf.product_file_status_id
                    group by
                        pft.id, pfs.id;
ERROR:  invalid value for parameter "default_text_search_config": "public.pg"
CONTEXT:  while setting parameter "default_text_search_config" to "public.pg"
parallel worker

 

Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Les
Дата:



> SQL Error [22023]: ERROR: invalid value for parameter
> "default_text_search_config": "public.pg <http://public.pg>"
>    Where: while setting parameter "default_text_search_config" to
> "public.pg <http://public.pg>" parallel worker

What client are you using to run the commands?

I just checked and it also throws this error when I execute the following SELECT from plain psql:

 select
                        pft.id as file_type_id,
                        pft.code as file_type_code,
                        pfs.id as file_status_id,
                        pfs.code as file_status_code,
                        count(pf.id) as cnt
                    from
                        product.product_file pf
                        inner join product.product p on p.id=pf.product_id
                        inner join product.product_file_type pft  on pft.id = pf.product_file_type_id
                        inner join product.product_file_status pfs  on pfs.id = pf.product_file_status_id
                    group by
                        pft.id, pfs.id;
ERROR:  invalid value for parameter "default_text_search_config": "public.pg"
CONTEXT:  while setting parameter "default_text_search_config" to "public.pg"
parallel worker

After reading the documentation here:

https://www.postgresql.org/docs/current/textsearch-configuration.html

I found out that "public.pg" is not a valid configuration indeed. Here is how it looks in this db:

mydatabase=#
mydatabase=# \dF
               List of text search configurations
   Schema   |    Name    |              Description              
------------+------------+---------------------------------------
 pg_catalog | arabic     | configuration for arabic language
 pg_catalog | armenian   | configuration for armenian language
 pg_catalog | basque     | configuration for basque language
 pg_catalog | catalan    | configuration for catalan language
 pg_catalog | danish     | configuration for danish language
 pg_catalog | dutch      | configuration for dutch language
 pg_catalog | english    | configuration for english language
 pg_catalog | finnish    | configuration for finnish language
 pg_catalog | french     | configuration for french language
 pg_catalog | german     | configuration for german language
 pg_catalog | greek      | configuration for greek language
 pg_catalog | hindi      | configuration for hindi language
 pg_catalog | hungarian  | configuration for hungarian language
 pg_catalog | indonesian | configuration for indonesian language
 pg_catalog | irish      | configuration for irish language
 pg_catalog | italian    | configuration for italian language
 pg_catalog | lithuanian | configuration for lithuanian language
 pg_catalog | nepali     | configuration for nepali language
 pg_catalog | norwegian  | configuration for norwegian language
 pg_catalog | portuguese | configuration for portuguese language
 pg_catalog | romanian   | configuration for romanian language
 pg_catalog | russian    | configuration for russian language
 pg_catalog | serbian    | configuration for serbian language
 pg_catalog | simple     | simple configuration
 pg_catalog | spanish    | configuration for spanish language
 pg_catalog | swedish    | configuration for swedish language
 pg_catalog | tamil      | configuration for tamil language
 pg_catalog | turkish    | configuration for turkish language
 pg_catalog | yiddish    | configuration for yiddish language
(29 rows)

mydatabase=# SET default_text_search_config = 'pg_catalog.english';
SET
mydatabase=#

After setting it to pg_catalog.english, it works.

But I still don't know how it affects a query that does not use any tsvector or tsquery. In fact, tsvector and tsquery types are not used in any of my tables at all.



Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Tom Lane
Дата:
Les <nagylzs@gmail.com> writes:
> I found out that "public.pg" is not a valid configuration indeed.

Quite so (and even more so given that the actual setting seems to be
"public.pg <http://public.pg>").

> But I still don't know how it affects a query that does not use any
> tsvector or tsquery.

The error report shows that the failure is happening while starting
a parallel worker, so the only thing required of your query is that
it be big enough to tempt the planner to use parallelism.

However, the parallel worker should just be absorbing the same
configuration settings your main session is using.  So what remains
to be explained is why you aren't seeing the same complaint when
starting a fresh session.  It might be useful to look at the
output of

show default_text_search_config;

and

select * from pg_file_settings where name = 'default_text_search_config';

            regards, tom lane



Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Les
Дата:
 

However, the parallel worker should just be absorbing the same
configuration settings your main session is using.  So what remains
to be explained is why you aren't seeing the same complaint when
starting a fresh session.  It might be useful to look at the
output of

show default_text_search_config;

and

select * from pg_file_settings where name = 'default_text_search_config';

psql (15.3 (Debian 15.3-1.pgdg110+1))
Type "help" for help.

mydatabase=# show default_text_search_config;
 default_text_search_config
----------------------------
 public.pg
(1 row)

mydatabase=# select * from pg_file_settings where name = 'default_text_search_config';
                 sourcefile                 | sourceline | seqno |            name            |  setting  | applied |            error            
--------------------------------------------+------------+-------+----------------------------+-----------+---------+------------------------------
 /opt/postgresql/data/conf.d/06_locale.conf |         17 |    24 | default_text_search_config | public.pg | f       | setting could not be applied
(1 row)

mydatabase=#

I'm not sure what applied="public.pg", error="setting could not be applied" means. I can change it in the config file, no problem. I just would like to know if this is a simple configuration error, or a software installation error. (Is public.pg a built-in config that should always exist?)

Regards,

     Laszlo

Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Tom Lane
Дата:
Les <nagylzs@gmail.com> writes:
> mydatabase=# select * from pg_file_settings where name =
> 'default_text_search_config';
>                  sourcefile                 | sourceline | seqno |
>    name                    |  setting  | applied |            error
>
--------------------------------------------+------------+-------+----------------------------+-----------+---------+------------------------------
>  /opt/postgresql/data/conf.d/06_locale.conf |         17 |    24 |
> default_text_search_config | public.pg | f       | setting could not be applied
> (1 row)

> I'm not sure what applied="public.pg", error="setting could not be applied"
> means.

No, "applied" is "f" (false), meaning that the setting is not actually usable.
I'm a little surprised that it seems to have gotten into your live session
anyway, although perhaps that's because the postmaster can't really
validate it at startup.

> I can change it in the config file, no problem. I just would like to
> know if this is a simple configuration error, or a software installation
> error. (Is public.pg a built-in config that should always exist?)

"public.pg" is certainly not a standard (as in built-in) text search
configuration name.  Maybe that value was installed by some bit of
software that failed to install the configuration to go with it,
or only put the configuration into one database not everywhere in
your installation?

            regards, tom lane



Re: invalid value for parameter "default_text_search_config": "public.pg"

От
Les
Дата:
 

> I'm not sure what applied="public.pg", error="setting could not be applied"
> means.

No, "applied" is "f" (false), meaning that the setting is not actually usable.
I'm a little surprised that it seems to have gotten into your live session
anyway, although perhaps that's because the postmaster can't really
validate it at startup.

> I can change it in the config file, no problem. I just would like to
> know if this is a simple configuration error, or a software installation
> error. (Is public.pg a built-in config that should always exist?)

"public.pg" is certainly not a standard (as in built-in) text search
configuration name.  Maybe that value was installed by some bit of
software that failed to install the configuration to go with it,
or only put the configuration into one database not everywhere in
your installation?

All right, then it means that this is a configuration error, and it is not a problem with the database instance and its live data. That was my main concern. I'll just simply change this in the conf file and reload the config.

This is all I needed, thank you for your help!

   Laszlo