Re: START_REPLICATION SLOT causing a crash in an assert build

From: Andres Freund <andres(at)anarazel(dot)de>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: michael(at)paquier(dot)xyz, jkatz(at)postgresql(dot)org, jcasanov(at)systemguards(dot)com(dot)ec, pgsql-hackers(at)postgresql(dot)org, john(dot)naylor(at)enterprisedb(dot)com
Subject: Re: START_REPLICATION SLOT causing a crash in an assert build
Date: 2022-10-06 22:59:49
Message-ID: 20221006225949.dm3x2nflcaqudzon@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-10-06 14:10:46 +0900, Kyotaro Horiguchi wrote:
> +1. FWIW, the atttached is an example of what it looks like if we
> avoid file format change.

What about if we go the other direction - simply remove the name from the
stats entry at all. I don't actually think we need it anymore. Unless I am
missing something right now - entirely possible! - the danger that
pgstat_acquire_replslot() mentions doesn't actually exist [anymore]. After a
crash we throw away the old stats data and if a slot is dropped while shut
down, we'll not load the slot data at startup.

The attached is a rough prototype, but should be enough for Jaime to test and
Horiguchi to test / review / think about.

Amit, I CCed you, since you've thought a bunch about the dangers in this area
too.

Greetings,

Andres Freund

Attachment Content-Type Size
v3-0001-pgstat-Remove-slotname-from-PgStat_StatReplSlotEn.patch text/x-diff 5.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-10-06 23:10:33 Re: Reducing the chunk header sizes on all memory context types
Previous Message David Rowley 2022-10-06 22:38:05 Re: Reducing the chunk header sizes on all memory context types