Re: Using read stream in autoprewarm

Nazir Bilal Yavuz <byavuz81@gmail.com>

From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Matheus Alcantara <mths.dev@pm.me>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-11-29T11:19:41Z
Lists: pgsql-hackers

Attachments

Hi,

Thank you for looking into this.

On Fri, 29 Nov 2024 at 06:55, Kirill Reshke <reshkekirill@gmail.com> wrote:

> > + old_blk = &(p->block_info[p->pos - 1]);
> > + cur_blk = &(p->block_info[p->pos]);
> Should we Assert(p->pos > 0 && p->pos < *something*)

I think it is worth adding:

+ Assert(p->pos > 0 && p->pos < p->max_pos);
+
+ old_blk = &(p->block_info[p->pos - 1]);
+ cur_blk = &(p->block_info[p->pos]);

v4 is attached.

--
Regards,
Nazir Bilal Yavuz
Microsoft

Commits

  1. Fix autoprewarm neglect of tablespaces