Re: [GENERAL] Large empty table, balanced INSERTs and DELETEs, not being vacuumed

2016-10-22 Thread Michael Paquier
On Sat, Oct 22, 2016 at 6:02 AM, Vick Khera wrote: > On Fri, Oct 21, 2016 at 4:53 PM, Jason Dusek wrote: >> This is really only a temporary fix, though. We can have a cron job running >> in the background running TRUNCATE ONLY ... but this seems like the

Re: [GENERAL] Large empty table, balanced INSERTs and DELETEs, not being vacuumed

2016-10-21 Thread Vick Khera
On Fri, Oct 21, 2016 at 4:53 PM, Jason Dusek wrote: > This is really only a temporary fix, though. We can have a cron job running > in the background running TRUNCATE ONLY ... but this seems like the kind of > thing that auto-vacuuming should have handled for us, before the

[GENERAL] Large empty table, balanced INSERTs and DELETEs, not being vacuumed

2016-10-21 Thread Jason Dusek
Hi All, I recently came across an interesting problem relating vacuuming, triggers and table partitioning. We have a “virtual table” with a BEFORE trigger that redirects writes to its child tables. This was all fine well and good until we wanted to use RETURNING to get the id back — the trigger