]> granicus.if.org Git - postgresql/log
postgresql
14 years agoAdd a cross-reference to precedence information to CREATE OPERATOR's
Tom Lane [Thu, 8 Jul 2010 16:30:13 +0000 (16:30 +0000)]
Add a cross-reference to precedence information to CREATE OPERATOR's
documentation.  Per suggestion from Marc Cousin.

14 years agoMake the Windows tcp keepalive support depend on the existance of the
Magnus Hagander [Thu, 8 Jul 2010 16:19:50 +0000 (16:19 +0000)]
Make the Windows tcp keepalive support depend on the existance of the
SIO_KEEPALIVE_VALS define instead of just WIN32, since MingW doesn't
support this API (yet?).

14 years agoUpdate obsolete comment. Noted by Josh Tolley.
Tom Lane [Thu, 8 Jul 2010 16:08:30 +0000 (16:08 +0000)]
Update obsolete comment.  Noted by Josh Tolley.

14 years agoFix variant float8 expected files to have exactly the expected spacing.
Tom Lane [Thu, 8 Jul 2010 15:15:05 +0000 (15:15 +0000)]
Fix variant float8 expected files to have exactly the expected spacing.
This wasn't important when we used diff's -w (--ignore-all-space) option
to compare regression result files, but it is now.  Per buildfarm member
canary, which evidently has been offline since we did that in November,
but came to life again today.

14 years agoAdd support for TCP keepalives on Windows, both for backend and the new
Magnus Hagander [Thu, 8 Jul 2010 10:20:14 +0000 (10:20 +0000)]
Add support for TCP keepalives on Windows, both for backend and the new
libpq support.

14 years agoFix "cannot handle unplanned sub-select" error that can occur when a
Tom Lane [Thu, 8 Jul 2010 00:14:04 +0000 (00:14 +0000)]
Fix "cannot handle unplanned sub-select" error that can occur when a
sub-select contains a join alias reference that expands into an expression
containing another sub-select.  Per yesterday's report from Merlin Moncure
and subsequent off-list investigation.

Back-patch to 7.4.  Older versions didn't attempt to flatten sub-selects in
ways that would trigger this problem.

14 years agoAdjust mbutils.c so it won't get broken by future pgindent runs.
Tom Lane [Wed, 7 Jul 2010 15:13:21 +0000 (15:13 +0000)]
Adjust mbutils.c so it won't get broken by future pgindent runs.
To do that, replace L'\0' by (WCHAR) 0.  Perhaps someday we should teach
pgindent about wide-character literals, but so long as this is the only
use-case in the entire Postgres sources, a workaround seems easier.

14 years agoDocument the interaction of write-barrier-enabled file systems, and BBU
Bruce Momjian [Wed, 7 Jul 2010 14:42:09 +0000 (14:42 +0000)]
Document the interaction of write-barrier-enabled file systems, and BBU
caches, per June email thread.

14 years agoMake log_temp_files based on kB, and revert docs & comments to match.
Robert Haas [Tue, 6 Jul 2010 22:55:26 +0000 (22:55 +0000)]
Make log_temp_files based on kB, and revert docs & comments to match.

Per extensive discussion on pgsql-hackers.  We are deliberately not
back-patching this even though the behavior of 8.3 and 8.4 is
unquestionably broken, for fear of breaking existing users of this
parameter.  This incompatibility should be release-noted.

14 years agoAccept slightly grotty coding in Makefile.global in order to keep the -L
Tom Lane [Tue, 6 Jul 2010 22:03:05 +0000 (22:03 +0000)]
Accept slightly grotty coding in Makefile.global in order to keep the -L
flag for src/port/ in front of any -L flags placed in LDFLAGS by configure.
This undoes an L-flag-ordering change that I had thought would be safe,
but seems to be making at least one buildfarm member fail --- the only
theory for orca's failure that I can think of is that it's got an old
copy of libpgport.a in /usr/lib.  Also allow for LDFLAGS_SL to be set by
contrib makefiles before they invoke Makefile.global.

14 years agoAdd note that using PL/Python 2 and 3 in the same session will probably crash
Peter Eisentraut [Tue, 6 Jul 2010 21:37:31 +0000 (21:37 +0000)]
Add note that using PL/Python 2 and 3 in the same session will probably crash

14 years agoSupport setting the keepalive idle time on MacOS X.
Robert Haas [Tue, 6 Jul 2010 21:14:25 +0000 (21:14 +0000)]
Support setting the keepalive idle time on MacOS X.

