pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Imseih (AWS), Sami <simseih@amazon.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Add index scan progress to pg_stat_progress_vacuum
Date: Wed, 9 Mar 2022 16:52:37 -0800
Message-ID: <20220310005237.GA307769@nathanxps13> (raw)
In-Reply-To: <99A5CBE8-EC10-42AA-ABB4-4C812EEFD294@amazon.com>
References: <28F7536A-3E62-4A6B-9705-A2377A2D03AE@amazon.com>
	<CAH2-Wzmk7fJuUNVX85AR3eS7MUGait7LrbhP8_8Y74W=m61Hnw@mail.gmail.com>
	<20220225195253.GA663211@nathanxps13>
	<B741F5D1-2B29-4CD6-8938-E6265AB45476@amazon.com>
	<CAD21AoA4kNdG6Qi8Qr4vFpvrGKd9MqjVPLUVZMEoBWHdCqfu9Q@mail.gmail.com>
	<F5F2CD8C-49D4-4B9A-983F-E3FF0E8CF048@amazon.com>
	<CAD21AoBW6SMJ96CNoMeu+f_BR4jmatPcfVA016FdD2hkLDsaTA@mail.gmail.com>
	<D4BBFE30-AB76-49E1-9A47-5A2851CCCB9F@amazon.com>
	<CAD21AoDf4pf89i7fgzrHDdJueNHLm4x92xHjcDeYaV+pdhem-Q@mail.gmail.com>
	<99A5CBE8-EC10-42AA-ABB4-4C812EEFD294@amazon.com>

I took a look at the latest patch set.

+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>indexes_total</structfield> <type>bigint</type>
+      </para>
+      <para>
+       The number of indexes to be processed in the 
+       <literal>vacuuming indexes</literal> 
+       or <literal>cleaning up indexes</literal> phase. It is set to
+       <literal>0</literal> when vacuum is not in any of these phases.
+      </para></entry>

Could we avoid resetting it to 0 unless INDEX_CLEANUP was turned off or
failsafe kicked in?  It might be nice to know how many indexes the vacuum
intends to process.  I don't feel too strongly about this, so if it would
add a lot of complexity, it might be okay as is.

 	BTreeShmemInit();
 	SyncScanShmemInit();
 	AsyncShmemInit();
+	vacuum_worker_init();

Don't we also need to add the size of the hash table to
CalculateShmemSize()?

+ * A command type can optionally define a callback function
+ * which will derive Datum values rather than use values
+ * directly from the backends progress array.

I think this can be removed.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (139+ messages)  latest in thread

Message-ID: <20220310005237.GA307769@nathanxps13>
Permalink:  ../20220310005237.GA307769@nathanxps13/
Also on:    postgresql.org/message-id/20220310005237.GA307769@nathanxps13

 · 

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: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, simseih@amazon.com, sawada.mshk@gmail.com, pg@bowt.ie, bossartn@amazon.com, pryzby@telsasoft.com
  Subject: Re: Add index scan progress to pg_stat_progress_vacuum
  In-Reply-To: <20220310005237.GA307769@nathanxps13>

* 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