Re: Parallel bitmap heap scan
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>,
Rafia Sabih <rafia.sabih@enterprisedb.com>, tushar <tushar.ahuja@enterprisedb.com>,
Amit Khandekar <amitdkhan.pg@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-02-08T13:44:16Z
Lists: pgsql-hackers
On Wed, Feb 8, 2017 at 1:59 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote: > IIUC, tbm_prepare_shared_iterate will be called only by the leader, > for tbmiterator as well as for the prefetch_iterator. And, > tbm_attach_shared_iterate will be called by each backend and for both > the iterators. That's what I had in mind. > IMHO, tbm_attach_shared_iterate should return TBMIterator with > reference to TBMSharedIterator inside it. The reason behind same is > that we can not keep TBMIterateResult inside TBMSharedIterator > otherwise, results will also go in shared memory but we want to have > local result memory for each worker so that other worker doesn't > disturb it. No, I don't agree. I think TBMSharedIterator should be an unshared structure created by tbm_attach_shared_iterate, which can internally contain backend-private state like a TBMIterateResult, and which can also contain a pointer to the shared-memory structure previously created by tbm_prepare_shared_iterate. That thing needs to be called something other than a TBMSharedIterator, like TBMSharedIterationState or something. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Pass DSA_ALLOC_HUGE when allocating a shared TIDBitmap.
- a171f01501e1 10.0 landed
-
Support parallel bitmap heap scans.
- f35742ccb7aa 10.0 landed
-
tidbitmap: Support shared iteration.
- 98e6e89040a0 10.0 landed
-
Shut down Gather's children before shutting down Gather itself.
- acf555bc53ac 10.0 landed
-
Revise the way the element allocator for a simplehash is specified.
- c3c4f6e1740b 10.0 cited
-
Refactor bitmap heap scan estimation of heap pages fetched.
- da08a6598973 10.0 landed
-
Use more efficient hashtable for tidbitmap.c to speed up bitmap scans.
- 75ae538bc316 10.0 cited