Re: [PROPOSAL] VACUUM Progress Checker.

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: "Thakur, Sameer" <Sameer(dot)Thakur(at)nttdata(dot)com>
Cc: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Date: 2015-07-22 11:19:49
Message-ID: 20150722111949.GJ5596@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thakur, Sameer wrote:
> Hello,
> >I think it'd be better to combine both numbers into one report:
> >It'd also be good to standardize on where the * 100 is happening.
> Done
> >can be replaced by
> >(itemptr->ipblkid != vacrelstats->last_scanned_page)
> Get compiler error : invalid operands to binary != (have ‘BlockIdData’ and ‘BlockIdData’)
> >vacrelstats->current_index_scanned_page_count++;
> Done
> Please find v3 attached.
>
> I am struggling to create maintenance work memory exhaustion. Did the following
> maintenance_work_mem=1MB.
> Inserted 10 million records in tbl1 with 3 indexes. Deleted 5 million and vacuumed. So far no error. I could keep bumping up the records to say 100 million and try to get this error.
> This seems a tedious manner to simulate maintenance work memory exhaustion. Is there a better way?
> To insert I am using COPY (from a csv which has 10 million records) and building indexes after insert is complete.

I don't think there's any maintenance work exhaustion that results in an
error. The system is designed to use all the memory it is allowed to,
and to have other strategies when it's not sufficient to do the whole
sort.

Not sure what Jim meant. Maybe he meant to be aware of when spilling to
disk happens? Obviously, things become slower, so maybe you need to
consider it for progress reporting purposes.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2015-07-22 11:58:21 Re: [PROPOSAL] VACUUM Progress Checker.
Previous Message Etsuro Fujita 2015-07-22 10:10:59 We need to support ForeignRecheck for late row locking, don't we?