Re: time stops within transaction

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: time stops within transaction
Дата
Msg-id 39EF892E.99983A63@tpf.co.jp
обсуждение исходный текст
Ответ на Re: time stops within transaction  (Alex Pilosov <alex@pilosoft.com>)
Список pgsql-hackers

Vadim Mikheev wrote:

> > I am inclined to think that we should do SetQuerySnapshot in the outer
> > loop of pg_exec_query_string, just before calling
> > pg_analyze_and_rewrite.  This would ensure that parse/plan accesses to
>                                            ^^^^^^^^^^^^^^
> Actually not - snapshot is passed as parameter to heap_beginscan...
> And currently SnapshotNow is used everywhere.
>

I sometimes mentioned anxieties about the use of SnapshotNow,
though I 've had no reasonable solution for it.
SnapshotNow isn't a real snapshot and so it wouldn't be able to
give us a complete consistency e.g. in the case "DDL statements
in transaction block".

However I couldn't think of any reasnoable way how to
handle the following cases.

We would have PREPARE statements in the near future.
How does PREPARE use the same snapshot as the execution ?
We would never be able to have shared catalog cache.
We coulnd't delete dropped table files immediately after commit.
...

Regards.
Hiroshi Inoue



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Conditional query plans.
Следующее
От: "Kevin O'Gorman"
Дата:
Сообщение: Re: Rule system goes weird with SELECT queries