Re: Empty materialized view

From: Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Empty materialized view
Date: 2024-03-24 20:58:52
Message-ID: 983c4ea7-4861-436a-a23e-f40780c9f0d6@gelassene-pferde.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 24.03.2024 um 21:50 schrieb Adrian Klaver:
> On 3/24/24 13:36, Thiemo Kellner wrote:
> It does depending on the order of viewing. Namely if you viewed the
> 'old' empty MV in the outside session before you dropped/created the
> 'new' MV and committed the changes.

Something like the viewing session is in a transaction before the
(re-)creation of the mv?

The view session is on auto commit. (It's sole purpose to query stuff
and not to have explicitly terminate transactions do to syntax errors
and so on.)

>>
>> Excerpt of the installation protocol:
>> …
>> ## tenth level ##
>> Set materialised view QUERY_PER_TASK⠒MV up
>> psql:views/QUERY_PER_TASK⠒MV.pg_sql:3: HINWEIS:  materialisierte Sicht
>> »query_per_task⠒mv« existiert nicht, wird übersprungen
>> DROP MATERIALIZED VIEW
>> SELECT 0
>> REFRESH MATERIALIZED VIEW
>> COMMENT
>> COMMIT
>> # insert data #
>> …
>>
>
>
>> select count(*) from SNOWRUNNER.TASK_DEPENDENCY⠒V;
>
> That is not the view you showed in your attached SQL in your previous
> post nor what is mentioned above. Also if I am following your naming
> scheme it is a regular view not a materialized view.

Feeling quite dumb now. But then, there neither is data visible in the
install session.

insert data into TASK_DEPENDENCY⠒V
INSERT 0 34
COMMIT
count
-------
0
(1 row)

Thanks for taking care.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-03-24 21:06:19 Re: Empty materialized view
Previous Message Adrian Klaver 2024-03-24 20:50:06 Re: Empty materialized view