RE: Introduce XID age based replication slot invalidation

Поиск
Список
Период
Сортировка
Искать
От
Hayato Kuroda (Fujitsu)
Тема
RE: Introduce XID age based replication slot invalidation
Дата
Msg-id
OSCPR01MB149667506BCFD684FEFDCB919F511A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Ответ на
Список
Дерево обсуждения
Introduce XID age based replication slot invalidation John H <johnhyvr@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
RE: Introduce XID age based replication slot invalidation "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Re: Introduce XID age based replication slot invalidation John H <johnhyvr@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
RE: Introduce XID age based replication slot invalidation "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Re: Introduce XID age based replication slot invalidation Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Introduce XID age based replication slot invalidation SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Re: Introduce XID age based replication slot invalidation SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Dear John,

> The first issue can be mitigated by 'max_slot_wal_keep_size'. However
> in the second case there are no good mechanisms to prioritize write
> availability of the database and avoid wraparound. The new GUC
> 'idle_replication_slot_timeout' partially addresses the concern if you
> have similar workloads. However it's hard to set the same setting
> across a fleet of different applications.

IIUC, the feature can directly avoid the wraparound issue than other
invalidation mechanism. The motivation seems enough for me.

> The patch currently attempts to invalidate once-per-autovacuum worker.
> We're wondering if it should attempt invalidation on a per-relation
> basis within the vacuum call itself. That would account for scenarios
> where the cost_delay or naptime is high between autovac executions.

I have a concern that age calculation acquire the lock for XidGenLock thus
performance can be affected. Do you have insights for it?
> 
> Invalidation happens in CHECKPOINT, similar to
> 'idle_replication_slot_timeout', and when VACUUM occurs.

Let me confirm because I'm new. VACUUM can also trigger because old XID make
VACUUM fail, right? Timeout is aimed for WAL thus it is not so related with VACUUM,
which does not recycle segments.

In contrast, is there a possibility that XID-age check can be done only at VACUUM?


Regarding the patch, try_replication_slot_invalidation() and ReplicationSlotIsXIDAged()
do the same task. Can we reduce duplicated part?

Best regards,
Hayato Kuroda
FUJITSU LIMITED

В списке pgsql-hackers по дате отправления
От: 赵庭海(庭章)
Дата:
От: Nazir Bilal Yavuz
Дата:
FAQ