Re: Millions of tables

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Greg Spiegelberg <gspiegelberg(at)gmail(dot)com>
Cc: Álvaro Hernández Tortosa <aht(at)8kdata(dot)com>, "pgsql-performa(dot)" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Millions of tables
Date: 2016-09-26 16:29:23
Message-ID: CAMkU=1y-YUNFpwmbW7jnfma7Rf6VtKTiuHv4gcYxyEF7NJ33Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Sep 26, 2016 at 5:53 AM, Greg Spiegelberg <gspiegelberg(at)gmail(dot)com>
wrote:

>
>>
>> I may need to understand autovacuum better. My impression was it
> consulted statistics and performed vacuums one table at a time based on the
> vacuum threshold formula on https://www.postgresql.org/
> docs/9.5/static/routine-vacuuming.html.
>

A problem is that those statistics are stored in one file (per database; it
used to be one file per cluster). With 8 million tables, that is going to
be a pretty big file. But the code pretty much assumes the file is going
to be pretty small, and so it has no compunction about commanding that it
be read and written, in its entirety, quite often.

Cheers,

Jeff

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2016-09-26 16:52:39 Re: Millions of tables
Previous Message David G. Johnston 2016-09-26 16:23:52 Re: [HACKERS] temporary table vs array performance