Re: pg_stat_get_replication_slot() marked not strict, crashes

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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-26 21:52:23
Message-ID: 20220326215223.k5ucyeeggwlex3xs@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-03-26 17:41:53 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > I wonder if we ought to make PG_GETARG_DATUM(n) assert that !PG_ARGISNULL(n)?
> > That'd perhaps make it easier to catch some of these...
>
> Don't see the point; such cases will crash just fine without any
> assert. The problem is lack of test coverage ...

Not reliably. Byval types typically won't crash, just do something
bogus. As e.g. in the case of pg_stat_get_subscription_stats(NULL) I found to
also be wrong upthread.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2022-03-26 21:52:53 Re: Column Filtering in Logical Replication
Previous Message Andrew Dunstan 2022-03-26 21:48:39 Re: Why is lorikeet so unstable in v14 branch only?