DB performance of frequently updated table

Bruno Wolff III bruno at wolff.to
Thu Jul 2 16:39:31 UTC 2015


On Thu, Jul 02, 2015 at 10:49:36 +0200,
  Michael Šimáček <msimacek at redhat.com> wrote:
>
>My question is how could it get into such poor condition (over like 2 
>days) when almost no code that manipulates the table was changed since 
>the version that was deployed in cloud and was running fine for 
>months? The table is frequently updated (recalculating the package 
>priority every few seconds), is there some difference in configuration 
>of [auto]vacuuming in the production DB from postgres defaults (which 
>were used on cloud instance)?

You may need to have autovacuum run on that table more often. Once the table 
gets huge it is too late for regular vacuums, but if they are run often 
enough it should keep the size under control. (By allowing space for 
deleted tuples to be reused.)


More information about the infrastructure mailing list