pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Ignore invalidated slots while computing oldest catalog Xmin 4+ messages / 1 participants [nested] [flat]
* pgsql: Ignore invalidated slots while computing oldest catalog Xmin @ 2022-11-22 09:56 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2022-11-22 09:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidated, until the slot is dropped. This could be catastrophic if catalog churn is high. Change the computation of Xmin to ignore invalidated slots, to prevent dead rows from accumulating. Backpatch to 13, where slot invalidation appeared. Author: Sirisha Chamarthi <sirichamarthi22@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/CAKrAKeUEDeqquN9vwzNeG-CN8wuVsfRYbeOUV9qKO_RHok=j+g@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1b3ed757145dd6fa29feb6a31084527a6d6a46e3 Modified Files -------------- src/backend/replication/slot.c | 7 +++++++ src/backend/storage/ipc/procarray.c | 3 +++ 2 files changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Ignore invalidated slots while computing oldest catalog Xmin @ 2022-11-22 09:56 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2022-11-22 09:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidated, until the slot is dropped. This could be catastrophic if catalog churn is high. Change the computation of Xmin to ignore invalidated slots, to prevent dead rows from accumulating. Backpatch to 13, where slot invalidation appeared. Author: Sirisha Chamarthi <sirichamarthi22@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/CAKrAKeUEDeqquN9vwzNeG-CN8wuVsfRYbeOUV9qKO_RHok=j+g@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0557e1770230fe5ca855fdf45bb297bd38a9ec1b Modified Files -------------- src/backend/replication/slot.c | 7 +++++++ src/backend/storage/ipc/procarray.c | 3 +++ 2 files changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Ignore invalidated slots while computing oldest catalog Xmin @ 2022-11-22 09:56 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2022-11-22 09:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidated, until the slot is dropped. This could be catastrophic if catalog churn is high. Change the computation of Xmin to ignore invalidated slots, to prevent dead rows from accumulating. Backpatch to 13, where slot invalidation appeared. Author: Sirisha Chamarthi <sirichamarthi22@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/CAKrAKeUEDeqquN9vwzNeG-CN8wuVsfRYbeOUV9qKO_RHok=j+g@mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/36eeb37cd611c0a0bfb5743d9ddbef8f04fc87f3 Modified Files -------------- src/backend/replication/slot.c | 7 +++++++ src/backend/storage/ipc/procarray.c | 3 +++ 2 files changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Ignore invalidated slots while computing oldest catalog Xmin @ 2022-11-22 09:56 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2022-11-22 09:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidated, until the slot is dropped. This could be catastrophic if catalog churn is high. Change the computation of Xmin to ignore invalidated slots, to prevent dead rows from accumulating. Backpatch to 13, where slot invalidation appeared. Author: Sirisha Chamarthi <sirichamarthi22@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/CAKrAKeUEDeqquN9vwzNeG-CN8wuVsfRYbeOUV9qKO_RHok=j+g@mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1ad033df16df8d9f9e9f597ca31915266dfbdfb9 Modified Files -------------- src/backend/replication/slot.c | 7 +++++++ src/backend/storage/ipc/procarray.c | 3 +++ 2 files changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2022-11-22 09:56 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-11-22 09:56 pgsql: Ignore invalidated slots while computing oldest catalog Xmin Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-11-22 09:56 pgsql: Ignore invalidated slots while computing oldest catalog Xmin Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-11-22 09:56 pgsql: Ignore invalidated slots while computing oldest catalog Xmin Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-11-22 09:56 pgsql: Ignore invalidated slots while computing oldest catalog Xmin Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox