public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kashif Zeeshan <[email protected]>
To: Dimitrios Apostolou <[email protected]>
Cc: [email protected]
Subject: Re: pg_stat_io clarifications: background worker, writes and reads
Date: Wed, 15 May 2024 09:03:55 +0500
Message-ID: <CAAPsdhc+Axq=ZbY2pOicU58asj4TJG9u9iR6PFMNiKP4yW3G+g@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Hi
background workers are used to perform tasks on db e.g. I/O, replication,
clone schema, vacuum etc, you can find more details on following links.
https://www.postgresql.org/docs/current/bgworker.html#:~:text=PostgreSQL%20can%20be%20extended%20to,...
.
Regards
Kashif Zeeshan
Bitnine
On Wed, May 15, 2024 at 1:26 AM Dimitrios Apostolou <[email protected]> wrote:
> Hello list,
>
> what is the "background worker" in the pg_stat_io statistics view? I'm
> reading the documentation but can't figure this one out knowing that it is
> not autovacuum or bgwriter. And I'm not aware of any extension I might
> have with registered background worker.
>
> Additionally, how can it be evictions > writes? I would expect every
> eviction to cause a write.
>
> Finally about "hits", I understand they are reads found in shared_buffers,
> so they never registered into the "reads" counter. So is "reads" in
> pg_stat_io the equivalent to misses, i.e. the opposite of "hits", the read
> attempts not found in the shared_buffers, that needed to be fetched from
> the disk (or OS buffercache)?
>
> backend_type | object | context | reads | read_time |
> writes | write_time | writebacks | writeback_time | extends | extend_time |
> op_bytes | hits | evictions | reuses | fsyncs | fsync_time |
> stats_reset
>
> -------------------+---------------+---------+---------+-------------+--------+------------+------------+----------------+---------+-------------+----------+-----------+-----------+--------+--------+------------+-------------------------------
> background worker | relation | normal | 5139575 | 2196288.011 |
> 63277 | 1766.94 | 0 | 0 | 0 | 0 |
> 8192 | 876913705 | 5139653 | | 0 | 0 | 2024-04-08
> 08:50:02.971192+00
>
>
> Thank you in advance,
> Dimitris
>
>
>
>
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pg_stat_io clarifications: background worker, writes and reads
In-Reply-To: <CAAPsdhc+Axq=ZbY2pOicU58asj4TJG9u9iR6PFMNiKP4yW3G+g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox