Hi Nazir,
On 07/03/2024 12:19, Nazir Bilal Yavuz wrote:
On Wed, 6 Mar 2024 at 18:23, Cédric Villemain
wrote:
The behavior is 100% OK, and in fact it might a bad idea to prefetch
block by block as the result is just to put more pressure on a system if
it is already under pressure.
Though
status, or you ensure to clean it first.
[1] https://man7.org/linux/man-pages/man2/posix_fadvise.2.html#DESCRIPTION
[2] https://elixir.bootlin.com/linux/latest/source/mm/readahead.c#L303
My apologize about the email address with sub-address which leads to
undelivered email. Please update with the current one.
---
Cédric Villemain +33 (0)6 20 30 22 52
https://Data-Bene.io
PostgreSQL Expertise, Support, Training, R&D
interest to go further in this direction.
---
Cédric Villemain +33 (0)6 20 30 22 52
https://Data-Bene.io
PostgreSQL Expertise, Support, Training, R&D
From 4cdc5e952e0cd729bde472bdc3d7ff7bbc3009ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Villemain?=
Date: Thu, 18 Jan 2024 01:00:37 +0
:25 AM, Cédric Villemain wrote:
Hi Palak,
I did a quick review of the patch:
+CREATE FUNCTION pg_buffercache_invalidate(IN int, IN bool default true)
+RETURNS bool
+AS 'MODULE_PATHNAME', 'pg_buffercache_invalidate'
+LANGUAGE C PARALLEL SAFE;
--> Not enforced anywhere,
t proposing that PostgreSQL handles those tasks
transparently or itself, but offering options to the users via
extensions like we do with pg_prewarm and pg_buffercache.
It's just the same for virtual memory/filesystem.
---
Cédric Villemain +33 (0)6 20 30 22 52
https://Data-Bene.io
PostgreSQL Expertise, Support, Training, R&D
}
+ else
+ {
+ UnlockBufHdr(bufHdr, buf_state);
+ return false;
+ }
Maybe safe to remove the else {} ...
Maybe more tempting to start the big if with the following instead less
nested...):
+ if ((buf_state & BM_VALID) != BM_VALID)
+ {
+ UnlockBufHdr(bufHdr, buf
s patches here:
* to use range prefetch in pg_prewarm (smgrprefetch only at the moment,
using smgrreadv to come next).
* to support nblocks=0 in smgrprefetch (posix_fadvise supports a len=0
to apply flag from offset to end of file).
Should I add to commitfest ?
---
Cédric Villemain +33 (0)6 20 3
counts', 0, true,
true, B'111000');
relpath | os_page_size | os_pages_free | pages_loaded |
pages_unloaded
--+--+---+--+
base/11874/16447 | 4096 |408376 |3 |
3
---