Re: elog.c query_id support vs shutdown

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: elog.c query_id support vs shutdown
Date: 2021-08-08 06:02:58
Message-ID: 20210808060258.6u3pkkemyasijw4h@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 08, 2021 at 01:46:39PM +0800, Julien Rouhaud wrote:
> On Sat, Aug 07, 2021 at 04:44:07PM -0700, Andres Freund wrote:
> >
> > As currently implemented those pgstat_get_my_query_id() calls are not
> > safe. It's fine during backend startup because MyBEEntry is not set, but
> > during shutdown that's not ok, because we never unset MyBEEntry.
> >
> > andres(at)awork3:~/src/postgresql$ /home/andres/build/postgres/dev-assert/vpath/src/backend/postgres --single postgres -D /srv/dev/pgdev-dev/ -c 'log_line_prefix=%Q' -c log_min_messages=debug1
> > [...]
> > PostgreSQL stand-alone backend 15devel
> > backend> 0NOTICE: shutting down
> > 0DEBUG: performing replication slot checkpoint
> > Segmentation fault
>
FTR I just added an open item for that.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2021-08-08 06:04:40 Re: row filtering for logical replication
Previous Message Julien Rouhaud 2021-08-08 05:46:39 Re: elog.c query_id support vs shutdown