From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Subject: | Re: maintenance_work_mem used by Vacuum |
Date: | 2019-10-17 05:10:32 |
Message-ID: | CAA4eK1Jw2-OsKCJ7x+VRrtr3OcV_PnytKEvb4Ciznb8yJvpgOg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 17, 2019 at 6:07 AM Greg Stark <stark(at)mit(dot)edu> wrote:
>
> It's a bit unfortunate that we're doing the pending list flush while the vacuum memory is allocated at all. Is there any reason other than the way the callbacks are defined that gin doesn't do the pending list flush before vacuum does the heap scan and before it allocates any memory using maintenance_work_mem?
>
I can't think of any other reason. Can we think of doing it as a
separate phase for indexes? That can help in containing the memory
usage to a maximum of maintenance_work_mem for Gin indexes, but I am
not sure how useful it is for other index AM's. Another idea could be
that we do something special (cleanup of pending list) just for Gin
indexes before heap scan in Vacuum.
> (I'm guessing doing it after vacuum is finished would have different problems with tuples in the pending queue not getting vacuumed?)
Yeah, I also think so.
BTW, good point!
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2019-10-17 05:20:52 | Re: SegFault on 9.6.14 |
Previous Message | Dilip Kumar | 2019-10-17 04:21:29 | Re: Questions/Observations related to Gist vacuum |