Re: Parallel Bitmap scans a bit broken

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Emre Hasegeli <emre@hasegeli.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, David Rowley <david.rowley@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-03-16T15:12:36Z
Lists: pgsql-hackers
On Thu, Mar 16, 2017 at 10:56 AM, Emre Hasegeli <emre@hasegeli.com> wrote:
>> Hopefully, this time I got it correct.  Since I am unable to reproduce
>> the issue so I will again need your help in verifying the fix.
>
> It is not crashing with the new patch.  Thank you.

Thanks for confirming.  Some review comments on v2:

+    if (istate->pagetable)

Please compare explicitly to InvalidDsaPointer.

+    if (iterator->ptbase)
+        ptbase = iterator->ptbase->ptentry;
+    if (iterator->ptpages)
+        idxpages = iterator->ptpages->index;
+    if (iterator->ptchunks)
+        idxchunks = iterator->ptchunks->index;

Similarly.

Dilip, please also provide a proposed commit message describing what
this is fixing.  Is it just the TBM_EMPTY case, or is there anything
else?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Commits

  1. Avoid access to uninitialized memory in shared tidbitmap iteration.

  2. Bump catversion for MACADDR8

  3. Fix bug in parallel tidbitmap iteration.