Re: Let's make PostgreSQL multi-threaded

Поиск
Список
Период
Сортировка
От Matthias van de Meent
Тема Re: Let's make PostgreSQL multi-threaded
Дата
Msg-id CAEze2WjJZZ=P_ich+=RiA51APHsNV7zi=-j-24DCPsaV43c+Ow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Let's make PostgreSQL multi-threaded  (Hannu Krosing <hannuk@google.com>)
Список pgsql-hackers
On Thu, 15 Jun 2023 at 11:07, Hannu Krosing <hannuk@google.com> wrote:
>
> One more unexpected benefit of having shared caches would be easing
> access to other databases.
>
> If the system caches are there for all databases anyway, then it
> becomes much easier to make queries using objects from multiple
> databases.

We have several optimizations in our visibility code that allow us to
remove dead tuples from this database when another database still has
a connection that has an old snapshot in which the deleting
transaction of this database has not yet committed. This is allowed
because we can say with confidence that other database's connections
will never be able to see this database's tables. If we were to allow
cross-database data access, that would require cross-database snapshot
visibility checks, and that would severely hinder these optimizations.
As an example, it would increase the work we need to do for snapshots:
For the snapshot data of tables that aren't shared catalogs, we only
need to consider our own database's backends for visibility. With
cross-database visibility, we would need to consider all active
backends for all snapshots, and this can be significantly more work.

Kind regards,

Matthias van de Meent
Neon (https://neon.tech/)



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: New PostgreSQL Contributors
Следующее
От: Farias de Oliveira
Дата:
Сообщение: Re: In Postgres 16 BETA, should the ParseNamespaceItem have the same index as it's RangeTableEntry?