Re: REFRESH MATERIALIZED VIEW command in PL block hitting Assert

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: REFRESH MATERIALIZED VIEW command in PL block hitting Assert
Дата
Msg-id 20130422131153.GF4052@awork2.anarazel.de
обсуждение исходный текст
Ответ на REFRESH MATERIALIZED VIEW command in PL block hitting Assert  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Ответы Re: REFRESH MATERIALIZED VIEW command in PL block hitting Assert  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
On 2013-04-22 18:35:04 +0530, Jeevan Chalke wrote:
> Hi,
> 
> I have observed that following sequence is causing server crash.
> 
> CREATE MATERIALIZED VIEW temp_class_mv AS
>   SELECT * FROM pg_class
>   WITH NO DATA;
> 
> CREATE OR REPLACE FUNCTION test_refresh_mv()
> RETURNS int
> AS $$
> BEGIN
>  REFRESH MATERIALIZED VIEW temp_class_mv;
>  return 1;
> END; $$ LANGUAGE plpgsql;
> 
> SELECT test_refresh_mv();
> 
> 
> I had a quick look over the crash and it is hitting following Assert in
> spi.c:
> 
>                 else if (IsA(stmt, RefreshMatViewStmt))
>                 {
>                     Assert(strncmp(completionTag,
>                                    "REFRESH MATERIALIZED VIEW ", 23) == 0);
>                     _SPI_current->processed = strtoul(completionTag + 23,
>                                                       NULL, 10);
>                 }
> 
> It seems like we are missing expected value for completionTag in
> ExecRefreshMatView()

Possibly independent from this issue, but where did that 23 come from?
ISTM we're strtoul()ing "EW somenumber" here.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: REFRESH MATERIALIZED VIEW command in PL block hitting Assert
Следующее
От: Jeevan Chalke
Дата:
Сообщение: Re: REFRESH MATERIALIZED VIEW command in PL block hitting Assert