MacOS X uses TCP_KEEPALIVE rather than TCP_KEEPIDLE for this purpose.

Thanks to Fujii Masao for the review.

14 years agoUndo pgindent breakage (again). Per buildfarm.
Tom Lane [Tue, 6 Jul 2010 21:09:00 +0000 (21:09 +0000)]
Undo pgindent breakage (again).  Per buildfarm.

14 years agoMention why one C file fails pgindent.
Bruce Momjian [Tue, 6 Jul 2010 19:26:28 +0000 (19:26 +0000)]
Mention why one C file fails pgindent.

14 years agopgindent run for 9.0, second run
Bruce Momjian [Tue, 6 Jul 2010 19:19:02 +0000 (19:19 +0000)]
pgindent run for 9.0, second run

14 years agoUpdate pgindent testing instructions.
Bruce Momjian [Tue, 6 Jul 2010 19:18:19 +0000 (19:18 +0000)]
Update pgindent testing instructions.

14 years agoStill more third thoughts: when linking shared libraries, LDFLAGS probably
Tom Lane [Tue, 6 Jul 2010 03:55:33 +0000 (03:55 +0000)]
Still more third thoughts: when linking shared libraries, LDFLAGS probably
needs to appear before anything placed in SHLIB_LINK.  This is because
SHLIB_LINK is typically a subset of LIBS, and LIBS has to appear after
LDFLAGS on platforms that are sensitive to the relative order of -L and -l
switches.

14 years agoAllow for LDFLAGS_SL already having a value in Makefile.aix.
Tom Lane [Tue, 6 Jul 2010 03:41:02 +0000 (03:41 +0000)]
Allow for LDFLAGS_SL already having a value in Makefile.aix.
Per buildfarm results.

14 years agoDept. of third thoughts: PG_LIBS may contain a -L switch, so it had better
Tom Lane [Mon, 5 Jul 2010 23:40:13 +0000 (23:40 +0000)]
Dept. of third thoughts: PG_LIBS may contain a -L switch, so it had better
stay in front of LDFLAGS.

14 years agoMake sure LDFLAGS come before LIBS when linking contrib programs.
Tom Lane [Mon, 5 Jul 2010 23:30:50 +0000 (23:30 +0000)]
Make sure LDFLAGS come before LIBS when linking contrib programs.
Solaris, at least, seems to be sensitive to the relative order of -L
and -l switches, so this is needed.  Per buildfarm results.

14 years agoFix a few single-file (MODULES, not MODULE_big) contrib makefiles that were
Tom Lane [Mon, 5 Jul 2010 23:15:56 +0000 (23:15 +0000)]
Fix a few single-file (MODULES, not MODULE_big) contrib makefiles that were
supposing that they should set SHLIB_LINK rather than LDFLAGS_SL.  Since these
don't go through Makefile.shlib that was a no-op on most platforms.  Also
regularize the few platform-specific Makefiles that did pay attention to
SHLIB_LINK: it seems that the real value of that is to pull in BE_DLLLIBS,
so do that instead.  Per buildfarm failures on cygwin.

14 years agoSplit the LDFLAGS make variable into two parts: LDFLAGS is now used for
Tom Lane [Mon, 5 Jul 2010 18:54:38 +0000 (18:54 +0000)]
Split the LDFLAGS make variable into two parts: LDFLAGS is now used for
linking both executables and shared libraries, and we add on LDFLAGS_EX when
linking executables or LDFLAGS_SL when linking shared libraries.  This
provides a significantly cleaner way of dealing with link-time switches than
the former behavior.  Also, make sure that the various platform-specific
%.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that
before.  (I did not add these variables for the platforms that invoke $(LD)
directly, however.  It's not clear if we can do that safely, since for the
most part we assume these variables use CC command-line syntax.)

Per gripe from Aaron Swenson and subsequent investigation.

14 years agoThe previous fix in CVS HEAD and 8.4 for handling the case where a cursor
Heikki Linnakangas [Mon, 5 Jul 2010 09:27:18 +0000 (09:27 +0000)]
The previous fix in CVS HEAD and 8.4 for handling the case where a cursor
being used in a PL/pgSQL FOR loop is closed was inadequate, as Tom Lane
pointed out. The bug affects FOR statement variants too, because you can
close an implicitly created cursor too by guessing the "<unnamed portal X>"
name created for it.

To fix that, "pin" the portal to prevent it from being dropped while it's
being used in a PL/pgSQL FOR loop. Backpatch all the way to 7.4 which is
the oldest supported version.

14 years agoSimplify test_fsync duration computation.
Bruce Momjian [Sun, 4 Jul 2010 13:42:51 +0000 (13:42 +0000)]
Simplify test_fsync duration computation.

14 years agoReport test_fynsc times in tests per second, instead of total seconds.
Bruce Momjian [Sun, 4 Jul 2010 01:50:29 +0000 (01:50 +0000)]
Report test_fynsc times in tests per second, instead of total seconds.

14 years agoRemove SGML tab.
Bruce Momjian [Sat, 3 Jul 2010 22:52:25 +0000 (22:52 +0000)]
Remove SGML tab.

14 years agoDon't set recoveryLastXTime when replaying a checkpoint --- that was a bogus
Tom Lane [Sat, 3 Jul 2010 22:15:45 +0000 (22:15 +0000)]
Don't set recoveryLastXTime when replaying a checkpoint --- that was a bogus
idea from the start since the variable is only meant to track commit/abort
events.  This patch reverts the logic around the variable to what it was in
8.4, except that the value is now kept in shared memory rather than a static
variable, so that it can be reported correctly by CreateRestartPoint (which is
executed in the bgwriter).

14 years agoMake vacuum_defer_cleanup_age be PGC_SIGHUP level, since it's not sensible
Tom Lane [Sat, 3 Jul 2010 21:23:58 +0000 (21:23 +0000)]
Make vacuum_defer_cleanup_age be PGC_SIGHUP level, since it's not sensible
to have different values in different processes of the primary server.
Also put it into the "Streaming Replication" GUC category; it doesn't belong
in "Standby Servers" because you use it on the master not the standby.
In passing also correct guc.c's idea of wal_keep_segments' category.

14 years agoReplace max_standby_delay with two parameters, max_standby_archive_delay and
Tom Lane [Sat, 3 Jul 2010 20:43:58 +0000 (20:43 +0000)]
Replace max_standby_delay with two parameters, max_standby_archive_delay and
max_standby_streaming_delay, and revise the implementation to avoid assuming
that timestamps found in WAL records can meaningfully be compared to clock
time on the standby server.  Instead, the delay limits are compared to the
elapsed time since we last obtained a new WAL segment from archive or since
we were last "caught up" to WAL data arriving via streaming replication.
This avoids problems with clock skew between primary and standby, as well
as other corner cases that the original coding would misbehave in, such
as the primary server having significant idle time between transactions.
Per my complaint some time ago and considerable ensuing discussion.

Do some desultory editing on the hot standby documentation, too.

14 years agoDocument more clearly on XML namespaces inside xpath function
Bruce Momjian [Sat, 3 Jul 2010 17:21:48 +0000 (17:21 +0000)]
Document more clearly on XML namespaces inside xpath function

Nikolay Samokhvalov

14 years agoMake pg_upgrade copyrights just 2010, not 2010-2010.
Bruce Momjian [Sat, 3 Jul 2010 16:33:15 +0000 (16:33 +0000)]
Make pg_upgrade copyrights just 2010, not 2010-2010.

14 years agoAdd copyrights to pg_upgrade and pg_upgrade_tools files, per Tom.
Bruce Momjian [Sat, 3 Jul 2010 16:25:01 +0000 (16:25 +0000)]
Add copyrights to pg_upgrade and pg_upgrade_tools files, per Tom.

14 years agoAdd CVS tags to pg_upgrade and pg_upgrade_support files, per request
Bruce Momjian [Sat, 3 Jul 2010 14:23:14 +0000 (14:23 +0000)]
Add CVS tags to pg_upgrade and pg_upgrade_support files, per request
from Tom.

14 years agoAllow REASSIGNED OWNED to handle opclasses and opfamilies.
Robert Haas [Sat, 3 Jul 2010 13:53:13 +0000 (13:53 +0000)]
Allow REASSIGNED OWNED to handle opclasses and opfamilies.

Backpatch to 8.3, which is as far back as we have opfamilies.
The opclass portion could probably be backpatched to 8.2, when
REASSIGN OWNED was added, but for now I have not done that.

Asko Tiidumaa, with minor adjustments by me.

