pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: How can i be certain autovacuum is causing reuse if table still grows
Date: Tue, 28 Jul 2020 00:15:54 -0500
Message-ID: <2500ca1c-312e-c495-ad98-1b593d030c71@gmail.com> (raw)
In-Reply-To: <CP2PR80MB07072BAFCF4B2824E8D567788C730@CP2PR80MB0707.lamprd80.prod.outlook.com>
References: <FR1PR80MB071069E71B2758BB9D187EC18C770@FR1PR80MB0710.lamprd80.prod.outlook.com>
	<CP2PR80MB0707AE54D878CA370750BE908C720@CP2PR80MB0707.lamprd80.prod.outlook.com>
	<CAKFQuwYRfH0JMfubcKL=U6oo1cXrtb44H5O+ywXyuKDKg96_KA@mail.gmail.com>
	<CP2PR80MB0707312D852432398C61BDD08C720@CP2PR80MB0707.lamprd80.prod.outlook.com>
	<CAODZiv5PeT90z6Ou4pgj9s39oBoYbB6STy_azMSekeDHUCHAEQ@mail.gmail.com>
	<CP2PR80MB0707395805CE22D89FEB3D278C720@CP2PR80MB0707.lamprd80.prod.outlook.com>
	<CAODZiv7MrqtzMAZ2vZs5gS1Rv935zjggdZmKAyAVZB6a5H1AJQ@mail.gmail.com>
	<20d2fb88-89f8-34b9-0e23-81a8b1d8c7a2@gmail.com>
	<CP2PR80MB07072BAFCF4B2824E8D567788C730@CP2PR80MB0707.lamprd80.prod.outlook.com>


 > All lines even old ones might be updated by our application.

Ah.  Even so, there are benefits to maintaining "lots of smaller chunks" 
instead of One Giant Table: "pg_dump --jobs=X" will run faster, for example, 
when there are more small-to-mid-sized tables instead of A Few Giant 
Tables.  Ditto "reindexdb --jobs=X".

Given that even "old" records get updated, I'd look into some other key that 
you can "naturally" partition on.

On 7/27/20 10:54 PM, Sidney Aloisio Ferreira Pryor wrote:
> Thank you Ron.
> Yes there is a column id in which value is provided by a sequence.
>
> But it was not clear to me exactly how to partition?
> The idea is to cover a limited range of "id" so there will be less lines 
> to vacuum on each operation?
>
> Because yet we will need eventually to vacuum all others.
> All lines even old ones might be updated by our application.
>
> ----------------------------------------------------------------------------
> *De:* Ron <ronljohnsonjr@gmail.com>
> *Enviado:* terça-feira, 28 de julho de 2020 00:39
> *Para:* pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
> *Assunto:* Re: How can i be certain autovacuum is causing reuse if table 
> still grows
> On 7/27/20 5:19 PM, Keith Fiske wrote:
> [snip]
> > Also, I would not recommend partitioning simply to improve vacuuming.
> > Especially if extensive tuning hasn't been tried first. Most times you can
> > get per-table tuning working well enough to get autovacuum running
> > properly. Especially on 9.6 and even more-so on PG11, where autovacuum has
> > itself been improved.
>
> SIMPLY to improve vacuum performance?  No.  But there are reasons that
> partitioning was "invented", and minimizing the work needed to be done on
> the whole of a Very Large and Rapidly Growing table is one of them.
>
> -- 
> Angular momentum makes the world go 'round.
>
>

-- 
Angular momentum makes the world go 'round.

view thread (22+ messages)  latest in thread

Message-ID: <2500ca1c-312e-c495-ad98-1b593d030c71@gmail.com>
Permalink:  ../2500ca1c-312e-c495-ad98-1b593d030c71@gmail.com/
Also on:    postgresql.org/message-id/2500ca1c-312e-c495-ad98-1b593d030c71@gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: How can i be certain autovacuum is causing reuse if table still grows
  In-Reply-To: <2500ca1c-312e-c495-ad98-1b593d030c71@gmail.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