pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-bugs mailing list <pgsql-bugs@postgresql.org>
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Date: Thu, 17 Nov 2022 16:55:34 +0100
Message-ID: <Y3ZZduQbDvgbK9Gh@depesz.com> (raw)
In-Reply-To: <CAA4eK1JSTC9uJ_CTTFxMZV6wSr2hkCX4bwtruUp9wX_K8JLo1Q@mail.gmail.com>
References: <Yz2hivgyjS1RfMKs@depesz.com>
	<CAA4eK1JTE0tLgR5qzVECrKJV5VVTnDa0k5LQ4TOkBAA=MySj3g@mail.gmail.com>
	<Y00cp4sNQtFNoo25@depesz.com>
	<CAA4eK1KUMFfVrOpP7VgAPUN7rabvfr5GhcQh++T8BX-t7=e5YA@mail.gmail.com>
	<Y0/bSiDkYlhiSmOW@depesz.com>
	<Y1E3JIFqb0mFBZNR@depesz.com>
	<Y25hQCKLnolQaFN9@depesz.com>
	<CAA4eK1JSTC9uJ_CTTFxMZV6wSr2hkCX4bwtruUp9wX_K8JLo1Q@mail.gmail.com>

On Mon, Nov 14, 2022 at 05:08:15PM +0530, Amit Kapila wrote:
> You may have the LOG for "attempting to remove WAL segments older than
> log file %s", if so, please share. Also on similar lines, I think we
> need to add some LOGs before calling RemoveOldXlogFiles() to know
> where our computation to remove files goes off. Something, like the
> attached, would be helpful but note I have added this quickly on my
> working branch to show you what I have in mind. You may need small
> changes based on the branch you are working on.

Hi,
I tried to apply it on pg12.12, both clean from
https://www.postgresql.org/ftp/source/v12.12/ and one that is being
built for pgdg .deb for 12.12, and in both cases it failed.

Current state of xlog.c from the deb building (which is what I have to
build) is available at https://depesz.com/various/xlog.c.xz

I don't trust myself with modifing patches in C - any chance I could ask
you to check why it doesn't apply, and possibly make new one that
applies on pg12?

I tried to see what is going on there, but you have in patch lines that
I don't see in my version of xlog.c, so I'm not sure what to do with it.

The procedure I followed to get this xlog.c in this form was:

dget -x https://apt-archive.postgresql.org/pub/repos/apt/pool/main/p/postgresql-12/postgresql-12_12.1-2.pgdg...
dpkg-source -x postgresql-12_12.1-2.pgdg100%2B1.dsc
cd postgresql-12-12.1/
sudo apt build-dep .
quilt push -a

and I think that was it.

Best regards,

depesz






view thread (57+ messages)  latest in thread

Message-ID: <Y3ZZduQbDvgbK9Gh@depesz.com>
Permalink:  ../Y3ZZduQbDvgbK9Gh@depesz.com/
Also on:    postgresql.org/message-id/Y3ZZduQbDvgbK9Gh@depesz.com

 · 

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: depesz@depesz.com, amit.kapila16@gmail.com
  Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
  In-Reply-To: <Y3ZZduQbDvgbK9Gh@depesz.com>

* 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