idea: reduce logical slot induced bloat when multiple databases areused

Поиск
Список
Период
Сортировка
От Andres Freund
Тема idea: reduce logical slot induced bloat when multiple databases areused
Дата
Msg-id 20200404195823.hjxc5cnnapb22hzm@alap3.anarazel.de
обсуждение исходный текст
Список pgsql-hackers
Hi,

Right now we prevent dead rows in non-shared catalog tables from being
removed whenever there is a logical slot with an older catalog
xmin. Obviously that's required when the slot is in the current
database, but it's not when the slot is in a different database.

I don't think we can afford to iterate through the slots to determine
the "current database horizon" in GetSnapshotData(), but it should not
be a problem to do so in GetOldestXmin(). The latter should normally not
be called at a very high frequency.

I think in busy clusters this could help even when only one database is
in active use, because it allows relfrozenxid in template0/1 to be
advanced more aggressively.


I'm writing this down as an idea, I don't plan to work on this anytime
soon.

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: backup manifests and contemporaneous buildfarm failures
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A problem about partitionwise join