From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
Cc: | Melanie Plageman <melanieplageman(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, Noah Misch <noah(at)leadboat(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
Subject: | Re: Confine vacuum skip logic to lazy_scan_skip |
Date: | 2025-02-27 17:49:34 |
Message-ID: | qphdlszwk3z2w4w6chs4tfheujtpanyayljdijd4fvsdsiq6sl@menvperc55q6 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2025-02-27 12:44:24 -0500, Andres Freund wrote:
> > CID 1592454: (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
> > 8. var_deref_op: Dereferencing null pointer per_buffer_data.
>
> That's exactly what the messages you quoted are discussing, no?
Ah, no, it isn't. But I still think the coverity alert and the patch don't
make sense, as per the below:
> > diff --git a/src/backend/storage/aio/read_stream.c b/src/backend/storage/aio/read_stream.c
> > index 04bdb5e6d4..18e9b4f3c4 100644
> > --- a/src/backend/storage/aio/read_stream.c
> > +++ b/src/backend/storage/aio/read_stream.c
> > @@ -666,6 +666,8 @@ read_stream_next_buffer(ReadStream *stream, void **per_buffer_data)
> > READ_BUFFERS_ISSUE_ADVICE : 0)))
> > {
> > /* Fast return. */
> > + if (per_buffer_data)
> > + *per_buffer_data = get_per_buffer_data(stream, oldest_buffer_index);
> > return buffer;
> > }
>
> A few lines above:
> Assert(stream->per_buffer_data_size == 0);
>
> The fast path isn't used when per buffer data is used. Adding a check for
> per_buffer_data and assigning something to it is nonsensical.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Alena Rybakina | 2025-02-27 18:00:29 | Re: Vacuum statistics |
Previous Message | Andres Freund | 2025-02-27 17:44:24 | Re: Confine vacuum skip logic to lazy_scan_skip |