aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-09-30 16:37:00 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-09-30 16:54:03 +0300
commitee01d848f39400c8524c66944ada6fde47894978 (patch)
tree593aa96f16d6dbd5d49ff7569d003d217ce76cb4 /src/backend/utils/adt
parent357f7521384df34c697b3544115622520a6a0e9f (diff)
downloadpostgresql-ee01d848f39400c8524c66944ada6fde47894978.tar.gz
postgresql-ee01d848f39400c8524c66944ada6fde47894978.zip
In bms_add_member(), use repalloc() if the bms needs to be enlarged.
Previously bms_add_member() would palloc a whole-new copy of the existing set, copy the words, and pfree the old one. repalloc() is potentially much faster, and more importantly, this is less surprising if CurrentMemoryContext is not the same as the context the old set is in. bms_add_member() still allocates a new bitmapset in CurrentMemoryContext if NULL is passed as argument, but that is a lot less likely to induce bugs. Nicholas White.
Diffstat (limited to 'src/backend/utils/adt')
0 files changed, 0 insertions, 0 deletions