Re: Confine vacuum skip logic to lazy_scan_skip
От | Melanie Plageman |
---|---|
Тема | Re: Confine vacuum skip logic to lazy_scan_skip |
Дата | |
Msg-id | CAAKRu_arSnZdXryWxZ6CqmR631Xs3LOptVOyoKoBbzh7_xbeJA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Confine vacuum skip logic to lazy_scan_skip (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Confine vacuum skip logic to lazy_scan_skip
|
Список | pgsql-hackers |
On Thu, Feb 27, 2025 at 1:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > I wonder if it'd be a good idea to add something like > > Assert(stream->distance == 1); > Assert(stream->pending_read_nblocks == 0); > Assert(stream->per_buffer_data_size == 0); > + Assert(per_buffer_data == NULL); > > in read_stream_next_buffer. I doubt that this will shut Coverity > up, but it would help to catch caller coding errors, i.e. passing > a per_buffer_data pointer when there's no per-buffer data. I think this is a good stopgap. I was discussing adding this assert off-list with Thomas and he wanted to detail his more ambitious plans for type safety improvements in the read stream API. Less on the order of a redesign and more like a separate read_stream_next_buffer()s for when there is per buffer data and when there isn't. And a by-value and by-reference version for the one where there is data. I'll plan to add this assert tomorrow if that discussion doesn't materialize. - Melanie
В списке pgsql-hackers по дате отправления: