pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ryan MYJ <ryanmyj@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Hi All,
Date: Tue, 21 Feb 2023 09:51:14 -0500
Message-ID: <3952333.1676991074@sss.pgh.pa.us> (raw)
In-Reply-To: <CANJgbZcZbAb+Z0bF6Dqeh6UCm1H0A0sb5+PWfFvWQtLuniHvHw@mail.gmail.com>
References: <CANJgbZcZbAb+Z0bF6Dqeh6UCm1H0A0sb5+PWfFvWQtLuniHvHw@mail.gmail.com>

Ryan MYJ <ryanmyj@gmail.com> writes:
> Currently I'm working on upgrading a postgresql version from 9.3 to 12. The
> database size is around 700G.
> I finished the pg_upgrade process but when I ran 'analyze_new_cluster.sh'
> it stucked at the first log 'vacuumdb: processing database "otdb":
> Generating minimal optimizer statistics (1 target)'.

> Then I checked the active query, the following query has been running for
> several hours:
>    pid   |    db     |             start             |       lap       |
>          query
> ---------+-----------+-------------------------------+-----------------+------------------------------
>  1822933 |  otdb  | 2023-02-18 03:02:36.035755+08 | 04:56:41.408329 |
> ANALYZE pg_catalog.pg_class;

You omitted the pg_stat_activity columns that could give some insight
into why this is waiting.  The first thing I'd think of though is that
it's blocked waiting for a lock, in which case looking into pg_locks
to see what is blocking it could help.

			regards, tom lane





view thread (6+ messages)

Message-ID: <3952333.1676991074@sss.pgh.pa.us>
Permalink:  ../3952333.1676991074@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3952333.1676991074@sss.pgh.pa.us

 · 

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 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: tgl@sss.pgh.pa.us, ryanmyj@gmail.com
  Subject: Re: Hi All,
  In-Reply-To: <3952333.1676991074@sss.pgh.pa.us>
  References: <CANJgbZcZbAb+Z0bF6Dqeh6UCm1H0A0sb5+PWfFvWQtLuniHvHw@mail.gmail.com> <3952333.1676991074@sss.pgh.pa.us>

* 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