diff options
| author | Robert Haas <rhaas@postgresql.org> | 2017-02-07 17:01:40 -0500 |
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2017-02-07 17:10:08 -0500 |
| commit | c3c4f6e1740be256178cd7551d5b8a7677159b74 (patch) | |
| tree | 728e79dbbb7117bf827f1b0b49ea0184db658d8f /src/backend | |
| parent | 242066cc8e587ccbe5e1cf38c4f085f080dcd5e0 (diff) | |
| download | postgresql-c3c4f6e1740be256178cd7551d5b8a7677159b74.tar.gz | |
Revise the way the element allocator for a simplehash is specified.
This method is more elegant and more efficient.
Per a suggestion from Andres Freund, who also briefly reviewed
the patch.
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/executor/execGrouping.c | 3 | ||||
| -rw-r--r-- | src/backend/nodes/tidbitmap.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c index 2d9ce938ba..47c9656e1b 100644 --- a/src/backend/executor/execGrouping.c +++ b/src/backend/executor/execGrouping.c @@ -330,8 +330,7 @@ BuildTupleHashTable(int numCols, AttrNumber *keyColIdx, else hashtable->hash_iv = 0; - hashtable->hashtab = - tuplehash_create(tablecxt, nbuckets, NULL, NULL, NULL); + hashtable->hashtab = tuplehash_create(tablecxt, nbuckets); hashtable->hashtab->private_data = hashtable; return hashtable; diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c index 36102b5dea..7b31948fd2 100644 --- a/src/backend/nodes/tidbitmap.c +++ b/src/backend/nodes/tidbitmap.c @@ -244,7 +244,7 @@ tbm_create_pagetable(TIDBitmap *tbm) Assert(tbm->status != TBM_HASH); Assert(tbm->pagetable == NULL); - tbm->pagetable = pagetable_create(tbm->mcxt, 128, NULL, NULL, NULL); + tbm->pagetable = pagetable_create(tbm->mcxt, 128); /* If entry1 is valid, push it into the hashtable */ if (tbm->status == TBM_ONE_PAGE) |
