-
由 Jacob Champion 提交于
Upstream commit 43a57cf3, which significantly changes the API for the HashBitmap (TIDBitmap in Postgres), is about to hit in an upcoming merge. This patch is a joint effort by myself, Max Yang, Xiaoran Wang, Heikki Linnakangas, and Daniel Gustafsson to reduce our diff against upstream and support the incoming API changes with our GPDB-specific customizations. The primary goal of this patch is to support concurrent iterations over a single StreamBitmap or TIDBitmap. GPDB has made significant changes to allow either one of those bitmap types to be iterated over without the caller necessarily needing to know which is which, and we've kept that property here. Here is the general list of changes: - Cherry-pick the following commit from upstream: commit 43a57cf3 Author: Tom Lane <tgl@sss.pgh.pa.us> Date: Sat Jan 10 21:08:36 2009 +0000 Revise the TIDBitmap API to support multiple concurrent iterations over a bitmap. This is extracted from Greg Stark's posix_fadvise patch; it seems worth committing separately, since it's potentially useful independently of posix_fadvise. - Revert as much as possible of the TIDBitmap API to the upstream version, to avoid unnecessary merge hazards in the future. - Add a tbm_generic_ version of the API to differentiate upstream's TIDBitmap-only API from ours. Both StreamBitmap and TIDBitmap can be passed to this version of the API. - Update each section of code to use the new generic API. - Fix up some memory management issues in bitmap.c that are now exacerbated by our changes.
e8c3b293