Re: Use streaming read API in ANALYZE

Nazir Bilal Yavuz <byavuz81@gmail.com>

From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Date: 2024-03-26T11:51:27Z
Lists: pgsql-hackers

Attachments

Hi,

On Wed, 28 Feb 2024 at 14:42, Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:
>
>
> The new version of the streaming read API [1] is posted. I updated the
> streaming read API changes patch (0001), using the streaming read API
> in ANALYZE patch (0002) remains the same. This should make it easier
> to review as it can be applied on top of master
>
>

The new version of the streaming read API is posted [1]. I rebased the
patch on top of master and v9 of the streaming read API.

There is a minimal change in the 'using the streaming read API in ANALYZE
patch (0002)', I changed STREAMING_READ_FULL to STREAMING_READ_MAINTENANCE
to copy exactly the same behavior as before. Also, some benchmarking
results:

I created a 22 GB table and set the size of shared buffers to 30GB, the
rest is default.

╔═══════════════════════════╦═════════════════════╦════════════╗
║                           ║  Avg Timings in ms  ║            ║
╠═══════════════════════════╬══════════╦══════════╬════════════╣
║                           ║  master  ║  patched ║ percentage ║
╠═══════════════════════════╬══════════╬══════════╬════════════╣
║     Both OS cache and     ║          ║          ║            ║
║  shared buffers are clear ║ 513.9247 ║ 463.1019 ║    %9.9    ║
╠═══════════════════════════╬══════════╬══════════╬════════════╣
║   OS cache is loaded but  ║          ║          ║            ║
║  shared buffers are clear ║ 423.1097 ║ 354.3277 ║    %16.3   ║
╠═══════════════════════════╬══════════╬══════════╬════════════╣
║ Shared buffers are loaded ║          ║          ║            ║
║                           ║  89.2846 ║  84.6952 ║    %5.1    ║
╚═══════════════════════════╩══════════╩══════════╩════════════╝

Any kind of feedback would be appreciated.

[1]:
https://www.postgresql.org/message-id/CA%2BhUKGL-ONQnnnp-SONCFfLJzqcpAheuzZ%2B-yTrD9WBM-GmAcg%40mail.gmail.com

-- 
Regards,
Nazir Bilal Yavuz
Microsoft

Commits

  1. Allow ReadStream to be consumed as raw block numbers.

  2. Generalize relation analyze in table AM interface