postgresql/src/backend
Heikki Linnakangas 31ed42b9a3 Fix bug where GIN scan keys were not initialized with gin_fuzzy_search_limit.
When gin_fuzzy_search_limit was used, we could jump out of startScan()
without calling startScanKey(). That was harmless in 9.3 and below, because
startScanKey()() didn't do anything interesting, but in 9.4 it initializes
information needed for skipping entries (aka GIN fast scans), and you
readily get a segfault if it's not done. Nevertheless, it was clearly wrong
all along, so backpatch all the way to 9.1 where the early return was
introduced.

(AFAICS startScanKey() did nothing useful in 9.3 and below, because the
fields it initialized were already initialized in ginFillScanKey(), but I
don't dare to change that in a minor release. ginFillScanKey() is always
called in gingetbitmap() even though there's a check there to see if the
scan keys have already been initialized, because they never are; ginrescan()
free's them.)

In the passing, remove unnecessary if-check from the second inner loop in
startScan(). We already check in the first loop that the condition is true
for all entries.

Reported by Olaf Gawenda, bug #12694, Backpatch to 9.1 and above, although
AFAICS it causes a live bug only in 9.4.
2015-01-29 19:35:55 +02:00
..
access Fix bug where GIN scan keys were not initialized with gin_fuzzy_search_limit. 2015-01-29 19:35:55 +02:00
bootstrap Remove some dead IsUnderPostmaster code from bootstrap.c. 2015-01-14 00:37:02 +01:00
catalog Add usebypassrls to pg_user and pg_shadow 2015-01-28 21:47:15 -05:00
commands Clean up range-table building in copy.c 2015-01-28 17:42:28 -05:00
executor Fix column-privilege leak in error-message paths 2015-01-28 12:31:30 -05:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix typos, update README. 2015-01-23 15:06:53 -05:00
libpq Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
main Always set the six locale category environment variables in main(). 2015-01-07 22:34:57 -05:00
nodes Improve new caching logic in tbm_add_tuples(). 2015-01-16 13:28:30 -05:00
optimizer Fix ancient thinko in default table rowcount estimation. 2015-01-18 17:04:11 -05:00
parser Prevent duplicate escape-string warnings when using pg_stat_statements. 2015-01-22 18:11:00 -05:00
po Translation updates 2014-12-15 00:25:35 -05:00
port Add barriers to the latch code. 2015-01-13 12:58:43 +01:00
postmaster Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Further cleanup of ReorderBufferCommit(). 2015-01-25 22:49:56 -05:00
rewrite Fix column-privilege leak in error-message paths 2015-01-28 12:31:30 -05:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Fix typo in comment. 2015-01-28 10:26:30 +02:00
tcop Add a default local latch for use in signal handlers. 2015-01-14 18:45:22 +01:00
tsearch Update copyright for 2015 2015-01-06 11:43:47 -05:00
utils Move out-of-memory error checks from aset.c to mcxt.c 2015-01-29 10:23:38 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
nls.mk xlogreader.c: Fix report_invalid_record translatability flag 2015-01-09 12:34:25 -03:00