Commit Graph

27996 Commits

Author SHA1 Message Date
Tom Lane 7de7876cd5 Fix psql's \dD to show only one row per domain, even when the domain has
multiple check constraints.
2009-02-23 15:59:55 +00:00
Peter Eisentraut 3e96ed4c2b Add quotes to message 2009-02-23 10:03:22 +00:00
Heikki Linnakangas bc134d7a51 Change the signaling of end-of-recovery. Startup process now indicates end
of recovery by exiting with exit code 0, like in previous releases. Per
Tom's suggestion.
2009-02-23 09:28:50 +00:00
Tom Lane 451a15f95c Add note that inlined SQL functions aren't tracked by track_functions. 2009-02-22 23:50:30 +00:00
Peter Eisentraut 1491b4c47d another small message tweak 2009-02-20 10:39:19 +00:00
Andrew Dunstan fae3083c3b Reconnect to the right database when using parallel restore with -C. Fixes bug reported by Olivier Prenant 2009-02-20 02:57:21 +00:00
Tom Lane 7920ed389c Simplify overcomplicated (and overly restrictive) test to see whether an
IS NULL condition is rendered redundant by detection of an antijoin.
If we know that a join is an antijoin, then *any* Var coming out of its
righthand side must be NULL, not only the joining column(s).  Also,
it's still gonna be null after being passed up through higher joins,
whether they're outer joins or not.  I was misled by a faulty analogy
to reduce_outer_joins() in the original coding.  But consider

select * from a left join b on a.x = b.y where b.y is null and b.z is null;

The first IS NULL condition justifies deciding that the join is an antijoin
(if the = is strict) and then the second one is just plain redundant.
2009-02-20 00:01:03 +00:00
Tom Lane 233b8a99ad Improve comments about semijoin implementation strategy, per a question
from Robert Haas.
2009-02-19 20:32:45 +00:00
Heikki Linnakangas 5717f3a3e6 Fix bogus comment, from the patch to start bgwriter during archive
recovery.
2009-02-19 16:43:13 +00:00
Peter Eisentraut 80e26caa02 Wordsmithing for PL/Perl messages 2009-02-19 10:33:17 +00:00
Peter Eisentraut 6becfa280c Add an implicit rule %.c -> %.i for running the C preprocessor.
I occasionally use this for debugging, and it seems wasteful to have to
reinvent this all the time.
2009-02-19 10:32:30 +00:00
Peter Eisentraut b870f8008d Remove croak and Perl_croak from gettext triggers. While we could
selectively mark up their arguments for translation, the Perl xsubpp tool
generates a bunch of additional Perl_croak calls that we cannot control,
so we'd be creating a confusing mix of translated and untranslated messages
of a similar kind.  This is something that might deserve a more
comprehensive solution later.

Also remove _ from gettext triggers, because it wasn't used.

Use SPI.c instead of SPI.xs as source file for xgettext, because the .xs
format isn't really supported in xgettext.
2009-02-19 10:07:58 +00:00
Heikki Linnakangas 6ebc6d9089 Increase NUM_AUXILIARY_PROCS, now that the startup process can co-exist
with other auxiliary processes for a short period. As witnessed by
buildfarm member dungbeetle.
2009-02-19 08:02:32 +00:00
Tom Lane 86ffdcad1b Remove the special cases to prevent minus-zero results in float4 and float8
unary minus operators.  We weren't attempting to prevent minus zero anywhere
else; in view of our gradual trend to make the float datatypes more IEEE
standard compliant, we should allow minus zero here rather than disallow it
elsewhere.

We don't, however, expect that all platforms will produce minus zero, so
we need to adjust the one affected regression test to allow both results.

Per discussion of bug #4660.

(In passing, clean up a couple other minor infelicities in float.c.)
2009-02-18 19:23:26 +00:00
Heikki Linnakangas cdd46c7654 Start background writer during archive recovery. Background writer now performs
its usual buffer cleaning duties during archive recovery, and it's responsible
for performing restartpoints.

This requires some changes in postmaster. When the startup process has done
all the initialization and is ready to start WAL redo, it signals the
postmaster to launch the background writer. The postmaster is signaled again
when the point in recovery is reached where we know that the database is in
consistent state. Postmaster isn't interested in that at the moment, but
that's the point where we could let other backends in to perform read-only
queries. The postmaster is signaled third time when the recovery has ended,
so that postmaster knows that it's safe to start accepting connections.

