Re: pg_dump quietly ignore missing tables - is it bug?

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: pg_dump quietly ignore missing tables - is it bug?
Дата
Msg-id CAFj8pRBtjR8sU5q6fgyvKuUbSW_9v+K8g6qE1RqeYQZPZ4zi7Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_dump quietly ignore missing tables - is it bug?  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: pg_dump quietly ignore missing tables - is it bug?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hi

2015-07-30 12:44 GMT+02:00 Heikki Linnakangas <hlinnaka@iki.fi>:
On 07/25/2015 07:08 PM, Pavel Stehule wrote:
I am sending a new patch - without checking wildcard chars.

The documentation says the option is called --strict-names, while the code has --strict-mode. I like --strict-names more, "mode" seems redundant, and it's not clear what it's strict about.

ok

For symmetry, it would be good to also support this option in pg_restore. It seems even more useful there.

I'll do it

Can we do better than issuing a separate query for each table/schema name? The performance of this isn't very important, but still it seems like you could fairly easily refactor the code to avoid that. Perhaps return an extra constant for part of the UNION to distinguish which result row came from which pattern, and check that at least one row is returned for each.

I did few tests and for 1K tables the union is faster about 50ms, but the code is much more complex, for 10K tables, the union is significantly slower (probably due planning) 2sec x 7sec. So if we are expecting backup on not too slow network, then simple solution is winner - Postgres process simple read queries quickly.

Regards

Pavel
 

- Heikki


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Test code is worth the space
Следующее
От: "Shulgin, Oleksandr"
Дата:
Сообщение: Re: count_nulls(VARIADIC "any")