Re: Parallel bitmap heap scan
Haribabu Kommi <kommi.haribabu@gmail.com>
From: Haribabu Kommi <kommi.haribabu@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Robert Haas <robertmhaas@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-14T01:21:46Z
Lists: pgsql-hackers
On Tue, Feb 14, 2017 at 12:48 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote: > On Mon, Feb 13, 2017 at 6:24 PM, Robert Haas <robertmhaas@gmail.com> > wrote: > > I don't think it's acceptable (or necessary) to move the DSA > > definitions into postgres.h. Why do you think you need to do that, > > vs. just including dsa.h in a few more places? > > I need to access dsa_pointer in tidbitmap.h, which is included from > FRONTEND as well. Now, problem is that dsa.h is including #include > "port/atomics.h", but atomic.h can not be included if FRONTEND is > defined. > > #ifndef ATOMICS_H > #define ATOMICS_H > #ifdef FRONTEND > #error "atomics.h may not be included from frontend code" > #endif > > Is there any other solution to this ? How about creating another header file with the parallel changes and include it only in necessary places? Following are my observations, while going through the patch. +#if SIZEOF_DSA_POINTER == 4 +typedef uint32 dsa_pointer; +#else +typedef uint64 dsa_pointer; +#endif I feel the declaration of the above typdef can be moved into the section above if we going with the current move into postgres.h file. +/* + * tbm_alloc_shared + * + * Callback function for allocating the memory for hashtable elements. + * It allocates memory from DSA if tbm holds a reference to a dsa. + */ +static inline void * +pagetable_allocate(pagetable_hash *pagetable, Size size) Function name and comments mismatch? Regards, Hari Babu Fujitsu Australia
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