Re: proposal: custom autovacuum entries

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jordan Deitch <jwdeitch(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: custom autovacuum entries
Date: 2017-10-26 20:56:33
Message-ID: CAB7nPqS3_10KjKP+q_HSC8+dgr3PX7h-2g8-Vc7UO+YBR_UWSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 26, 2017 at 1:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jordan Deitch <jwdeitch(at)gmail(dot)com> writes:
>> I would like to remove records from a time series table older than a
>> certain age. My understanding of current standard practice is to configure
>> an external scheduler like cron to perform the deletion.
>> My proposal is to allow clients to register functions on the tail end of
>> the autovacuum sequence.
>
> There's already a mechanism for writing custom background workers.
> I doubt that adding random user-defined stuff to what autovacuum has
> to do is a better idea; that will mostly make autovac scheduling even
> harder than it is now.

I agree with Tom here, there is no point to have more facilities in
autovacuum so as it does extra work at its tail. There may be not even
any need to develop your own background worker. Have you looked at
pg_cron [1]?

[1]: https://github.com/citusdata/pg_cron
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2017-10-26 22:07:33 Re: proposal: schema variables
Previous Message Michael Paquier 2017-10-26 20:53:56 Re: taking stdbool.h into use