| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: dump a comment of a TSDictionary |
| Date: | 2017-03-07 00:40:01 |
| Message-ID: | 30638.1488847201@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it> writes:
> I've seen that pg_dump execute the dump of an eventual comment of a
> TSDictionary without specifying the namespace where it is defined:
> https://github.com/postgres/postgres/blob/master/src/bin/pg_dump/pg_dump.c#L13542
Yup, this is clearly an error --- thanks for spotting it! I've pushed
a fix for this and related mistakes.
> This is actually a problem if a new TSDictionary is created, in a different
> schema specified by the dumped search_path setting.
Just out of curiosity, do you have a concrete test case where it failed
that way? AFAICS the emitted SQL would be like
SET search_path = schema1, pg_catalog;
CREATE TEXT SEARCH DICTIONARY somedict (...);
COMMENT ON TEXT SEARCH DICTIONARY somedict IS '...';
SET search_path = schema2, pg_catalog;
CREATE TEXT SEARCH DICTIONARY somedict (...);
COMMENT ON TEXT SEARCH DICTIONARY somedict IS '...';
so it should accidentally work anyway. It's possible that a parallel
restore would get it wrong, or that a schema-selective restore would
omit comments it should include, but I couldn't reproduce a failure
in simple cases.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2017-03-07 00:45:27 | Re: Need a builtin way to run all tests faster manner |
| Previous Message | Peter Geoghegan | 2017-03-07 00:33:18 | on_dsm_detach() callback and parallel tuplesort BufFile resource management |