From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Mark Haylock <mh@trineo.co.nz>
To: pgsql-general@lists.postgresql.org
Subject: Re: What do null column values for pg_stat_progress_vacuum mean?
Date: Fri, 6 Mar 2020 08:09:30 -0800
Message-ID: <92471e8a-fbdf-5349-8fa2-2c6afd9eed6e@aklaver.com> (raw)
In-Reply-To: <CACnJOOpYYLjYLvgGXZTs4yDBLVhK5fys4yhYveZnmCASgKZrzw@mail.gmail.com>
References: <CACnJOOpYYLjYLvgGXZTs4yDBLVhK5fys4yhYveZnmCASgKZrzw@mail.gmail.com>
On 3/5/20 6:39 PM, Mark Haylock wrote:
> Hi,
>
> We have an autovacuum process that has been running for almost 27 hours:
>
> SELECT * FROM pg_stat_activity WHERE pid = 11731;
> -[ RECORD 1 ]----+---------------------------------------
> datid | 16385
> datname | database_name
> pid | 11731
> usesysid |
> usename |
> application_name |
> client_addr |
> client_hostname |
> client_port |
> backend_start | 2020-03-04 23:40:14.828138+00
> xact_start | 2020-03-04 23:40:14.849367+00
> query_start | 2020-03-04 23:40:14.849367+00
> state_change | 2020-03-04 23:40:14.849368+00
> wait_event_type |
> wait_event |
> state | active
> backend_xid |
> backend_xmin | 3801997676
> query | autovacuum: VACUUM public.responses
> backend_type | autovacuum worker
>
> A row shows up in pg_stat_progress_vacuum, but it contains null values
> for every column.
>
> SELECT * FROM pg_stat_progress_vacuum WHERE pid = 11731;
> -[ RECORD 1 ]------+---------------
> pid | 11731
> datid | 16385
> datname | d2j496215lfs41
> relid |
> phase |
> heap_blks_total |
> heap_blks_scanned |
> heap_blks_vacuumed |
> index_vacuum_count |
> max_dead_tuples |
> num_dead_tuples |
>
> I see nothing in the documentation to suggest that this is an expected
> state - what does it mean?
Not sure, but you might try:
https://www.postgresql.org/docs/10/view-pg-locks.html
The pid column can be joined to the pid column of the pg_stat_activity
view to get more information on the session holding or awaiting each
lock, for example
SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa
ON pl.pid = psa.pid;
>
> Thanks,
> Mark.
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, mh@trineo.co.nz
Subject: Re: What do null column values for pg_stat_progress_vacuum mean?
In-Reply-To: <92471e8a-fbdf-5349-8fa2-2c6afd9eed6e@aklaver.com>
References: <CACnJOOpYYLjYLvgGXZTs4yDBLVhK5fys4yhYveZnmCASgKZrzw@mail.gmail.com> <92471e8a-fbdf-5349-8fa2-2c6afd9eed6e@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox