Re: [Proposal] Allow users to specify multiple tables in VACUUM commands

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: michael(dot)paquier(at)gmail(dot)com
Cc: bossartn(at)amazon(dot)com, pgsql-hackers(at)postgresql(dot)org, sawada(dot)mshk(at)gmail(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: [Proposal] Allow users to specify multiple tables in VACUUM commands
Date: 2017-09-13 08:28:20
Message-ID: 20170913.172820.141647434.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 13 Sep 2017 13:16:52 +0900, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote in <CAB7nPqSi7N1dVk=sYxoBj-Arkri341ydNO5rdnoCfo1sXmbv_A(at)mail(dot)gmail(dot)com>
> On Wed, Sep 13, 2017 at 1:13 PM, Kyotaro HORIGUCHI
> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > This patch creates a new memory context "Vacuum" under
> > PortalContext in vacuum.c, but AFAICS the current context there
> > is PortalHeapMemory, which has the same expected lifetime with
> > the new context (that is, a child of PotalContext and dropeed in
> > PortalDrop). On the other hand the PortalMemory's lifetime is not
> > PortalStart to PortaDrop but the backend lifetime (initialized in
> > InitPostgres).
>
> Which patch are you looking to? This introduces no new memory context,
> be it in 0001 or 0002 in its last versions. I don't recall during the
> successive reviews seeing that pattern as well.

Sorry. 0001 patch is just using the context. The context has been
introduced by the commit e415b469 and used only for buffer access
strategy object. I was confused by the following comment in the
patch.

| + * Move our relation list to our special memory context so that we do
| + * not lose it among our per-relation transactions.

The context exists there before the patch but anyway using the
context as per-portal context that doesn't need freeing seems to
result in memory leak.

regrds,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-09-13 08:30:50 Re: psql - add special variable to reflect the last query status
Previous Message Kuntal Ghosh 2017-09-13 08:22:39 Re: WIP patch: distinguish selectivity of < from <= and > from >=