Re: Vacuum: allow usage of more than 1GB of work mem

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum: allow usage of more than 1GB of work mem
Date: 2016-09-06 18:55:31
Message-ID: CA+TgmoayEcYCUVDaGLPbjFWH_dSZ8XffSPyouYuX7O8qQTx4-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 6, 2016 at 2:51 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 6 September 2016 at 19:23, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Tue, Sep 6, 2016 at 2:16 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>> What occurs to me is that we can exactly predict how many tuples we
>>> are going to get when we autovacuum, since we measure that and we know
>>> what the number is when we trigger it.
>>>
>>> So there doesn't need to be any guessing going on at all, nor do we
>>> need it to be flexible.
>>
>> No, that's not really true. A lot can change between the time it's
>> triggered and the time it happens, or even while it's happening.
>> Somebody can run a gigantic bulk delete just after we start the
>> VACUUM.
>
> Which wouldn't be removed by the VACUUM, so can be ignored.

OK, true. But I still think it's very unlikely that we can calculate
an exact count of how many dead tuples we might run into. I think we
shouldn't rely on the stats collector to be perfectly correct anyway -
for one thing, you can turn it off - and instead cope with the
uncertainty.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Convey 2016-09-06 18:56:18 Re: [GENERAL] C++ port of Postgres
Previous Message Simon Riggs 2016-09-06 18:51:14 Re: Vacuum: allow usage of more than 1GB of work mem