public inbox for [email protected]  
help / color / mirror / Atom feed
From: [email protected]
To: [email protected]
Subject: Re: Schedule pg_repack job with pg_cron
Date: Thu, 8 Aug 2024 12:59:18 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANzqJaD-v-ipsWcHY8HV51aWci3SomCf5gN0X2D1nwY3yqL-tg@mail.gmail.com>
References: <CA+M9Y+DfTmOqqeua1U+7jWPiovpHjmG7AZ-UfcacDueiRo2Vyg@mail.gmail.com>
	<CAKFm-3Coe2SxvdnvO=Gd2yTUWd9svrtcMc5ij-VHCP1AOA+mPQ@mail.gmail.com>
	<[email protected]>
	<CANzqJaDnbxuMCV1vF+GfuA=bFWuMo+45cnQK1H4AW3YBqi23eg@mail.gmail.com>
	<[email protected]>
	<CANzqJaD-v-ipsWcHY8HV51aWci3SomCf5gN0X2D1nwY3yqL-tg@mail.gmail.com>


Ron Johnson schrieb am 08.08.2024 um 12:26:
>> Part of a properly-maintained system is *regularly* archive/
>> purging (whether that be dropping date-based partitions, or
>> deleting old data from unpartitioned tables or tables partitioned
>> by something other than a date).
>>
>> For example, I gave a list of tables (all intertwined via FK
>> constraints) to the application support people, and they returned
>> the list stating how many weeks or months of data to retain in
>> each table.  Every Saturday night a cron job goes through and
>> deletes the old data from, and then "manually" vacuum-analyzes
>> them.
>
>
> If the application will then insert new data after the cleanup,
> Postgres will re-use the free space that the delete "created". So
> depending on the speed of inserts, you might not really gain that
> much.
>
>
> Or did you think that I do a VACUUM FULL on those tables?  (No; I
> definitely don't do that, though I /occasionally/ CLUSTER /some/ of
> the tables to make range queries more efficient.)
Sorry, I misread your post and was indeed thinking about VACUUM FULL
as pg_repack is an alternative to that.






view thread (8+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Schedule pg_repack job with pg_cron
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox