Re: Which SET TYPE don't actually require a rewrite

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Which SET TYPE don't actually require a rewrite
Дата
Msg-id 20200722003112.GB9642@paquier.xyz
обсуждение исходный текст
Ответ на Re: Which SET TYPE don't actually require a rewrite  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Tue, Jul 21, 2020 at 04:55:37PM -0400, Bruce Momjian wrote:
> I know Tom put a wink on that, but I actually do feel that the only
> clean way to do this is to give users a way to issue the query in a
> non-executing way that will report if a rewrite is going to happen.

Yeah, when doing a schema upgrade for an application, that's the usual
performance pin-point and people used to other things than Postgres
write their queries without being aware of that.  We have something
able to track that with the event trigger table_rewrite, but there is
no easy option to store the event and bypass its execution.  I think
that using a plpgsql function wrapping an ALTER TABLE query with an
exception block for an error generated by an event trigger if seeing
table_rewrite allows to do that, though.
--
Michael

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Parallel Seq Scan vs kernel read ahead
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: v13 planner ERROR: could not determine which collation to use for string comparison