Re: Empty materialized view

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Empty materialized view
Дата
Msg-id ed2bdabc-8fb4-4c70-b270-f169fee343ce@aklaver.com
обсуждение исходный текст
Ответ на Re: Empty materialized view  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Ответы Re: Empty materialized view
Список pgsql-general
On 3/24/24 13:58, Thiemo Kellner wrote:
> 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.)

Autocommit will only affect actions in that session, it will not make 
the other sessions actions visible. That depends on the other sessions 
committing actions.

See:

https://www.postgresql.org/docs/current/transaction-iso.html


> 
> Feeling quite dumb now. But then, there neither is data visible in the 
> install session.
> 
> insert data into TASK_DEPENDENCY⠒V
> INSERT 0 34

The above says the data was inserted.

> COMMIT
>   count
> -------
>       0


Where and when was the count query run?

> (1 row)
> 
> 
> Thanks for taking care.

-- 
Adrian Klaver
adrian.klaver@aklaver.com




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

Предыдущее
От: Thiemo Kellner
Дата:
Сообщение: Re: Empty materialized view
Следующее
От: veem v
Дата:
Сообщение: Re: Not able to purge partition