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

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: 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: 2021-12-31 06:14:46
Message-ID: CALj2ACWiWOLWZwAS+gtq+VF-cifFr5NrZJcvhf3WdX=HHdqYoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 23, 2021 at 4:46 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> Hi,
>
> 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.
>
> Thoughts?

Here's the v1 patch, please review it.

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v1-0001-Skip-processing-snapshot-mapping-files-during-end.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-12-31 06:39:02 Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
Previous Message tanghy.fnst@fujitsu.com 2021-12-31 06:13:00 RE: [PATCH]Comment improvement in publication.sql