The startup process now traps SIGTERM, and performs a "clean" shutdown. If
you do a fast shutdown during recovery, a shutdown restartpoint is performed,
like a shutdown checkpoint, and postmaster kills the processes cleanly. You
still have to continue the recovery at next startup, though.

Currently, the background writer is only launched during archive recovery.
We could launch it during crash recovery as well, but it seems better to keep
that codepath as simple as possible, for the sake of robustness. And it
couldn't do any restartpoints during crash recovery anyway, so it wouldn't be
that useful.

log_restartpoints is gone. Use log_checkpoints instead. This is yet to be
documented.

This whole operation is a pre-requisite for Hot Standby, but has some value of
its own whether the hot standby patch makes 8.4 or not.

Simon Riggs, with lots of modifications by me.
2009-02-18 15:58:41 +00:00
Bruce Momjian 36a9cf38c5 Add --freeze option to vacuumdb. 2009-02-18 12:11:55 +00:00
Bruce Momjian 1d88d4e2c0 Have pg_dump/pg_dumpall --binary-upgrade restore frozenids for relations
and databases.
2009-02-18 12:07:08 +00:00
Peter Eisentraut b9a366933d Message wordsmithing 2009-02-18 11:33:04 +00:00
Bruce Momjian 5c89839ab2 Add missing newline. 2009-02-17 22:32:54 +00:00
Bruce Momjian 6883c54a62 Add pg_dump --binary-upgrade flag to be used by binary upgrade
utilities.

The new code allows transfer of dropped column information to the
upgraded server.
2009-02-17 15:41:50 +00:00
Peter Eisentraut 82aea0efe8 Add _() calls for the argument of plpgsql_yyerror() so it actually gets
translated somehow.
2009-02-17 13:01:13 +00:00
Peter Eisentraut 207b4e7461 Add plpgsql_yyerror to gettext triggers 2009-02-17 12:59:35 +00:00
Peter Eisentraut 1d6b681ed3 Mark 3rd argument of validate_tupdesc_compat() for translation, instead of
marking up each instance separately.
2009-02-17 12:51:59 +00:00
Peter Eisentraut b06abb7455 Redefine _() to dgettext() instead of gettext() so that it uses the plpgsql
text domain, instead of the postgres one (or whatever the default may be).
2009-02-17 11:34:34 +00:00
Peter Eisentraut acee2f6fa4 Remove gettext trigger write_stderr(), which isn't used by PLs. 2009-02-17 09:24:57 +00:00
Bruce Momjian d665ed5c21 Wrap some long queries. 2009-02-16 23:06:55 +00:00
Bruce Momjian 98ffcb66cb Uppercase keywords in pg_dump.c 2009-02-16 22:50:41 +00:00
Tom Lane ce6e31de9c Teach the planner to treat a partial unique index as proving a variable is
unique for a particular query, if the index predicate is satisfied.  This
requires a bit of reordering of operations so that we check the predicates
before doing any selectivity estimates, but shouldn't really cause any
noticeable slowdown.  Per a comment from Michal Politowski.
2009-02-15 20:16:21 +00:00
Tom Lane 57b5984d24 Minor wordsmithing. 2009-02-15 18:28:48 +00:00
Magnus Hagander 2e371183ee Loop calling CallNamedPipe() several times in case it fails,
since it can be transient failures, causing kill() to not
properly send signals.

Original patch from Steve Marshall, modified by me.
2009-02-15 13:58:18 +00:00
Tom Lane 3f7626e9f2 A couple of marginal performance hacks for the information_schema views:
replace the old recursive-SQL-function implementation of _pg_keysequal()
with use of the built-in array containment operators, and change
table_constraints' UNION to UNION ALL.  Per discussion with Octavio Alvarez.

initdb not forced since this doesn't affect results, but you'd need to
initdb or reload the information_schema to see the new definitions.
2009-02-14 20:48:36 +00:00
Tom Lane ca5646fc82 Fix UNLISTEN to fall out quickly if the current backend has never executed
any LISTEN command.  This is more important than it used to be because
DISCARD ALL invokes UNLISTEN.  Connection-pooled applications making heavy
use of DISCARD ALL were seeing significant contention for pg_listener,
as reported by Matteo Beccati.  It seems unlikely that clients using LISTEN
would use pooled connections, so this simple tweak seems sufficient,
especially since the pg_listener implementation is slated to go away soon
anyway.