14 years agoFix assorted misstatements and poor wording in the descriptions of the I/O
Tom Lane [Sat, 3 Jul 2010 04:03:06 +0000 (04:03 +0000)]
Fix assorted misstatements and poor wording in the descriptions of the I/O
formats for geometric types.  Per bug #5536 from Jon Strait, and my own
testing.

Back-patch to all supported branches, since this doco has been wrong right
along -- we certainly haven't changed the I/O behavior of these types in
many years.

14 years agoAdditional cross-references to window functions documentation.
Robert Haas [Sat, 3 Jul 2010 02:57:46 +0000 (02:57 +0000)]
Additional cross-references to window functions documentation.

Erik Rijkers

14 years agoUnbreak MSVC builds by removing copydir.c from list of libpgport files
Andrew Dunstan [Fri, 2 Jul 2010 23:25:27 +0000 (23:25 +0000)]
Unbreak MSVC builds by removing copydir.c from list of libpgport files

14 years agoRemove hstore % text[] operator; use slice() function instead.
Robert Haas [Fri, 2 Jul 2010 20:36:49 +0000 (20:36 +0000)]
Remove hstore % text[] operator; use slice() function instead.

David Wheeler, with one small correction by me.

14 years agoMove copydir.c from src/port to src/backend/storage/file
Robert Haas [Fri, 2 Jul 2010 17:03:30 +0000 (17:03 +0000)]
Move copydir.c from src/port to src/backend/storage/file

The previous commit to make copydir() interruptible prevented
postgres.exe from linking on MinGW and Cygwin, because on those
platforms libpgport_srv.a can't freely reference symbols defined
by the backend.  Since that code is already backend-specific anyway,
just move the whole file into the backend rather than adding further
kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS().

This probably needs some further cleanup, but this commit just moves
the file as-is, which should hopefully be enough to turn the
buildfarm green again.

14 years agoIssue 'mkdir' hint when replying CREATE TABLESPACE in recovery mode.
Bruce Momjian [Fri, 2 Jul 2010 02:44:32 +0000 (02:44 +0000)]
Issue 'mkdir' hint when replying CREATE TABLESPACE in recovery mode.

Per idea from Fujii Masao

14 years agoAllow copydir() to be interrupted.
Robert Haas [Thu, 1 Jul 2010 20:12:40 +0000 (20:12 +0000)]
Allow copydir() to be interrupted.

This makes ALTER DATABASE .. SET TABLESPACE and CREATE DATABASE more
sensitive to interrupts.  Backpatch to 8.4, where ALTER DATABASE .. SET
TABLESPACE was introduced.  We could go back further, but in the absence
of complaints about the CREATE DATABASE case it doesn't seem worth it.

Guillaume Lelarge, with a small correction by me.

14 years agoGet rid of some more stuff that duplicates c.h or port.h.
Tom Lane [Thu, 1 Jul 2010 15:52:52 +0000 (15:52 +0000)]
Get rid of some more stuff that duplicates c.h or port.h.

14 years agoRemove port.h prototypes from pg_upgrade.h, per report from Robert Haas.
Bruce Momjian [Thu, 1 Jul 2010 14:37:53 +0000 (14:37 +0000)]
Remove port.h prototypes from pg_upgrade.h, per report from Robert Haas.

14 years agoAllow ALTER TABLE .. SET TABLESPACE to be interrupted.
Robert Haas [Thu, 1 Jul 2010 14:10:21 +0000 (14:10 +0000)]
Allow ALTER TABLE .. SET TABLESPACE to be interrupted.

Backpatch to 8.0, where tablespaces were introduced.

Guillaume Lelarge

14 years agoUpdate 9.0 release notes so streaming replication and hot standby is not
Bruce Momjian [Thu, 1 Jul 2010 02:33:21 +0000 (02:33 +0000)]
Update 9.0 release notes so streaming replication and hot standby is not
assumed to require continuous archiving.

Per report from Fujii Masao

14 years agostringToNode() and deparse_expression_pretty() crash on invalid input,
Heikki Linnakangas [Wed, 30 Jun 2010 18:10:23 +0000 (18:10 +0000)]
stringToNode() and deparse_expression_pretty() crash on invalid input,
but we have nevertheless exposed them to users via pg_get_expr(). It would
be too much maintenance effort to rigorously check the input, so put a hack
in place instead to restrict pg_get_expr() so that the argument must come
from one of the system catalog columns known to contain valid expressions.

Per report from Rushabh Lathia. Backpatch to 7.4 which is the oldest
supported version at the moment.

