pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jaime Casanova <jcasanov@systemguards.com.ec>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: andres@anarazel.de
Cc: pgsql-hackers@postgresql.org
Subject: Re: START_REPLICATION SLOT causing a crash in an assert build
Date: Tue, 13 Sep 2022 22:07:50 -0500
Message-ID: <YyFFhixwFK2jk6zW@ahch-to> (raw)
In-Reply-To: <20220913.184845.2130916662920954058.horikyota.ntt@gmail.com>
References: <YxfagaTXUNa9ggLb@ahch-to>
	<20220907193908.prfnxnt6diao2fli@awork3.anarazel.de>
	<YyAXoU4CQhlZ4/ZN@ahch-to>
	<20220913.184845.2130916662920954058.horikyota.ntt@gmail.com>

On Tue, Sep 13, 2022 at 06:48:45PM +0900, Kyotaro Horiguchi wrote:
> Nice finding.
> 
> At Tue, 13 Sep 2022 00:39:45 -0500, Jaime Casanova <jcasanov@systemguards.com.ec> wrote in 
> > and the problem seems to be that after zero'ing the stats that includes
> > the name of the replication slot, this simple patch fixes it... not sure
> > if it's the right fix though...
> 
> That doesn't work. since what that function clears is not the name in
> the slot struct but that in stats entry.
> 

you're right... the curious thing is that I tested it and it worked, but
now it doesn't... maybe it was too late for me...

> The cause is what pg_stat_reset_replslot wants to do does not match
> what pgstat feature thinks as reset.
> 
[...]
> 
> Another measure would be to add the region to wipe-out on reset to
> PgStat_KindInfo, but it seems too much.. (attached)
> 

This patch solves the problem, i didn't like the other solution because
as you say it partly nullify the protection of the assertion.

-- 
Jaime Casanova
Director de Servicios Profesionales
SystemGuards - Consultores de PostgreSQL





view thread (33+ messages)  latest in thread

Message-ID: <YyFFhixwFK2jk6zW@ahch-to>
Permalink:  ../YyFFhixwFK2jk6zW@ahch-to/
Also on:    postgresql.org/message-id/YyFFhixwFK2jk6zW@ahch-to

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: jcasanov@systemguards.com.ec, horikyota.ntt@gmail.com, andres@anarazel.de
  Subject: Re: START_REPLICATION SLOT causing a crash in an assert build
  In-Reply-To: <YyFFhixwFK2jk6zW@ahch-to>
  References: <YxfagaTXUNa9ggLb@ahch-to> <20220907193908.prfnxnt6diao2fli@awork3.anarazel.de> <YyAXoU4CQhlZ4/ZN@ahch-to> <20220913.184845.2130916662920954058.horikyota.ntt@gmail.com> <YyFFhixwFK2jk6zW@ahch-to>

* 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