Back-patch to 8.3, where DISCARD ALL was introduced.
2009-02-13 17:12:04 +00:00
Andrew Dunstan 30735adfe4 do not use unsetenv.c on mingw 2009-02-12 15:12:47 +00:00
Peter Eisentraut 71936fc5eb The Czech (cs_CZ) and Slovak (sk_SK) locales sort numbers after letters,
instead of vice versa.  Update the regression test expectations to support
that.  In the plpgsql test, adjust the test data so that this isn't an
issue.  In the char and varchar tests, add new expected files.
2009-02-12 15:11:44 +00:00
Peter Eisentraut c1c1886d82 Unset language-related locale settings in any case, otherwise psql will
speak in tongues and mess up the regression test diffs.
2009-02-12 13:26:03 +00:00
Bruce Momjian eee82d44bd Remove tabs from SGML. 2009-02-12 13:25:33 +00:00
Magnus Hagander b31d0719fb Don't call SetEnvironmentVariable() when removing an environment variable,
as this seems to crash on at least some versions of MingW. Our current usage
of this function does not require it, so it should be ok to ignore.
2009-02-12 12:53:34 +00:00
Tom Lane 6d1e361852 Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to physically
get rid of the OID column.  This eliminates the problem discovered by Heikki
back in November that 8.4's suppression of "unnecessary" junk filtering in
INSERT/SELECT could lead to an Assert failure, or storing of oids into a table
that shouldn't have them if Asserts are off.  While that particular problem
could have been solved in other ways, it seems likely to be just a forerunner
of things to come if we continue to allow tables to contain rows that disagree
with the pg_class.relhasoids setting.  It's better to make this operation slow
than to sacrifice performance or risk bugs in more common code paths.

Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids.
This was a bit more controversial, but in view of the very small amount of
extra code needed given the current ALTER TABLE infrastructure, it seems best
to eliminate the asymmetry in features.
2009-02-11 21:11:16 +00:00
Tom Lane 68d95f12e7 Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running
on AIX with a non-gcc compiler.  The previous coding would do this only if
CC was exactly "xlc"; which is a bad idea, as demonstrated by trouble report
from Mihai Criveti.
2009-02-11 20:02:40 +00:00
Alvaro Herrera 787020fd3d Improve psql \d+ to show TOAST reloptions too. Per complaint from
ITAGAKI Takahiro.
2009-02-11 19:12:04 +00:00
Peter Eisentraut 20a43b16b4 Only unset the locale environment when --no-locale is used (the way it was
presumably designed, but didn't act).  This allows running the temp install
tests in a non-C locale, thus exercising users' real environments better.
Document how to change locales for test runs.
2009-02-11 14:03:42 +00:00
Bruce Momjian 715ea2bf18 Clarify PQinitSSL() documentation to mention what the argument controls. 2009-02-11 04:08:47 +00:00
Peter Eisentraut 8b9dd6b5fd Support for KOI8U encoding 2009-02-10 19:29:39 +00:00
Peter Eisentraut 1cb54c2860 Remove the encoding *numbers* from the comments. They are useless, and
make maintenance harder.
2009-02-10 16:44:44 +00:00
Peter Eisentraut 06941da30b Add possibility to generate only some files, by passing command-line
arguments.
2009-02-10 16:36:55 +00:00
Bruce Momjian b79e374519 Update wording of how to prevent pg_dump from affecting statistics
collection.
2009-02-10 00:55:21 +00:00
Tom Lane 8205258fa6 Adopt Bob Jenkins' improved hash function for hash_any(). This changes the
contents of hash indexes (again), so bump catversion.

Kenneth Marshall
2009-02-09 21:18:28 +00:00
Alvaro Herrera 834a6da4f7 Update autovacuum to use reloptions instead of a system catalog, for
per-table overrides of parameters.

This removes a whole class of problems related to misusing the catalog,
and perhaps more importantly, gives us pg_dump support for the parameters.

Based on a patch by Euler Taveira de Oliveira, heavily reworked by me.
2009-02-09 20:57:59 +00:00
Bruce Momjian 57b10ebcd4 Fix spelling error in docs.
Erik Rijkers
2009-02-09 14:09:56 +00:00
Tom Lane 3d02cae310 Ensure that INSERT ... SELECT into a table with OIDs never copies row OIDs
from the source table.  This could never happen anyway before 8.4 because
the executor invariably applied a "junk filter" to rows due to be inserted;
but now that we skip doing that when it's not necessary, the case can occur.
Problem noted 2008-11-27 by KaiGai Kohei, though I misunderstood what he
was on about at the time (the opacity of the patch he proposed didn't help).
2009-02-08 18:02:27 +00:00