[Bizgres-general] Re: Latest bitmap patch results..
Ayush Parashar
aparashar at greenplum.com
Thu Jan 26 17:28:33 GMT 2006
The previous email did not go through, probably because the size of
patch + attachment was larger.
Resending the patch and sending the results with this patch seperately.
Ayush
Ayush Parashar wrote:
> Attached are the latest bitmap results after a fix from Jie.
> Also, attached is the patch related to this.
>
> The size of bitmap index has reduced drastically after this patch.
> Testing was done on table "orders" and "customer" from TPC-H schema
> for a scale factor of 10.
>
> Ayush
-------------- next part --------------
? postgresql/src/Makefile.global
? postgresql/src/backend/postgres
? postgresql/src/backend/catalog/postgres.bki
? postgresql/src/backend/catalog/postgres.description
? postgresql/src/backend/utils/mb/conversion_procs/conversion_create.sql
? postgresql/src/backend/utils/mb/conversion_procs/ascii_and_mic/libascii_and_mic.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/libcyrillic_and_mic.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/euc_cn_and_mic/libeuc_cn_and_mic.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/libeuc_jp_and_sjis.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/euc_kr_and_mic/libeuc_kr_and_mic.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/libeuc_tw_and_big5.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/latin2_and_win1250/liblatin2_and_win1250.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/latin_and_mic/liblatin_and_mic.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_ascii/libutf8_and_ascii.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_big5/libutf8_and_big5.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/libutf8_and_cyrillic.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/libutf8_and_euc_cn.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/libutf8_and_euc_jp.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/libutf8_and_euc_kr.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/libutf8_and_euc_tw.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/libutf8_and_gb18030.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_gbk/libutf8_and_gbk.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/libutf8_and_iso8859.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/libutf8_and_iso8859_1.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_johab/libutf8_and_johab.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_sjis/libutf8_and_sjis.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/libutf8_and_tcvn.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_uhc/libutf8_and_uhc.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_win1250/libutf8_and_win1250.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_win1256/libutf8_and_win1256.so.0.0
? postgresql/src/backend/utils/mb/conversion_procs/utf8_and_win874/libutf8_and_win874.so.0.0
? postgresql/src/bin/initdb/initdb
? postgresql/src/bin/ipcclean/ipcclean
? postgresql/src/bin/pg_config/pg_config
? postgresql/src/bin/pg_controldata/pg_controldata
? postgresql/src/bin/pg_ctl/pg_ctl
? postgresql/src/bin/pg_dump/pg_dump
? postgresql/src/bin/pg_dump/pg_dumpall
? postgresql/src/bin/pg_dump/pg_restore
? postgresql/src/bin/pg_resetxlog/pg_resetxlog
? postgresql/src/bin/psql/psql
? postgresql/src/bin/scripts/clusterdb
? postgresql/src/bin/scripts/createdb
? postgresql/src/bin/scripts/createlang
? postgresql/src/bin/scripts/createuser
? postgresql/src/bin/scripts/dropdb
? postgresql/src/bin/scripts/droplang
? postgresql/src/bin/scripts/dropuser
? postgresql/src/bin/scripts/vacuumdb
? postgresql/src/include/pg_config.h
? postgresql/src/include/stamp-h
? postgresql/src/interfaces/ecpg/compatlib/libecpg_compat.so.2.0
? postgresql/src/interfaces/ecpg/ecpglib/libecpg.so.5.0
? postgresql/src/interfaces/ecpg/pgtypeslib/libpgtypes.so.2.0
? postgresql/src/interfaces/ecpg/preproc/ecpg
? postgresql/src/interfaces/libpq/libpq.so.4.0
? postgresql/src/pl/plpgsql/src/libplpgsql.so.1.0
? postgresql/src/port/pg_config_paths.h
? postgresql/src/timezone/zic
Index: postgresql/src/backend/access/bitmap/bitmapinsert.c
===================================================================
RCS file: /cvsroot/bizgres/bizgres/postgresql/src/backend/access/bitmap/bitmapinsert.c,v
retrieving revision 1.1
diff -c -r1.1 bitmapinsert.c
*** postgresql/src/backend/access/bitmap/bitmapinsert.c 12 Dec 2005 07:54:54 -0000 1.1
--- postgresql/src/backend/access/bitmap/bitmapinsert.c 16 Jan 2006 01:37:44 -0000
***************
*** 137,152 ****
(GET_FILL_BIT(lovItem->bm_last_compword) ==
GET_FILL_BIT(lovItem->bm_last_word)))
{
! if (FILL_LENGTH(lovItem->bm_last_compword) == MAX_FILL_LENGTH)
! {
lastWordPosInBlock =
_bitmap_movetobitmappage(rel, lovItem);
lastWordInBlock = lovItem->bm_last_compword;
- lovItem->bm_last_compword -= MAX_FILL_LENGTH + 1;
}
else
! lovItem->bm_last_compword++;
lovItem->bm_last_two_headerbits = 2;
}
--- 137,161 ----
(GET_FILL_BIT(lovItem->bm_last_compword) ==
GET_FILL_BIT(lovItem->bm_last_word)))
{
! BM_HRL_WORD lastCompWordFillLength =
! FILL_LENGTH(lovItem->bm_last_compword);
! BM_HRL_WORD lastWordFillLength =
! FILL_LENGTH(lovItem->bm_last_word);
!
! if (lastCompWordFillLength+lastWordFillLength >= MAX_FILL_LENGTH) {
! lovItem->bm_last_compword +=
! (MAX_FILL_LENGTH-lastCompWordFillLength);
! lovItem->bm_last_word -=
! (MAX_FILL_LENGTH-lastCompWordFillLength);
!
lastWordPosInBlock =
_bitmap_movetobitmappage(rel, lovItem);
+ lovItem->bm_last_compword = lovItem->bm_last_word;
lastWordInBlock = lovItem->bm_last_compword;
}
else
! lovItem->bm_last_compword += lastWordFillLength;
lovItem->bm_last_two_headerbits = 2;
}
***************
*** 213,226 ****
with bm_last_compword */
if (numOfZeros >= BM_HRL_WORD_SIZE)
{
! lovItem->bm_last_word =
! BM_MAKE_FILL_WORD(0, numOfZeros/BM_HRL_WORD_SIZE);
! lovItem->bm_last_two_headerbits |= 1;
! _bitmap_mergewords (rel, lovBuffer, lovItem,
! (lovItem->bm_last_setbit+zerosNeeded+
! (numOfZeros/BM_HRL_WORD_SIZE)*BM_HRL_WORD_SIZE));
! numOfZeros = numOfZeros%BM_HRL_WORD_SIZE;
}
}
--- 222,249 ----
with bm_last_compword */
if (numOfZeros >= BM_HRL_WORD_SIZE)
{
! uint32 numOfTotalFillWords = numOfZeros/BM_HRL_WORD_SIZE;
! uint32 loopNo=0;
! while (numOfTotalFillWords > 0) {
! BM_HRL_WORD numOfFillWords ;
! if (numOfTotalFillWords >= MAX_FILL_LENGTH)
! numOfFillWords = MAX_FILL_LENGTH;
! else
! numOfFillWords = numOfTotalFillWords;
!
! lovItem->bm_last_word =
! BM_MAKE_FILL_WORD(0, numOfFillWords);
! lovItem->bm_last_two_headerbits |= 1;
! _bitmap_mergewords (rel, lovBuffer, lovItem,
! (lovItem->bm_last_setbit+zerosNeeded+
! loopNo*MAX_FILL_LENGTH*BM_HRL_WORD_SIZE+
! numOfFillWords*BM_HRL_WORD_SIZE));
! loopNo++;
!
! numOfTotalFillWords -= numOfFillWords;
! numOfZeros -= numOfFillWords*BM_HRL_WORD_SIZE;
! }
}
}
***************
*** 425,434 ****
attno = 0;
tupDesc = RelationGetDescr(rel);
tidOffset =
((uint64)ItemPointerGetBlockNumber(&ht_ctid) *
! (1<<(8*sizeof(OffsetNumber))))
+ ((uint64)ItemPointerGetOffsetNumber(&ht_ctid));
/* insert a new bit into each bitmap using the a HRL scheme */
do {
--- 448,460 ----
attno = 0;
tupDesc = RelationGetDescr(rel);
+ Assert(ItemPointerGetOffsetNumber(&ht_ctid) <= MaxNumHeapTuples);
+
tidOffset =
((uint64)ItemPointerGetBlockNumber(&ht_ctid) *
! MaxNumHeapTuples)
+ ((uint64)ItemPointerGetOffsetNumber(&ht_ctid));
+ /*(1<<(8*sizeof(OffsetNumber))))*/
/* insert a new bit into each bitmap using the a HRL scheme */
do {
***************
*** 470,476 ****
tidOffset =
((uint64)ItemPointerGetBlockNumber(&ht_ctid) *
! (1<<(8*sizeof(OffsetNumber))))
+ ((uint64)ItemPointerGetOffsetNumber(&ht_ctid));
tupDesc = RelationGetDescr(rel);
--- 496,502 ----
tidOffset =
((uint64)ItemPointerGetBlockNumber(&ht_ctid) *
! MaxNumHeapTuples)
+ ((uint64)ItemPointerGetOffsetNumber(&ht_ctid));
tupDesc = RelationGetDescr(rel);
Index: postgresql/src/backend/access/bitmap/bitmapsearch.c
===================================================================
RCS file: /cvsroot/bizgres/bizgres/postgresql/src/backend/access/bitmap/bitmapsearch.c,v
retrieving revision 1.1
diff -c -r1.1 bitmapsearch.c
*** postgresql/src/backend/access/bitmap/bitmapsearch.c 12 Dec 2005 07:54:54 -0000 1.1
--- postgresql/src/backend/access/bitmap/bitmapsearch.c 16 Jan 2006 01:37:45 -0000
***************
*** 43,49 ****
_bitmap_find_bitset(BM_HRL_WORD word, uint8 lastPos)
{
uint8 pos = lastPos+1;
! BM_HRL_WORD leftmostBitWord = 1 << (BM_HRL_WORD_SIZE - pos);
while ((pos<=BM_HRL_WORD_SIZE) &&
((word & leftmostBitWord) == 0))
--- 43,54 ----
_bitmap_find_bitset(BM_HRL_WORD word, uint8 lastPos)
{
uint8 pos = lastPos+1;
! BM_HRL_WORD leftmostBitWord;
!
! if (pos > BM_HRL_WORD_SIZE)
! return 0;
!
! leftmostBitWord = (((BM_HRL_WORD)1) << (BM_HRL_WORD_SIZE - pos));
while ((pos<=BM_HRL_WORD_SIZE) &&
((word & leftmostBitWord) == 0))
***************
*** 227,245 ****
so->bm_currPos->bm_tidOffsets[so->bm_currPos->bm_curr_tid_pos]-1;
#ifdef BM_DEBUG
! if ((tidOffset%(1<<(8*sizeof(OffsetNumber)))) >= 16000)
ereport(LOG, (errcode(LOG),
errmsg("pos=%d, tidOffset=%lld, blkno=%lld, offset=%lld\n",
so->bm_currPos->bm_curr_tid_pos, tidOffset,
! tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber)))))));
#endif
! Assert((tidOffset%(1<<(8*sizeof(OffsetNumber))))+1 > 0);
ItemPointerSet(&(scan->xs_ctup.t_self),
! tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber))))+1);
so->bm_currPos->bm_curr_tid_pos++;
--- 232,256 ----
so->bm_currPos->bm_tidOffsets[so->bm_currPos->bm_curr_tid_pos]-1;
#ifdef BM_DEBUG
! /* if ((tidOffset%(1<<(8*sizeof(OffsetNumber)))) >= 16000)*/
! if (tidOffset == 44043235 && (tidOffset%MaxNumHeapTuples) >= 285)
ereport(LOG, (errcode(LOG),
errmsg("pos=%d, tidOffset=%lld, blkno=%lld, offset=%lld\n",
so->bm_currPos->bm_curr_tid_pos, tidOffset,
! tidOffset/MaxNumHeapTuples,
! tidOffset%MaxNumHeapTuples)));
! /* tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber))))))); */
#endif
! /* Assert((tidOffset%(1<<(8*sizeof(OffsetNumber))))+1 > 0);*/
! Assert((tidOffset%MaxNumHeapTuples)+1 > 0);
ItemPointerSet(&(scan->xs_ctup.t_self),
! tidOffset/MaxNumHeapTuples,
! (tidOffset%MaxNumHeapTuples)+1);
! /*tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber))))+1);*/
so->bm_currPos->bm_curr_tid_pos++;
***************
*** 261,277 ****
uint64 tidOffset =
so->bm_currPos->bm_tidOffsets[0]-1;
ItemPointerSet(&(scan->xs_ctup.t_self),
! tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber))))+1);
so->bm_currPos->bm_curr_tid_pos = 1;
#ifdef BM_DEBUG
! if ((tidOffset%(1<<(8*sizeof(OffsetNumber)))) >= 16000)
ereport(LOG, (errcode(LOG),
errmsg("pos=0, tidOffset=%lld, blkno=%lld, offset=%lld\n",
tidOffset,
! tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber)))))));
#endif
scan->currentItemData = scan->xs_ctup.t_self;
--- 272,293 ----
uint64 tidOffset =
so->bm_currPos->bm_tidOffsets[0]-1;
ItemPointerSet(&(scan->xs_ctup.t_self),
! tidOffset/MaxNumHeapTuples,
! (tidOffset%MaxNumHeapTuples)+1);
! /*tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber))))+1);*/
so->bm_currPos->bm_curr_tid_pos = 1;
#ifdef BM_DEBUG
! if (tidOffset == 44043235 && (tidOffset%MaxNumHeapTuples) >= 285)
! /*if ((tidOffset%(1<<(8*sizeof(OffsetNumber)))) >= 16000)*/
ereport(LOG, (errcode(LOG),
errmsg("pos=0, tidOffset=%lld, blkno=%lld, offset=%lld\n",
tidOffset,
! tidOffset/MaxNumHeapTuples,
! (tidOffset%MaxNumHeapTuples)+1)));
! /*tidOffset/(1<<(8*sizeof(OffsetNumber))),
! (tidOffset%(1<<(8*sizeof(OffsetNumber)))))));*/
#endif
scan->currentItemData = scan->xs_ctup.t_self;
***************
*** 291,303 ****
{
BMScanOpaque so ;
BMScanPosition scanPos;
so = (BMScanOpaque) scan->opaque;
scanPos = so->bm_currPos;
! while ((!scanPos->bm_done) && (scanPos->bm_num_of_tids < maxTids))
{
-
/* if there are not ANDed words, then compute words that are
at most filling one block */
if (scanPos->bm_num_of_words == 0 &&
--- 307,320 ----
{
BMScanOpaque so ;
BMScanPosition scanPos;
+ /* indicate if this round is done */
+ bool done = false;
so = (BMScanOpaque) scan->opaque;
scanPos = so->bm_currPos;
! while ((!scanPos->bm_done) && (scanPos->bm_num_of_tids < maxTids) && !done)
{
/* if there are not ANDed words, then compute words that are
at most filling one block */
if (scanPos->bm_num_of_words == 0 &&
***************
*** 307,313 ****
/* if there are some previous ANDed words available, then scan
through these words and store final tids. */
while (scanPos->bm_num_of_words > 0 &&
! scanPos->bm_num_of_tids < maxTids)
{
uint8 oldScanPos = scanPos->bm_last_scanpos;
BM_HRL_WORD word =
--- 324,330 ----
/* if there are some previous ANDed words available, then scan
through these words and store final tids. */
while (scanPos->bm_num_of_words > 0 &&
! scanPos->bm_num_of_tids < maxTids && !done)
{
uint8 oldScanPos = scanPos->bm_last_scanpos;
BM_HRL_WORD word =
***************
*** 345,361 ****
for (bitNo=0; bitNo<BM_HRL_WORD_SIZE; bitNo++) {
tidLocs[scanPos->bm_num_of_tids++] =
(++scanPos->bm_tid_pos);
- #ifdef BM_DEBUG
- elog(LOG, "%lld ", scanPos->bm_tid_pos);
- #endif
}
numOfFillWords--;
}
! scanPos->bm_lastScanWordNo++;
! scanPos->bm_num_of_words--;
! scanPos->bm_last_scanpos = 0;
! continue;
}
if(oldScanPos == 0)
--- 362,381 ----
for (bitNo=0; bitNo<BM_HRL_WORD_SIZE; bitNo++) {
tidLocs[scanPos->bm_num_of_tids++] =
(++scanPos->bm_tid_pos);
}
numOfFillWords--;
+ scanPos->bm_last_scanwords[scanPos->bm_lastScanWordNo]--;
}
! if (numOfFillWords == 0) {
! scanPos->bm_lastScanWordNo++;
! scanPos->bm_num_of_words--;
! scanPos->bm_last_scanpos = 0;
! continue;
! } else {
! done = true;
! break;
! }
}
if(oldScanPos == 0)
***************
*** 375,383 ****
scanPos->bm_tid_pos +=
(scanPos->bm_last_scanpos - oldScanPos);
tidLocs[scanPos->bm_num_of_tids++] = scanPos->bm_tid_pos;
- #ifdef BM_DEBUG
- elog(LOG, "%lld ", scanPos->bm_tid_pos);
- #endif
}
else
{
--- 395,400 ----
***************
*** 629,635 ****
if (!andWordIsLiteral)
scanPos->bm_last_scanHeaderWords[
scanPos->bm_num_of_words/BM_HRL_WORD_SIZE] |=
! (1<<(BM_HRL_WORD_SIZE-1-
(scanPos->bm_num_of_words%BM_HRL_WORD_SIZE)));
scanPos->bm_last_scanwords[scanPos->bm_num_of_words] =
andWord;
--- 646,652 ----
if (!andWordIsLiteral)
scanPos->bm_last_scanHeaderWords[
scanPos->bm_num_of_words/BM_HRL_WORD_SIZE] |=
! (((BM_HRL_WORD)1)<<(BM_HRL_WORD_SIZE-1-
(scanPos->bm_num_of_words%BM_HRL_WORD_SIZE)));
scanPos->bm_last_scanwords[scanPos->bm_num_of_words] =
andWord;
Index: postgresql/src/bin/psql/psqlscan.c
===================================================================
RCS file: /cvsroot/bizgres/bizgres/postgresql/src/bin/psql/psqlscan.c,v
retrieving revision 1.1
diff -c -r1.1 psqlscan.c
*** postgresql/src/bin/psql/psqlscan.c 15 Apr 2005 03:41:21 -0000 1.1
--- postgresql/src/bin/psql/psqlscan.c 16 Jan 2006 01:46:12 -0000
***************
*** 2,9 ****
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
! * $Header: /cvsroot/bizgres/bizgres/postgresql/src/bin/psql/psqlscan.c,v 1.1 2005/04/15 03:41:21 llonergan Exp $
! * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $
*/
#define FLEX_SCANNER
--- 2,8 ----
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
*/
#define FLEX_SCANNER
***************
*** 11,16 ****
--- 10,16 ----
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
+ #include <unistd.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
***************
*** 24,30 ****
#ifdef __cplusplus
#include <stdlib.h>
- #include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
--- 24,29 ----
***************
*** 2128,2134 ****
* Note that xcstart must appear before operator, as explained above!
* Also whitespace (comment) must appear before operator.
*/
! #line 2132 "psqlscan.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
--- 2127,2133 ----
* Note that xcstart must appear before operator, as explained above!
* Also whitespace (comment) must appear before operator.
*/
! #line 2131 "psqlscan.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
***************
*** 2276,2288 ****
YY_DECL
{
register yy_state_type yy_current_state;
! register char *yy_cp, *yy_bp;
register int yy_act;
#line 338 "psqlscan.l"
! #line 2286 "psqlscan.c"
if ( yy_init )
{
--- 2275,2287 ----
YY_DECL
{
register yy_state_type yy_current_state;
! register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
#line 338 "psqlscan.l"
! #line 2285 "psqlscan.c"
if ( yy_init )
{
***************
*** 3175,3181 ****
#line 908 "psqlscan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
! #line 3179 "psqlscan.c"
case YY_END_OF_BUFFER:
{
--- 3174,3180 ----
#line 908 "psqlscan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
! #line 3178 "psqlscan.c"
case YY_END_OF_BUFFER:
{
***************
*** 3545,3550 ****
--- 3544,3550 ----
#endif /* ifndef YY_NO_UNPUT */
+ #ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
***************
*** 3616,3622 ****
return c;
}
!
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
--- 3616,3622 ----
return c;
}
! #endif /* YY_NO_INPUT */
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
***************
*** 3727,3737 ****
}
- #ifndef YY_ALWAYS_INTERACTIVE
- #ifndef YY_NEVER_INTERACTIVE
- extern int isatty YY_PROTO(( int ));
- #endif
- #endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
--- 3727,3732 ----
Index: postgresql/src/include/access/bitmap.h
===================================================================
RCS file: /cvsroot/bizgres/bizgres/postgresql/src/include/access/bitmap.h,v
retrieving revision 1.1
diff -c -r1.1 bitmap.h
*** postgresql/src/include/access/bitmap.h 12 Dec 2005 07:54:58 -0000 1.1
--- postgresql/src/include/access/bitmap.h 16 Jan 2006 01:46:38 -0000
***************
*** 47,57 ****
(((BLCKSZ) - MAXALIGN(sizeof(BMMetaPageData))) / (sizeof(BlockNumber))))
#define BM_EXTENT_SIZE(pos) (((uint32)1)<<(pos))
/* the size of a hybrid run-length(HRL) word */
! #define BM_HRL_WORD_SIZE 32
! #define BM_HRL_WORD_LEFTMOST (BM_HRL_WORD_SIZE-1)
/* the type for a word in the HRL scheme */
! typedef uint32 BM_HRL_WORD;
/*
* LOV page -- pages to store list of attribute values and the pointers
--- 47,60 ----
(((BLCKSZ) - MAXALIGN(sizeof(BMMetaPageData))) / (sizeof(BlockNumber))))
#define BM_EXTENT_SIZE(pos) (((uint32)1)<<(pos))
+ /* the maximum number of heap tuples in one page */
+ #define MaxNumHeapTuples ((OffsetNumber) (BLCKSZ/sizeof(HeapTupleHeaderData)))
+
/* the size of a hybrid run-length(HRL) word */
! #define BM_HRL_WORD_SIZE 8
/* the type for a word in the HRL scheme */
! typedef uint8 BM_HRL_WORD;
! #define BM_HRL_WORD_LEFTMOST (BM_HRL_WORD_SIZE-1)
/*
* LOV page -- pages to store list of attribute values and the pointers
***************
*** 130,140 ****
#define BM_MAX_NUM_OF_HRL_WORDS_PER_PAGE \
((BLCKSZ - \
MAXALIGN(sizeof(PageHeaderData)) - \
! MAXALIGN(sizeof(BMBitmapOpaqueData)))/BM_HRL_WORD_SIZE)
#define BM_MAX_NUM_OF_HEADER_WORDS \
(BM_MAX_NUM_OF_HRL_WORDS_PER_PAGE/BM_HRL_WORD_SIZE)
#define BM_NUM_OF_HRL_WORDS_PER_PAGE \
! (BM_MAX_NUM_OF_HEADER_WORDS*BM_HRL_WORD_SIZE)
typedef struct BMBitmapData
{
--- 133,143 ----
#define BM_MAX_NUM_OF_HRL_WORDS_PER_PAGE \
((BLCKSZ - \
MAXALIGN(sizeof(PageHeaderData)) - \
! MAXALIGN(sizeof(BMBitmapOpaqueData)))/sizeof(BM_HRL_WORD))
#define BM_MAX_NUM_OF_HEADER_WORDS \
(BM_MAX_NUM_OF_HRL_WORDS_PER_PAGE/BM_HRL_WORD_SIZE)
#define BM_NUM_OF_HRL_WORDS_PER_PAGE \
! (BM_MAX_NUM_OF_HRL_WORDS_PER_PAGE - BM_MAX_NUM_OF_HEADER_WORDS)
typedef struct BMBitmapData
{
***************
*** 149,157 ****
#define ALL_ZERO 0
#define LITERAL_ALL_ZERO 0
! #define LITERAL_ALL_ONE (~0)
! #define FILL_LENGTH(w) ((((BM_HRL_WORD)(w))<<1)>>1)
#define MAX_FILL_LENGTH ((((BM_HRL_WORD)1)<<(BM_HRL_WORD_SIZE-1))-1)
#define GET_FILL_BIT(w) (((BM_HRL_WORD)(w))>>BM_HRL_WORD_LEFTMOST)
#define IS_FILL_WORD(words,wordNo) \
--- 152,160 ----
#define ALL_ZERO 0
#define LITERAL_ALL_ZERO 0
! #define LITERAL_ALL_ONE ((BM_HRL_WORD)(~((BM_HRL_WORD)0)))
! #define FILL_LENGTH(w) (((BM_HRL_WORD)(((BM_HRL_WORD)(w))<<1))>>1)
#define MAX_FILL_LENGTH ((((BM_HRL_WORD)1)<<(BM_HRL_WORD_SIZE-1))-1)
#define GET_FILL_BIT(w) (((BM_HRL_WORD)(w))>>BM_HRL_WORD_LEFTMOST)
#define IS_FILL_WORD(words,wordNo) \
Index: postgresql/src/interfaces/ecpg/preproc/pgc.c
===================================================================
RCS file: /cvsroot/bizgres/bizgres/postgresql/src/interfaces/ecpg/preproc/pgc.c,v
retrieving revision 1.1
diff -c -r1.1 pgc.c
*** postgresql/src/interfaces/ecpg/preproc/pgc.c 15 Apr 2005 03:41:21 -0000 1.1
--- postgresql/src/interfaces/ecpg/preproc/pgc.c 16 Jan 2006 01:47:09 -0000
***************
*** 2,9 ****
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
! * $Header: /cvsroot/bizgres/bizgres/postgresql/src/interfaces/ecpg/preproc/pgc.c,v 1.1 2005/04/15 03:41:21 llonergan Exp $
! * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $
*/
#define FLEX_SCANNER
--- 2,8 ----
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
*/
#define FLEX_SCANNER
***************
*** 11,16 ****
--- 10,16 ----
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
+ #include <unistd.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
***************
*** 24,30 ****
#ifdef __cplusplus
#include <stdlib.h>
- #include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
--- 24,29 ----
***************
*** 1265,1271 ****
* Note that xcstart must appear before operator, as explained above!
* Also whitespace (comment) must appear before operator.
*/
! #line 1269 "pgc.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
--- 1264,1270 ----
* Note that xcstart must appear before operator, as explained above!
* Also whitespace (comment) must appear before operator.
*/
! #line 1268 "pgc.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
***************
*** 1413,1419 ****
YY_DECL
{
register yy_state_type yy_current_state;
! register char *yy_cp, *yy_bp;
register int yy_act;
#line 307 "pgc.l"
--- 1412,1418 ----
YY_DECL
{
register yy_state_type yy_current_state;
! register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
#line 307 "pgc.l"
***************
*** 1424,1430 ****
token_start = NULL;
! #line 1428 "pgc.c"
if ( yy_init )
{
--- 1423,1429 ----
token_start = NULL;
! #line 1427 "pgc.c"
if ( yy_init )
{
***************
*** 2686,2692 ****
#line 1044 "pgc.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
! #line 2690 "pgc.c"
case YY_END_OF_BUFFER:
{
--- 2685,2691 ----
#line 1044 "pgc.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
! #line 2689 "pgc.c"
case YY_END_OF_BUFFER:
{
***************
*** 3062,3067 ****
--- 3061,3067 ----
#endif /* ifndef YY_NO_UNPUT */
+ #ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
***************
*** 3135,3141 ****
return c;
}
!
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
--- 3135,3141 ----
return c;
}
! #endif /* YY_NO_INPUT */
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
***************
*** 3246,3256 ****
}
- #ifndef YY_ALWAYS_INTERACTIVE
- #ifndef YY_NEVER_INTERACTIVE
- extern int isatty YY_PROTO(( int ));
- #endif
- #endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
--- 3246,3251 ----
Index: postgresql/src/pl/plpgsql/src/pl_scan.c
===================================================================
RCS file: /cvsroot/bizgres/bizgres/postgresql/src/pl/plpgsql/src/pl_scan.c,v
retrieving revision 1.1
diff -c -r1.1 pl_scan.c
*** postgresql/src/pl/plpgsql/src/pl_scan.c 15 Apr 2005 03:41:21 -0000 1.1
--- postgresql/src/pl/plpgsql/src/pl_scan.c 16 Jan 2006 01:47:50 -0000
***************
*** 19,26 ****
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
! * $Header: /cvsroot/bizgres/bizgres/postgresql/src/pl/plpgsql/src/pl_scan.c,v 1.1 2005/04/15 03:41:21 llonergan Exp $
! * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $
*/
#define FLEX_SCANNER
--- 19,25 ----
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
! * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
*/
#define FLEX_SCANNER
***************
*** 28,33 ****
--- 27,33 ----
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
+ #include <unistd.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
***************
*** 41,47 ****
#ifdef __cplusplus
#include <stdlib.h>
- #include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
--- 41,46 ----
***************
*** 896,902 ****
/* $foo$ style quotes ("dollar quoting")
* copied straight from the backend SQL parser
*/
! #line 900 "pl_scan.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
--- 895,901 ----
/* $foo$ style quotes ("dollar quoting")
* copied straight from the backend SQL parser
*/
! #line 899 "pl_scan.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
***************
*** 1047,1053 ****
YY_DECL
{
register yy_state_type yy_current_state;
! register char *yy_cp, *yy_bp;
register int yy_act;
#line 103 "scan.l"
--- 1046,1052 ----
YY_DECL
{
register yy_state_type yy_current_state;
! register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
#line 103 "scan.l"
***************
*** 1082,1088 ****
* The keyword rules
* ----------
*/
! #line 1086 "pl_scan.c"
if ( yy_init )
{
--- 1081,1087 ----
* The keyword rules
* ----------
*/
! #line 1085 "pl_scan.c"
if ( yy_init )
{
***************
*** 1737,1743 ****
#line 355 "scan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
! #line 1741 "pl_scan.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
--- 1736,1742 ----
#line 355 "scan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
! #line 1740 "pl_scan.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
***************
*** 2120,2125 ****
--- 2119,2125 ----
#endif /* ifndef YY_NO_UNPUT */
+ #ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
***************
*** 2192,2198 ****
return c;
}
!
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
--- 2192,2198 ----
return c;
}
! #endif /* YY_NO_INPUT */
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
***************
*** 2303,2313 ****
}
- #ifndef YY_ALWAYS_INTERACTIVE
- #ifndef YY_NEVER_INTERACTIVE
- extern int isatty YY_PROTO(( int ));
- #endif
- #endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
--- 2303,2308 ----
More information about the Bizgres-general
mailing list