RE: pg_upgrade —link does it remove table bloat

From: Jason Ralph <jralph(at)affinitysolutions(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Michael Lewis <mlewis(at)entrata(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: pg_upgrade —link does it remove table bloat
Date: 2020-02-14 03:00:12
Message-ID: BN7PR04MB3826A2ED0FA7357863B146E0D0150@BN7PR04MB3826.namprd04.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>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.

@Adrian Klaver I guess I am after both, I would like to squeeze the most performance out of my tables and installation as possible. Also I would like to save space wherever possible. I have received a *bloat* load of information in this thread, so thanks. 😊

@Michael Lewis thanks for the idea of pg_repack, this looks awesome and I cant wait to test it.

Jason Ralph

-----Original Message-----
From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Sent: Thursday, February 13, 2020 6:21 PM
To: Jason Ralph <jralph(at)affinitysolutions(dot)com>; Michael Lewis <mlewis(at)entrata(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_upgrade —link does it remove table bloat

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(dot)klaver(at)aklaver(dot)com
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason Swails 2020-02-14 03:54:49 Cannot connect to postgresql-11 from another machine after boot
Previous Message Adrian Klaver 2020-02-13 23:20:49 Re: pg_upgrade —link does it remove table bloat