Re: Tsearch2 crashes my backend, ouch ! - Mailing list pgsql-general
From | Listmail |
---|---|
Subject | Re: Tsearch2 crashes my backend, ouch ! |
Date | |
Msg-id | op.tp4hssr5zcizji@apollo13 Whole thread Raw |
In response to | Re: Tsearch2 crashes my backend, ouch ! (Oleg Bartunov <oleg@sai.msu.su>) |
Responses |
Re: Tsearch2 crashes my backend, ouch !
|
List | pgsql-general |
>> Anyway, just to signal that tsearch2 crashes if SELECT is not granted >> to pg_ts_dict (other tables give a proper error message when not >> GRANTed).On > > I don't understand this. Are sure on this ? From prompt in your select > examples I see you have superuser's rights and you have successfully > select from pg_ts_dict column. It was tricky to reproduce... I thought I had hallucinations but here it is : - open two psql windows (one postgres user, one normal unprivileged user), see > or # in prompt for which window I use to type commands/ - first let's lock ourselves up : caillaudangers=# REVOKE select ON pg_ts_dict FROM caillaudangers ; REVOKE caillaudangers=# REVOKE select ON pg_ts_cfg FROM caillaudangers ; REVOKE caillaudangers=# REVOKE select ON pg_ts_cfgmap FROM caillaudangers ; REVOKE caillaudangers=# REVOKE select ON pg_ts_parser FROM caillaudangers ; REVOKE - then try to access : caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); ERREUR: droit refusé pour la relation pg_ts_dict CONTEXT: instruction SQL «select dict_init, dict_initoption, dict_lexize from public.pg_ts_dict where oid = $1» caillaudangers=# GRANT select ON pg_ts_dict TO caillaudangers ; GRANT caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); ERREUR: No dictionary with id 138493128 Strange error message ?? caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); ERREUR: droit refusé pour la relation pg_ts_cfg CONTEXT: instruction SQL «select prs_name from public.pg_ts_cfg where oid = $1» Proper error message now. Let's go back. caillaudangers=# REVOKE select ON pg_ts_dict FROM caillaudangers ; REVOKE Now try to select to_tsvector and each time a permission is denied, grant the needed table. caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); ERREUR: droit refusé pour la relation pg_ts_cfg CONTEXT: instruction SQL «select prs_name from public.pg_ts_cfg where oid = $1» caillaudangers=# GRANT select ON pg_ts_cfg TO caillaudangers ; GRANT caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); ERREUR: droit refusé pour la relation pg_ts_cfgmap CONTEXT: instruction SQL «select lt.tokid, map.dict_name from public.pg_ts_cfgmap as map, public.pg_ts_cfg as cfg, public.token_type( $1 ) as lt where lt.alias = map.tok_alias and map.ts_name = cfg.ts_name and cfg.oid= $2 order by lt.tokid desc;» caillaudangers=# GRANT select ON pg_ts_cfgmap TO caillaudangers ; GRANT caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); ERREUR: droit refusé pour la relation pg_ts_parser CONTEXT: instruction SQL «select prs_start, prs_nexttoken, prs_end, prs_lextype, prs_headline from public.pg_ts_parser where oid = $1» caillaudangers=# GRANT select ON pg_ts_parser TO caillaudangers ; GRANT caillaudangers=> SELECT to_tsvector( 'bill gates is watching us' ); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. La connexion au serveur a été perdue. Tentative de réinitialisation : Echec. There it crashes. It's bizarre.
pgsql-general by date: