pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: jeff.janes@gmail.com
Cc: mk@071.ovh
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17103: WAL segments are not removed after exceeding max_slot_wal_keep_size
Date: Thu, 15 Jul 2021 15:09:55 -0400
Message-ID: <202107151909.q26rrvd3ius7@alvherre.pgsql> (raw)
In-Reply-To: <20210715.163348.2298778826242193015.horikyota.ntt@gmail.com>

On 2021-Jul-15, Kyotaro Horiguchi wrote:

> This is it. It is for the master branch but also applicable to 14 as
> is. Not needed for earlier version.
> I believe the test works for Windows but haven't checked.

I looked at it.  I think it is better to make the calls to 
ReplicationSlotsComputeRequiredLSN() in slot.c (which is where most other
calls to that function are).  Also we should recompute the minimum
required Xmin at that point.

Another change I did was move the "*invalidated=true" assignment to the
block where we actually invalidate the slot; in your patch you were
doing it possibly too early if the slot was in use by some other
process.  (For end effect it probably doesn't matter much, but it's
better to have it right.)

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/

Attachments:

  v2-0001-Advance-old-segment-horizon-properly-after-slot-i.patch (text/x-diff, 0B) download

view thread (27+ messages)  latest in thread

Message-ID: <202107151909.q26rrvd3ius7@alvherre.pgsql>
Permalink:  ../202107151909.q26rrvd3ius7@alvherre.pgsql/
Also on:    postgresql.org/message-id/202107151909.q26rrvd3ius7@alvherre.pgsql

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, horikyota.ntt@gmail.com, jeff.janes@gmail.com, mk@071.ovh, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17103: WAL segments are not removed after exceeding max_slot_wal_keep_size
  In-Reply-To: <202107151909.q26rrvd3ius7@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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