pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jason Ralph <jralph@affinitysolutions.com>
To: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg_upgrade —link does it remove table bloat
Date: Thu, 13 Feb 2020 15:20:49 -0800
Message-ID: <5162e49b-8c9e-7c2c-6ebf-77fb123d0645@aklaver.com> (raw)
In-Reply-To: <BN7PR04MB3826B87E2ADB8D5D9E50E74CD01A0@BN7PR04MB3826.namprd04.prod.outlook.com>
References: <BN7PR04MB382636FF273A9E543B970468D01A0@BN7PR04MB3826.namprd04.prod.outlook.com>
	<b9a6da6f-8196-f485-5c45-6437c58ee812@aklaver.com>
	<CAHOFxGrWFNwC5B+K7iofDb_49r+JKcXwGZoWyEcQkO66kRSc9w@mail.gmail.com>
	<BN7PR04MB3826588843793E892430E00ED01A0@BN7PR04MB3826.namprd04.prod.outlook.com>
	<b48905a8-79ce-d187-d69d-d68193ce6c42@aklaver.com>
	<BN7PR04MB3826B87E2ADB8D5D9E50E74CD01A0@BN7PR04MB3826.namprd04.prod.outlook.com>

On 2/13/20 12:45 PM, Jason Ralph wrote:
> @Adrian Klaver,
> I was concerned with the 1.4 value of tbloat and wastedbytes value, then again the last autovacuum was at 2020-02-13 02:25:22.533372-05 and I took this snapshot at 3:44PMEST.  So it may be ok, what do you think?

What is your concern, storage space or performance of queries?

If performance then an EXPLAIN ANALYZE on a query will help show whether 
there is an issue or not.

> 
> 
> current_database | schemaname |                 tablename                 | tbloat | wastedbytes |                     iname                     | ibloat | wastedibytes
> notimportant         | public              | members                                   |    1.4   |  3080314880  | members_cobrid                      |    0.2 |            0
> 
> 
> 
> 
> 
> notimportant=# select * from pg_stat_user_tables where relname = 'members';
> -[ RECORD 1 ]-------+------------------------------
> relid               | 2045245
> schemaname          | public
> relname             | members
> seq_scan            | 55065
> seq_tup_read        | 201069350222
> idx_scan            | 5349501175
> idx_tup_fetch       | 7201402647
> n_tup_ins           | 910616
> n_tup_upd           | 46730942
> n_tup_del           | 1
> n_tup_hot_upd       | 41845682
> n_live_tup          | 18262438
> n_dead_tup          | 14740
> n_mod_since_analyze | 2476
> last_vacuum         | 2019-10-13 01:01:40.587534-04
> last_autovacuum     | 2020-02-13 02:25:22.533372-05
> last_analyze        | 2019-10-13 01:01:41.916929-04
> last_autoanalyze    | 2020-02-13 13:44:46.273096-05
> vacuum_count        | 15
> autovacuum_count    | 92
> analyze_count       | 15
> autoanalyze_count   | 243
> 
> Jason Ralph
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (8+ messages)  latest in thread

Message-ID: <5162e49b-8c9e-7c2c-6ebf-77fb123d0645@aklaver.com>
Permalink:  ../5162e49b-8c9e-7c2c-6ebf-77fb123d0645@aklaver.com/
Also on:    postgresql.org/message-id/5162e49b-8c9e-7c2c-6ebf-77fb123d0645@aklaver.com

 · 

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: adrian.klaver@aklaver.com, jralph@affinitysolutions.com, mlewis@entrata.com
  Subject: Re: pg_upgrade —link does it remove table bloat
  In-Reply-To: <5162e49b-8c9e-7c2c-6ebf-77fb123d0645@aklaver.com>
  References: <BN7PR04MB382636FF273A9E543B970468D01A0@BN7PR04MB3826.namprd04.prod.outlook.com> <b9a6da6f-8196-f485-5c45-6437c58ee812@aklaver.com> <CAHOFxGrWFNwC5B+K7iofDb_49r+JKcXwGZoWyEcQkO66kRSc9w@mail.gmail.com> <BN7PR04MB3826588843793E892430E00ED01A0@BN7PR04MB3826.namprd04.prod.outlook.com> <b48905a8-79ce-d187-d69d-d68193ce6c42@aklaver.com> <BN7PR04MB3826B87E2ADB8D5D9E50E74CD01A0@BN7PR04MB3826.namprd04.prod.outlook.com> <5162e49b-8c9e-7c2c-6ebf-77fb123d0645@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