Re: skip replication slot snapshot/map file removal during end-of-recovery checkpoint

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: skip replication slot snapshot/map file removal during end-of-recovery checkpoint
Date: 2022-01-05 23:34:01
Message-ID: 091881BB-96B3-46EF-95B6-0C0B70A09829@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/23/21, 3:17 AM, "Bharath Rupireddy" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> Currently the end-of-recovery checkpoint can be much slower, impacting
> the server availability, if there are many replication slot files
> XXXX.snap or map-XXXX to be enumerated and deleted. How about skipping
> the .snap and map- file handling during the end-of-recovery
> checkpoint? It makes the server available faster and the next regular
> checkpoint can deal with these files. If required, we can have a GUC
> (skip_replication_slot_file_handling or some other better name) to
> control this default being the existing behavior.

I suggested something similar as a possibility in the other thread
where these tasks are being discussed [0]. I think it is worth
considering, but IMO it is not a complete solution to the problem. If
there are frequently many such files to delete and regular checkpoints
are taking longer, the shutdown/end-of-recovery checkpoint could still
take a while. I think it would be better to separate these tasks from
checkpointing instead.

Nathan

[0] https://postgr.es/m/A285A823-0AF2-4376-838E-847FA4710F9A%40amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2022-01-05 23:42:24 Re: Report checkpoint progress in server logs
Previous Message Justin Pryzby 2022-01-05 23:18:06 Re: Emit "checkpoint skipped because system is idle" message at LOG level if log_checkpoints is set