Re: pg_stat_get_replication_slot() marked not strict, crashes

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: pg_stat_get_replication_slot() marked not strict, crashes
Date: 2022-03-27 06:29:34
Message-ID: CALDaNm38-SfWui-jaYto_tcTvSRAw_FTC62NNZTGnKy=yc5ZGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 27, 2022 at 2:54 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> I'm working to increase the test coverage of pgstat related stuff higher (for
> the shared memory stats patch, of course).
>
> "Accidentally" noticed that
> SELECT * FROM pg_stat_get_replication_slot(NULL);
> crashes. This is present in HEAD and 14.
>
> I guess we'll have to add a code-level check in 14 to deal with this?

This problem is reproducible in both PG14 & Head, changing isstrict
solves the problem. In PG14 should we also add a check in
pg_stat_get_replication_slot so that it can solve the problem for the
existing users who have already installed PG14 or will this be handled
automatically when upgrading to the new version.

Regards,
Vignesh

Attachment Content-Type Size
0001-pg_stat_get_replication_slot-NULL-handling_Head.patch text/x-patch 2.6 KB
0001-pg_stat_get_replication_slot-NULL-handling_PG14.patch text/x-patch 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-27 07:13:00 Re: Invalid comment in ParallelQueryMain
Previous Message Tatsuo Ishii 2022-03-27 06:28:41 Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors