Tom Lane [Thu, 11 Oct 2007 21:27:49 +0000 (21:27 +0000)]
Ensure that the result of evaluating a function during constant-expression
simplification gets detoasted before it is incorporated into a Const node.
Otherwise, if an immutable function were to return a TOAST pointer (an
unlikely case, but it can be made to happen), we would end up with a plan
that depends on the continued existence of the out-of-line toast datum.
Tom Lane [Thu, 11 Oct 2007 19:54:17 +0000 (19:54 +0000)]
Code review for txid patch: add binary I/O functions, avoid dependence
on SerializableSnapshot, minor other cleanup. Marko Kreen, some further
editorialization by me.
Tom Lane [Thu, 11 Oct 2007 18:19:58 +0000 (18:19 +0000)]
Remove incorrect use of VARSIZE() on a toasted datum. We can just remove it
instead of fix it, since once we've set toast_action[i] to 'p' it no longer
matters what toast_sizes[i] is. Greg Stark
Tom Lane [Thu, 11 Oct 2007 18:05:27 +0000 (18:05 +0000)]
Fix the plan-invalidation mechanism to treat regclass constants that refer to
a relation as a reason to invalidate a plan when the relation changes. This
handles scenarios such as dropping/recreating a sequence that is referenced by
nextval('seq') in a cached plan. Rather than teach plancache.c all about
digging through plan trees to find regclass Consts, we charge the planner's
setrefs.c with making a list of the relation OIDs on which each plan depends.
That way the list can be built cheaply during a plan tree traversal that has
to happen anyway. Per bug #3662 and subsequent discussion.
Bruce Momjian [Mon, 8 Oct 2007 18:01:17 +0000 (18:01 +0000)]
Add:
> o Have ALTER SEQUENCE RENAME rename the sequence name stored
> in the sequence table
>
> http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php
> http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php
>
Jan Wieck [Sun, 7 Oct 2007 23:32:19 +0000 (23:32 +0000)]
Added the Skytools extended transaction ID module to contrib as discussed
on CORE previously.
This module offers transaction ID's containing the original XID and the
transaction epoch as a bigint value to the user level. It also provides
a special txid_snapshot data type that contains an entire transactions
visibility snapshot information, which is useful to determine if a
particular txid was visible to a transaction or not.
The module has been tested by porting Slony-I from using its original
xxid data type.
Alvaro Herrera [Sun, 7 Oct 2007 01:16:42 +0000 (01:16 +0000)]
A few improvements to analyze and vacuum sections in documentation: add "see
also" entries for autovacuum in analyze and vacuum reference pages, and
enhance usage of cross-references in the maintenance page.
Alvaro Herrera [Sun, 7 Oct 2007 00:32:11 +0000 (00:32 +0000)]
Clean up the doc makefile for draft HTML generation. It no longer works
to do "make DRAFT=Y html"; you need to use "make draft" (which was also
supported previously).
Tom Lane [Sat, 6 Oct 2007 16:18:09 +0000 (16:18 +0000)]
Make dumpcolors() have tolerable performance when using 32-bit chr,
as we do (and upstream Tcl doesn't). The loop limit might be subject
to negotiation if anyone ever tries to do regex debugging in Far
Eastern languages, but for now 1000 seems plenty. CHR_MAX was right out :-(
Tom Lane [Sat, 6 Oct 2007 16:01:51 +0000 (16:01 +0000)]
Adjust regcustom.h so that all those assert() calls in the regex package
are converted to Postgres Assert() macros, instead of using <assert.h>
as formerly. No difference in production builds, but --enable-cassert
debug builds will get better coverage for regex testing.
Tom Lane [Fri, 5 Oct 2007 17:06:11 +0000 (17:06 +0000)]
Fix plperl and pltcl to include the name of the current function when
passing on errors from the language interpreter. (plpython seems
fairly OK about this already.) Per gripe from Robert Kleemann.
Bruce Momjian [Fri, 5 Oct 2007 16:42:32 +0000 (16:42 +0000)]
Add pgcvslog '-d' capability to allow stripping of commit messages that
have back branch activity. This will be useful for creating release
notes for major releases.
Tom Lane [Thu, 4 Oct 2007 20:44:47 +0000 (20:44 +0000)]
Keep the planner from failing on "WHERE false AND something IN (SELECT ...)".
eval_const_expressions simplifies this to just "WHERE false", but we have
already done pull_up_IN_clauses so the IN join will be done, or at least
planned, anyway. The trouble case comes when the sub-SELECT is itself a join
and we decide to implement the IN by unique-ifying the sub-SELECT outputs:
with no remaining reference to the output Vars in WHERE, we won't have
propagated the Vars up to the upper join point, leading to "variable not found
in subplan target lists" error. Fix by adding an extra scan of in_info_list
and forcing all Vars mentioned therein to be propagated up to the IN join
point. Per bug report from Miroslav Sulc.
Tom Lane [Wed, 3 Oct 2007 23:02:16 +0000 (23:02 +0000)]
Second pass at 8.3 release notes: put items in a bit more logical order
where possible, add overview and incompatibilities lists, minor cleanups.
The SGML-ification still leaves much to be desired.
Tom Lane [Wed, 3 Oct 2007 15:59:13 +0000 (15:59 +0000)]
Tweak recently-added tests to suppress scary-looking warnings on 64-bit
machines about casts between pointers and integers of different sizes.
While they're harmless, we shouldn't expect users to have to go through
and figure that out for themselves.
Magnus Hagander [Wed, 3 Oct 2007 13:57:52 +0000 (13:57 +0000)]
Attempt to open certificate file "manually" using fopen before
trying BIO functions.
Helps problem with older versions of OpenSSL that lacks error
stack functions and would show an incorrect error message for
file-not-found-or-not-openable. The problem may still exist for
other errors, but file open error is by far the most common one.
Tom Lane [Wed, 3 Oct 2007 03:32:31 +0000 (03:32 +0000)]
First cut at 8.3 release notes. SGML markup is nonexistent, and
the 'overview' and 'incompatibilities' summary lists remain to be
written. But I think all the raw info is there (indeed maybe too
verbose).
Tom Lane [Tue, 2 Oct 2007 00:25:20 +0000 (00:25 +0000)]
Cope with ERR_set_mark() and ERR_pop_to_mark() not existing in older
OpenSSL libraries --- just don't call them if they're not there. This
might possibly lead to misleading error messages, but we'll just have
to live with that.
Magnus Hagander [Mon, 1 Oct 2007 20:30:06 +0000 (20:30 +0000)]
Use BIO functions to avoid passing FILE * pointers to OpenSSL functions.
This fixes potential crashes on old versions of OpenSSL and the requirement on
"Applink" in new versions when building with MSVC and using different
runtimes.
Tom Lane [Mon, 1 Oct 2007 16:25:56 +0000 (16:25 +0000)]
Avoid assuming that struct varattrib_pointer doesn't get padded by the
compiler --- at least on ARM, it does. I suspect that the varvarlena patch
has been creating larger-than-intended toast pointers all along on ARM,
but it wasn't exposed until the latest tweak added some Asserts that
calculated the expected size in a different way. We could probably have
fixed this by adding __attribute__((packed)) as is done for ItemPointerData,
but struct varattrib_pointer isn't really all that useful anyway, so it
seems cleanest to just get rid of it and have only struct varattrib_1b_e.
Per results from buildfarm member quagga.
Tom Lane [Sun, 30 Sep 2007 19:54:58 +0000 (19:54 +0000)]
Add an extra header byte to TOAST-pointer datums to represent their size
explicitly. This means a TOAST pointer takes 18 bytes instead of 17 --- still
smaller than in 8.2 --- which seems a good tradeoff to ensure we won't have
painted ourselves into a corner if we want to support multiple types of TOAST
pointer later on. Per discussion with Greg Stark.