14 years agoCorrect missing/misspelled surname.
Andrew Dunstan [Wed, 30 Jun 2010 14:25:24 +0000 (14:25 +0000)]
Correct missing/misspelled surname.

14 years agoDocument that /bin/true on Windows is implemented by 'REM'.
Bruce Momjian [Wed, 30 Jun 2010 02:43:10 +0000 (02:43 +0000)]
Document that /bin/true on Windows is implemented by 'REM'.

14 years agoIn documentation, use "lower case"/"upper case" consistently (use space
Bruce Momjian [Tue, 29 Jun 2010 22:29:14 +0000 (22:29 +0000)]
In documentation, use "lower case"/"upper case" consistently (use space
between words).

14 years agoDocument that shared_preload_libraries and local_preload_libraries
Bruce Momjian [Tue, 29 Jun 2010 22:23:02 +0000 (22:23 +0000)]
Document that shared_preload_libraries and local_preload_libraries
lowercase the library names, unless double-quoted.

14 years agoAdd compatibility note warning that plpgsql is now stricter about the column
Tom Lane [Tue, 29 Jun 2010 21:20:19 +0000 (21:20 +0000)]
Add compatibility note warning that plpgsql is now stricter about the column
datatypes of composite results, per gripe from Marcel Asio.  Some desultory
copy-editing of plpgsql-related sections of the release notes.

14 years agoAdd C comment about why synchronous_commit=off behavior can lose
Bruce Momjian [Tue, 29 Jun 2010 18:44:58 +0000 (18:44 +0000)]
Add C comment about why synchronous_commit=off behavior can lose
committed transactions in a postmaster crash.

14 years agoMessage tuning
Peter Eisentraut [Tue, 29 Jun 2010 04:12:47 +0000 (04:12 +0000)]
Message tuning

14 years agoUse different function names for plpython3 handlers, to avoid clashes in
Peter Eisentraut [Tue, 29 Jun 2010 00:18:11 +0000 (00:18 +0000)]
Use different function names for plpython3 handlers, to avoid clashes in
pg_pltemplate

This should have a catversion bump, but it's still being debated whether
it's worth it during beta.

14 years agoAdd note clarifying that XML fragments don't accept DTDs
Peter Eisentraut [Tue, 29 Jun 2010 00:03:39 +0000 (00:03 +0000)]
Add note clarifying that XML fragments don't accept DTDs

per complaint from Craig Ringer

14 years agoFix doc double-wording in non-durable patch.
Bruce Momjian [Mon, 28 Jun 2010 22:46:11 +0000 (22:46 +0000)]
Fix doc double-wording in non-durable patch.

Report from Thom Brown

14 years agoAdd new Non-Durable Settings documentation section.
Bruce Momjian [Mon, 28 Jun 2010 21:57:17 +0000 (21:57 +0000)]
Add new Non-Durable Settings documentation section.

Document that synchronous_commit can lose transactions in a db crash,
not just a OS crash.

14 years agoemode_for_corrupt_record shouldn't reduce LOG messages to WARNING.
Robert Haas [Mon, 28 Jun 2010 19:46:19 +0000 (19:46 +0000)]
emode_for_corrupt_record shouldn't reduce LOG messages to WARNING.

In non-interactive sessions, WARNING sorts below LOG.

14 years agoAdd guidelines for formatting errcontext strings
Peter Eisentraut [Mon, 28 Jun 2010 17:48:26 +0000 (17:48 +0000)]
Add guidelines for formatting errcontext strings

14 years agoRemove tab from SGML.
Bruce Momjian [Mon, 28 Jun 2010 12:30:32 +0000 (12:30 +0000)]
Remove tab from SGML.

14 years agoImprove pg_dump's checkSeek() function to verify the functioning of ftello
Tom Lane [Mon, 28 Jun 2010 02:07:02 +0000 (02:07 +0000)]
Improve pg_dump's checkSeek() function to verify the functioning of ftello
as well as fseeko, and to not assume that fseeko(fp, 0, SEEK_CUR) proves
anything.  Also improve some related comments.  Per my observation that
the SEEK_CUR test didn't actually work on some platforms, and subsequent
discussion with Robert Haas.

Back-patch to 8.4.  In earlier releases it's not that important whether
we get the hasSeek test right, but with parallel restore it matters.

14 years agoFix pg_restore so parallel restore doesn't fail when the input file doesn't
Tom Lane [Sun, 27 Jun 2010 19:07:24 +0000 (19:07 +0000)]
Fix pg_restore so parallel restore doesn't fail when the input file doesn't
contain data offsets (which it won't, if pg_dump thought its output wasn't
seekable).  To do that, remove an unnecessarily aggressive error check, and
instead fail if we get to the end of the archive without finding the desired
data item.  Also improve the error message to be more specific about the
cause of the problem.  Per discussion of recent report from Igor Neyman.

Back-patch to 8.4 where parallel restore was introduced.

14 years agoRewrite docs for new libpq keepalive parameters.
Robert Haas [Fri, 25 Jun 2010 17:08:09 +0000 (17:08 +0000)]
Rewrite docs for new libpq keepalive parameters.

The revised documentation makes it more clear that these are client-side
parameters, rather than server side parameters.  It also puts the main
point of each parameter first, and consolidates the conditions under which
it might be ignored in a single list at the end.

14 years agoMake AIX suggestions about disabling ipv6 more version-sensitive.
Robert Haas [Fri, 25 Jun 2010 16:55:49 +0000 (16:55 +0000)]
Make AIX suggestions about disabling ipv6 more version-sensitive.

Chris Browne, based on a report from John Pierce.

14 years agoFix thinko in tok_is_keyword(): it was looking at the wrong union variant
Tom Lane [Fri, 25 Jun 2010 16:40:13 +0000 (16:40 +0000)]
Fix thinko in tok_is_keyword(): it was looking at the wrong union variant
of YYSTYPE, and hence returning the wrong answer for cases where a plpgsql
"unreserved keyword" really does conflict with a variable name.  Obviously
I didn't test this enough :-(.  Per bug #5524 from Peter Gagarinov.

14 years agoFix log_temp_files docs and comments to say bytes not kilobytes.
Simon Riggs [Fri, 25 Jun 2010 13:11:25 +0000 (13:11 +0000)]
Fix log_temp_files docs and comments to say bytes not kilobytes.
stat(2) field st_size returns bytes not kilobytes.
Bug found during recent performance tuning for PostgreSQL user.

14 years agoSome copy-editing of the Hot Standby documentation.
Robert Haas [Thu, 24 Jun 2010 19:50:25 +0000 (19:50 +0000)]
Some copy-editing of the Hot Standby documentation.

Thanks to Joshua Tolley for the review.

14 years agoFurther 9.0 release notes updates.
Robert Haas [Thu, 24 Jun 2010 18:33:05 +0000 (18:33 +0000)]
Further 9.0 release notes updates.

Josh Berkus

14 years agoAdd stray "else" that seems to have gone missing.
Robert Haas [Thu, 24 Jun 2010 16:40:45 +0000 (16:40 +0000)]
Add stray "else" that seems to have gone missing.

14 years agoMention that when alter rewrites a table, indexes are also rebuilt.
Bruce Momjian [Thu, 24 Jun 2010 14:57:21 +0000 (14:57 +0000)]
Mention that when alter rewrites a table, indexes are also rebuilt.

14 years agoAdd TCP keepalive support to libpq.
Robert Haas [Wed, 23 Jun 2010 21:54:13 +0000 (21:54 +0000)]
Add TCP keepalive support to libpq.

This adds four additional connection parameters to libpq: keepalives,
keepalives_idle, keepalives_count, and keepalives_interval.
keepalives default to on, per discussion, but can be turned off by
specifying keepalives=0.  The remaining parameters, where supported,
can be used to adjust how often keepalives are sent and how many
can be lost before the connection is broken.

The immediate motivation for this patch is to make sure that
walreceiver will eventually notice if the master reboots without
closing the connection cleanly, but it should be helpful in other
cases as well.

Tollef Fog Heen, Fujii Masao, and me.

14 years agoAdd username designations to all pg_upgrade utility calls that support it.
Bruce Momjian [Wed, 23 Jun 2010 20:04:50 +0000 (20:04 +0000)]
Add username designations to all pg_upgrade utility calls that support it.

14 years agoFix pg_upgrade's use of pg_ctl on Win32 to not send command and sever
Bruce Momjian [Tue, 22 Jun 2010 16:45:10 +0000 (16:45 +0000)]
Fix pg_upgrade's use of pg_ctl on Win32 to not send command and sever
output to the same file, because it is impossible.

Also set user name for pg_dumpall in pg_upgrade.

14 years agoUpdate pg_ctl docs to explain server output behavior differences on
Bruce Momjian [Tue, 22 Jun 2010 16:19:36 +0000 (16:19 +0000)]
Update pg_ctl docs to explain server output behavior differences on
win32 and non-win32 platforms.

14 years agoUpdated expected-output file for hstore.
Robert Haas [Tue, 22 Jun 2010 12:54:22 +0000 (12:54 +0000)]
Updated expected-output file for hstore.

This is an oversight in my previous patch to deprecate => as an operator
name.  Per buildfarm.

14 years agoDeprecate the use of => as an operator name.
Robert Haas [Tue, 22 Jun 2010 11:36:16 +0000 (11:36 +0000)]
Deprecate the use of => as an operator name.

In HEAD, emit a warning when an operator named => is defined.
In both HEAD and the backbranches (except in 8.2, where contrib
modules do not have documentation), document that hstore's text =>
text operator may be removed in a future release, and encourage the
use of the hstore(text, text) function instead.  This function only
exists in HEAD (previously, it was called tconvert), so backpatch
it back to 8.2, when hstore was added.  Per discussion.

14 years agoMinor markup improvements for Hot Standby documentation.
Robert Haas [Tue, 22 Jun 2010 02:57:50 +0000 (02:57 +0000)]
Minor markup improvements for Hot Standby documentation.

14 years agoIn a PL/pgSQL "FOR cursor" statement, the statements executed in the loop
Heikki Linnakangas [Mon, 21 Jun 2010 09:47:29 +0000 (09:47 +0000)]
In a PL/pgSQL "FOR cursor" statement, the statements executed in the loop
might close the cursor,  rendering the Portal pointer to it invalid.
Closing the cursor in the middle of the loop is not a very sensible thing
to do, but we must handle it gracefully and throw an error instead of
crashing.

14 years agoFix mishandling of whole-row Vars referencing a view or sub-select.
Tom Lane [Mon, 21 Jun 2010 00:14:48 +0000 (00:14 +0000)]
Fix mishandling of whole-row Vars referencing a view or sub-select.
If such a Var appeared within a nested sub-select, we failed to translate it
correctly during pullup of the view, because the recursive call to
replace_rte_variables_mutator was looking for the wrong sublevels_up value.
Bug was introduced during the addition of the PlaceHolderVar mechanism.
Per bug #5514 from Marcos Castedo.

14 years agoRename hstore => text[] operator to %
Robert Haas [Fri, 18 Jun 2010 03:52:03 +0000 (03:52 +0000)]
Rename hstore => text[] operator to %

This is not yet in any released version, so we still have the option to
change the name.  We may want to reserve the token => in a future release.

14 years agoClean up some randomness associated with trace_recovery_messages: don't
Tom Lane [Thu, 17 Jun 2010 17:44:40 +0000 (17:44 +0000)]
Clean up some randomness associated with trace_recovery_messages: don't
put the variable declaration in the middle of a bunch of externs,
and do use extern where it should be used.

14 years agoMake RemoveOldXlogFiles's debug printout match style used elsewhere:
Tom Lane [Thu, 17 Jun 2010 17:37:23 +0000 (17:37 +0000)]
Make RemoveOldXlogFiles's debug printout match style used elsewhere:
log and seg aren't an XLogRecPtr and shouldn't be printed like one.
Fujii Masao

14 years agoClean up pg_archivecleanup's error and logging output: put newlines in
Tom Lane [Thu, 17 Jun 2010 17:31:27 +0000 (17:31 +0000)]
Clean up pg_archivecleanup's error and logging output: put newlines in
sane places, make messages follow project's message style guidelines.

Also, avoid closedir(NULL).

Fujii Masao and Tom Lane

14 years agoAdd missing close brackets in old-style COPY syntax diagram.
Tom Lane [Thu, 17 Jun 2010 17:03:57 +0000 (17:03 +0000)]
Add missing close brackets in old-style COPY syntax diagram.
Spotted by Evan Carroll.

14 years agoDon't allow walsender to send WAL data until it's been safely fsync'd on the
Tom Lane [Thu, 17 Jun 2010 16:41:25 +0000 (16:41 +0000)]
Don't allow walsender to send WAL data until it's been safely fsync'd on the
master.  Otherwise a subsequent crash could cause the master to lose WAL that
has already been applied on the slave, resulting in the slave being out of
sync and soon corrupt.  Per recent discussion and an example from Robert Haas.

Fujii Masao

14 years agoFix typo, init => int, per KOIZUMI Satoru.
Tom Lane [Thu, 17 Jun 2010 16:03:30 +0000 (16:03 +0000)]
Fix typo, init => int, per KOIZUMI Satoru.

14 years agoDocument that receive location can rewind if replication restarts.
Robert Haas [Thu, 17 Jun 2010 01:32:09 +0000 (01:32 +0000)]
Document that receive location can rewind if replication restarts.

Fujii Masao, with some further wordsmithing by me.

14 years agoRemove prototype of GetOldestWALSendPointer(), that is marked as NOT_USED.
Itagaki Takahiro [Thu, 17 Jun 2010 00:06:34 +0000 (00:06 +0000)]
Remove prototype of GetOldestWALSendPointer(), that is marked as NOT_USED.

14 years agoFix pg_upgrade to remove malloc(0) call.
Bruce Momjian [Wed, 16 Jun 2010 19:43:11 +0000 (19:43 +0000)]
Fix pg_upgrade to remove malloc(0) call.

14 years agoUpdate doc description for 9.0 release note item:
Bruce Momjian [Wed, 16 Jun 2010 18:46:18 +0000 (18:46 +0000)]
Update doc description for 9.0 release note item:

      Have <command>SELECT</> and <command>CREATE TABLE AS</> return
      row counts to the client

14 years ago9.0 release notes updates.
Bruce Momjian [Wed, 16 Jun 2010 18:31:39 +0000 (18:31 +0000)]
9.0 release notes updates.

Josh Berkus

14 years agoRemove perl symbol table additions for plperl functions, and mention of it
Andrew Dunstan [Wed, 16 Jun 2010 14:50:34 +0000 (14:50 +0000)]
Remove perl symbol table additions for plperl functions, and mention of it
in the release notes, as it is not apparently providing anything useful.

14 years agoAdd notes that CREATE/DROP CONVERSION is similar to CREATE/DROP
Peter Eisentraut [Wed, 16 Jun 2010 02:12:51 +0000 (02:12 +0000)]
Add notes that CREATE/DROP CONVERSION is similar to CREATE/DROP
TRANSLATION in the SQL standard.

14 years agoRefactor sprintf calls with computed format strings into multiple calls with
Peter Eisentraut [Wed, 16 Jun 2010 00:54:16 +0000 (00:54 +0000)]
Refactor sprintf calls with computed format strings into multiple calls with
constant format strings, so that the compiler can more easily check the
formats for correctness.

14 years agoFix storage of getopt() return, should be 'int', for pg_upgrade.
Bruce Momjian [Tue, 15 Jun 2010 23:25:01 +0000 (23:25 +0000)]
Fix storage of getopt() return, should be 'int', for pg_upgrade.

Steve Singer

14 years agoChange the interpretation of the primary_key_attnums parameter of
Tom Lane [Tue, 15 Jun 2010 20:29:01 +0000 (20:29 +0000)]
Change the interpretation of the primary_key_attnums parameter of
dblink_build_sql_insert() and related functions.  Now the column numbers
are treated as logical not physical column numbers.  This will provide saner
behavior in the presence of dropped columns; furthermore, if we ever get
around to allowing rearrangement of logical column ordering, the original
definition would become nearly untenable from a usability standpoint.
Per recent discussion of dblink's handling of dropped columns.
Not back-patched for fear of breaking existing applications.

14 years agoClarify SELECT FOR UPDATE behavior in docs.
Bruce Momjian [Tue, 15 Jun 2010 20:04:53 +0000 (20:04 +0000)]
Clarify SELECT FOR UPDATE behavior in docs.

14 years agoRemove hstore's text[] => text[] operator.
Robert Haas [Tue, 15 Jun 2010 19:48:30 +0000 (19:48 +0000)]
Remove hstore's text[] => text[] operator.

This is not yet in any released version, so we still have the option to
backtrack.  Instead, document hstore(text[], text[]).  Per discussion.

14 years agoFix dblink_build_sql_insert() and related functions to handle dropped
Tom Lane [Tue, 15 Jun 2010 19:04:15 +0000 (19:04 +0000)]
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

14 years agoDocument new 9.0 behavior of ANALYZE on inheritance hierarchies.
Robert Haas [Tue, 15 Jun 2010 18:43:35 +0000 (18:43 +0000)]
Document new 9.0 behavior of ANALYZE on inheritance hierarchies.

In particular, note that autovacuum does not yet understand that it might
need to vacuum inheritance parents as a result of changes to the child
tables.