Tom Lane [Fri, 16 Nov 2007 21:55:59 +0000 (21:55 +0000)]
Improve GIN index build's tracking of memory usage by using
GetMemoryChunkSpace, not just the palloc request size. This brings the
allocatedMemory counter close enough to reality (as measured by
MemoryContextStats printouts) that I think we can get rid of the arbitrary
factor-of-2 adjustment that was put into the code initially. Given the
sensitivity of GIN build to work memory size, not using as much of work
memory as we're allowed to seems a pretty bad idea.
Tom Lane [Fri, 16 Nov 2007 21:50:06 +0000 (21:50 +0000)]
GIN index build's allocatedMemory counter needs to be long, not uint32.
Else, in a 64-bit machine with maintenance_work_mem set to above 4Gb,
the counter overflows and we never recognize having reached the
maintenance_work_mem limit. I believe this explains out-of-memory
failure recently reported by Sean Davis.
Tom Lane [Fri, 16 Nov 2007 19:53:50 +0000 (19:53 +0000)]
Repair still another bug in the btree page split WAL reduction patch:
it failed for splits of non-leaf pages because in such pages the first
data key on a page is suppressed, and so we can't just copy the first
key from the right page to reconstitute the left page's high key.
Problem found by Koichi Suzuki, patch by Heikki.
Tom Lane [Fri, 16 Nov 2007 00:34:54 +0000 (00:34 +0000)]
Add snb_ru_init(internal) to list of stub functions in tsearch2
compatibility module. Needed to support loading of 8.1-era tsearch2
configuration data.
Bruce Momjian [Fri, 16 Nov 2007 00:13:02 +0000 (00:13 +0000)]
Modify LOOPBYTE/LOOPBIT macros to be more logical; rather than have the
for() body passed as a parameter, make the macros act as simple headers
to code blocks.
Bruce Momjian [Thu, 15 Nov 2007 23:23:44 +0000 (23:23 +0000)]
Fix pgindent to properly handle 'else' and single-line comments on the
same line; previous fix was only partial. Re-run pgindent on files
that need it.
Tom Lane [Thu, 15 Nov 2007 20:36:40 +0000 (20:36 +0000)]
Prevent re-use of a deleted relation's relfilenode until after the next
checkpoint. This guards against an unlikely data-loss scenario in which
we re-use the relfilenode, then crash, then replay the deletion and
recreation of the file. Even then we'd be OK if all insertions into the
new relation had been WAL-logged ... but that's not guaranteed given all
the no-WAL-logging optimizations that have recently been added.
Patch by Heikki Linnakangas, per a discussion last month.
Tom Lane [Wed, 14 Nov 2007 23:43:27 +0000 (23:43 +0000)]
Add a rank/(rank+1) normalization option to ts_rank(). While the usefulness
of this seems a bit marginal, if it's useful enough to be shown in the manual
then we probably ought to support doing it without double evaluation of the
ts_rank function. Per my proposal earlier today.
Tom Lane [Wed, 14 Nov 2007 18:36:37 +0000 (18:36 +0000)]
Add an Accept parameter to "simple" dictionaries. The default of true
gives the old behavior; selecting false allows the dictionary to be used
as a filter ahead of other dictionaries, because it will pass on rather
than accept words that aren't in its stopword list.
Jan Urbanski
Magnus Hagander [Wed, 14 Nov 2007 14:25:55 +0000 (14:25 +0000)]
Add note about deprecating krb5 authentication in favour of GSSAPI,
per discussions (a long time ago). Documentation only, we keep full
support in the code.
Tom Lane [Wed, 14 Nov 2007 03:26:24 +0000 (03:26 +0000)]
Update discussion of tsearch2 migration. I'm not entirely sure about
the division of material between here and the tsearch2 contrib page,
but at least it's not obviously unfinished any more.
Tom Lane [Wed, 14 Nov 2007 02:36:43 +0000 (02:36 +0000)]
Move contrib docs to an appendix (next door to External Projects).
Change title to Additional Supplied Modules. Improve discussion of
how to build and install 'em.
Tom Lane [Tue, 13 Nov 2007 21:02:29 +0000 (21:02 +0000)]
Replace the now-incompatible-with-core contrib/tsearch2 module with a
compatibility package. This supports importing dumps from past versions
using tsearch2, and provides the old names and API for most functions
that were changed. (rewrite(ARRAY[...]) is a glaring omission, though.)
Tom Lane [Tue, 13 Nov 2007 06:29:04 +0000 (06:29 +0000)]
Fix a few contrib regression test scripts that hadn't gotten the word
about best practice for including the module creation scripts: to wit
that you should suppress NOTICE messages. This avoids creating
regression failures by adding or removing comment lines in the module
scripts.
Tom Lane [Tue, 13 Nov 2007 01:55:49 +0000 (01:55 +0000)]
Fix insufficient search-path paranoia in SQL function definitions.
Remove setting of search_path in install/uninstall scripts, since unlike
other contrib modules this one does not want to let you change the
installation schema.
Tom Lane [Tue, 13 Nov 2007 00:13:19 +0000 (00:13 +0000)]
I find that an out-of-the-box installation of OSSP uuid 1.6.0 installs
itself as libuuid, not libossp-uuid which was the only case expected by
our build support. Install a configure test to determine which name
to use (and to check that the library is present at all).
Tom Lane [Sun, 11 Nov 2007 19:22:49 +0000 (19:22 +0000)]
Ensure that typmod decoration on a datatype name is validated in all cases,
even in code paths where we don't pay any subsequent attention to the typmod
value. This seems needed in view of the fact that 8.3's generalized typmod
support will accept a lot of bogus syntax, such as "timestamp(foo)" or
"record(int, 42)" --- if we allow such things to pass without comment,
users will get confused. Per a recent example from Greg Stark.
To implement this in a way that's not very vulnerable to future
bugs-of-omission, refactor the API of parse_type.c's TypeName lookup routines
so that typmod validation is folded into the base lookup operation. Callers
can still choose not to receive the encoded typmod, but we'll check the
decoration anyway if it's present.
Tom Lane [Sat, 10 Nov 2007 20:14:36 +0000 (20:14 +0000)]
Add an example of a SQL function with output parameters returning
multiple rows. I had thought this case was covered, but there was
no example in the obvious section to look in.
Tom Lane [Sat, 10 Nov 2007 19:29:54 +0000 (19:29 +0000)]
Add missing closing / in xsd:restriction, and remove some unnecessary
spaces for consistency. Per bug #3734 from Ben Leslie; fix by
Euler Taveira de Oliveira.
Tom Lane [Sat, 10 Nov 2007 18:51:20 +0000 (18:51 +0000)]
xmlGetUTF8Char()'s second argument is both input and output. Fix
uninitialized value, and avoid invoking the function nine separate
times in the pg_xmlIsNameChar macro. Should resolve buildfarm failures.
Per report from Ben Leslie.