Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW
От | Jeff Davis |
---|---|
Тема | Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW |
Дата | |
Msg-id | 3d87c0d1705e50c364fe9cae63fdcb8664fd8cc6.camel@j-davis.com обсуждение исходный текст |
Ответ на | Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW (Yugo Nagata <nagata@sraoss.co.jp>) |
Ответы |
Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW
Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW |
Список | pgsql-hackers |
On Wed, 2024-08-07 at 03:06 +0900, Yugo Nagata wrote: > I'm sorry. After sending the mail, I found the patch didn't work. > If we call RestrictSearchPath() before creating a relation, it tries > to create the relation in pg_catalog and it causes an error. Yeah, that's exactly the problem I ran into in ExecCreateTableAs(), which was the reason I refactored it to use RefreshMatViewByOid(). > Perhaps, we would need to create the rel before RestrictSearchPath() > by calling > create_ctas_nodata or something like this... I haven't looked at the details, but that makes sense: break it into two parts so that the create (without data) happens first without doing the work of EXPLAIN, and the second part refreshes using the explain logic. That means RefreshMatViewByOid() would need to work with EXPLAIN. As you point out in the other email, it's not easy to make that all work with REFRESH ... CONCURRENTLY, but perhaps it could work with CREATE MATERIALIZED VIEW and REFRESH (without CONCURRENTLY). Regards, Jeff Davis
В списке pgsql-hackers по дате отправления: