From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Parallel bitmap heap scan |
Date: | 2017-02-08 09:20:16 |
Message-ID: | CAFiTN-s7B=TeJahb15W-J5e3PGLkAAcPK=JSCU6RSSinETfpYg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 8, 2017 at 3:44 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> +#ifndef SH_USE_NONDEFAULT_ALLOCATOR
>>> +
>>
>> That should probably be documented in the file header.
>
> Right. OK, did that and a few other cleanups, and committed.
The new SH_CREATE(MemoryContext ctx, uint32 nelements) don't have any
option to supply arguments to it. Our callback functions need access
to TBM.
Is it expected that if the user of SH_CREATE who doesn't want to pass
a "MemoryContext" then we can pass arguments instead of ctx?
something like this ?
if (!tbm->dsa)
tbm->pagetable = pagetable_create(tbm->mcxt, 128);
else
tbm->pagetable = pagetable_create((MemoryContext)tbm, 128);
And, In allocation function, we can access this context and typecast to tbm?
As shown below.
static void *
pagetable_allocate(pagetable_hash *pagetable, Size size)
{
TIDBitmap *tbm = pagetable->ctx;
So Is it expected to do like I explained above, or we missed to have
an arg parameter to SH_CREATE as well as in SH_TYPE structure or there
is some other way you have in mind?
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Pantelis Theodosiou | 2017-02-08 09:24:15 | Re: Idea on how to simplify comparing two sets |
Previous Message | Pantelis Theodosiou | 2017-02-08 09:13:49 | Re: Idea on how to simplify comparing two sets |