Simon Riggs [Sat, 15 May 2010 07:14:43 +0000 (07:14 +0000)]
Fix bug in processing of checkpoint time for max_standby_delay. Latest
log time was incorrectly set, typically leading to dates in the past,
which would cause more cancellations in Hot Standby on a quiet server.
Robert Haas [Fri, 14 May 2010 18:08:33 +0000 (18:08 +0000)]
We now accept read-only connections in state PM_RECOVERY_CONSISTENT.
Itagaki Takahiro [Fri, 14 May 2010 10:37:02 +0000 (10:37 +0000)]
Remove CRs.
Simon Riggs [Fri, 14 May 2010 07:11:49 +0000 (07:11 +0000)]
Add many new Asserts in code and fix simple bug that slipped through
without them, related to previous commit. Report by Bruce Momjian.
Tom Lane [Fri, 14 May 2010 00:43:42 +0000 (00:43 +0000)]
Fix another obvious bug pointed out by a compiler warning.
Tom Lane [Fri, 14 May 2010 00:39:51 +0000 (00:39 +0000)]
Remove another unsafe use of random data as a format string.
Tom Lane [Fri, 14 May 2010 00:32:21 +0000 (00:32 +0000)]
Get rid of unsafe sprintf and snprintf usages. Per compiler warnings.
Tom Lane [Fri, 14 May 2010 00:19:46 +0000 (00:19 +0000)]
Spell __darwin__ correctly, to suppress compiler warning on OSX.
Bruce Momjian [Fri, 14 May 2010 00:13:38 +0000 (00:13 +0000)]
Use NAMEDATALEN instead of local define.
Modify path separators for Win32.
Per ideas from Takahiro Itagaki
Bruce Momjian [Thu, 13 May 2010 22:51:00 +0000 (22:51 +0000)]
Remove all mentions of EnterpriseDB Advanced Server from pg_upgrade;
EDB must maintain their own patch set for this.
Tom Lane [Thu, 13 May 2010 22:07:43 +0000 (22:07 +0000)]
Fix up lame idea of not using autoconf to determine if platform has scandir().
Should fix buildfarm failures.
Andrew Dunstan [Thu, 13 May 2010 21:33:00 +0000 (21:33 +0000)]
Fix MSVC builds for recent plperl changes. Go back to version 8.2, which is
where we started supporting MSVC builds.
Security: CVE-2010-1169
Tom Lane [Thu, 13 May 2010 21:26:59 +0000 (21:26 +0000)]
Update release notes with security issues.
Security: CVE-2010-1169, CVE-2010-1170
Tom Lane [Thu, 13 May 2010 19:16:14 +0000 (19:16 +0000)]
Use an entity instead of non-ASCII letter. Thom Brown
Tom Lane [Thu, 13 May 2010 18:54:18 +0000 (18:54 +0000)]
Use "TOAST table" in place of the vague, not-used-elsewhere phrase
"supplementary storage table".
Tom Lane [Thu, 13 May 2010 18:29:12 +0000 (18:29 +0000)]
Prevent PL/Tcl from loading the "unknown" module from pltcl_modules unless
that is a regular table or view owned by a superuser. This prevents a
trojan horse attack whereby any unprivileged SQL user could create such a
table and insert code into it that would then get executed in other users'
sessions whenever they call pltcl functions.
Worse yet, because the code was automatically loaded into both the "normal"
and "safe" interpreters at first use, the attacker could execute unrestricted
Tcl code in the "normal" interpreter without there being any pltclu functions
anywhere, or indeed anyone else using pltcl at all: installing pltcl is
sufficient to open the hole. Change the initialization logic so that the
"unknown" code is only loaded into an interpreter when the interpreter is
first really used. (That doesn't add any additional security in this
particular context, but it seems a prudent change, and anyway the former
behavior violated the principle of least astonishment.)
Security: CVE-2010-1170
Andrew Dunstan [Thu, 13 May 2010 16:39:43 +0000 (16:39 +0000)]
Abandon the use of Perl's Safe.pm to enforce restrictions in plperl, as it is
fundamentally insecure. Instead apply an opmask to the whole interpreter that
imposes restrictions on unsafe operations. These restrictions are much harder
to subvert than is Safe.pm, since there is no container to be broken out of.
Backported to release 7.4.
In releases 7.4, 8.0 and 8.1 this also includes the necessary backporting of
the two interpreters model for plperl and plperlu adopted in release 8.2.
In versions 8.0 and up, the use of Perl's POSIX module to undo its locale
mangling on Windows has become insecure with these changes, so it is
replaced by our own routine, which is also faster.
Nice side effects of the changes include that it is now possible to use perl's
"strict" pragma in a natural way in plperl, and that perl's $a and
$b variables now work as expected in sort routines, and that function
compilation is significantly faster.
Tim Bunce and Andrew Dunstan, with reviews from Alex Hunsaker and
Alexey Klyukin.
Security: CVE-2010-1169
Magnus Hagander [Thu, 13 May 2010 15:58:15 +0000 (15:58 +0000)]
Assorted fixes to make pg_upgrade build on MSVC.
* There is no chmod() on Windows.
* Must always use the 3-parameter version of open()
* There is no dynloader.h - but it also appears unnecessary on all platforms
* Don't include shlobj.h because it causes compile errors, and from what I can
see it's not actually used. This may need to be added back for mingw
and/or cygwin in the worst case.
Peter Eisentraut [Thu, 13 May 2010 15:56:43 +0000 (15:56 +0000)]
Translation update
Magnus Hagander [Thu, 13 May 2010 15:56:22 +0000 (15:56 +0000)]
Properly support multi-line entires (such as OBJS=) when building
PROGRAM, not just MODULE, in contrib.
Bruce Momjian [Thu, 13 May 2010 15:03:24 +0000 (15:03 +0000)]
Comment out EnterpriseDB Advanced Server mention in SGML docs.
Peter Eisentraut [Thu, 13 May 2010 14:35:28 +0000 (14:35 +0000)]
Avoid error from mkdir if no languages are to be installed
mkinstalldirs used to handle no arguments, but mkdir doesn't.
Also remove the .SILENT setting, that was previously removed from
Makefile.global as well.
Magnus Hagander [Thu, 13 May 2010 14:16:41 +0000 (14:16 +0000)]
Fix some spelling errors.
Thom Brown
Andrew Dunstan [Thu, 13 May 2010 13:40:03 +0000 (13:40 +0000)]
Add missing library and include support for pg_upgrade to MSVC build system.
Bruce Momjian [Thu, 13 May 2010 12:47:50 +0000 (12:47 +0000)]
Fix HISTORY.html build using </link>, not </>.
Peter Eisentraut [Thu, 13 May 2010 11:49:48 +0000 (11:49 +0000)]
Fix vpath installation from distribution tarball (bug #5447)
Simon Riggs [Thu, 13 May 2010 11:39:30 +0000 (11:39 +0000)]
Ensure that top level aborts call XLogSetAsyncCommit(). Not doing
so simply leads to data waiting in wal_buffers which then causes
later commits to potentially do emergency writes and for all forms
of replication to be potentially delayed without need or benefit.
Issue pointed out exactly by Fujii Masao, following bug report
by Robert Haas on a separate though related topic.
Simon Riggs [Thu, 13 May 2010 11:15:38 +0000 (11:15 +0000)]
Cleanup initialization of Hot Standby. Clarify working with reanalysis
of requirements and documentation on LogStandbySnapshot(). Fixes
two minor bugs reported by Tom Lane that would lead to an incorrect
snapshot after transaction wraparound. Also fix two other problems
discovered that would give incorrect snapshots in certain cases.
ProcArrayApplyRecoveryInfo() substantially rewritten. Some minor
refactoring of xact_redo_apply() and ExpireTreeKnownAssignedTransactionIds().
Tom Lane [Thu, 13 May 2010 05:17:16 +0000 (05:17 +0000)]
Fix wrong subdir. Per buildfarm.
Bruce Momjian [Thu, 13 May 2010 01:57:01 +0000 (01:57 +0000)]
Update release notes to current.
Bruce Momjian [Thu, 13 May 2010 01:03:01 +0000 (01:03 +0000)]
Move pg_upgrade shared library out into its own /contrib directory
(pg_upgrade_support).
Bruce Momjian [Wed, 12 May 2010 23:48:36 +0000 (23:48 +0000)]
Update comment about why postmaster doesn't get an icon.
Tom Lane [Wed, 12 May 2010 23:20:49 +0000 (23:20 +0000)]
Preliminary release notes for releases 8.4.4, 8.3.11, 8.2.17, 8.1.21, 8.0.25,
7.4.29.
Bruce Momjian [Wed, 12 May 2010 21:42:21 +0000 (21:42 +0000)]
Remove Makefile PGFILEDESC tag that the postmaster is an executable.
Simon Riggs [Wed, 12 May 2010 19:45:02 +0000 (19:45 +0000)]
Give most recovery conflict errors a retryable error code. From recent
requests and discussions with Yeb Havinga and Kevin Grittner.
Tom Lane [Wed, 12 May 2010 16:50:58 +0000 (16:50 +0000)]
Hook pg_upgrade into the contrib makefile structure so it gets built
on the buildfarm.
Peter Eisentraut [Wed, 12 May 2010 16:50:57 +0000 (16:50 +0000)]
Update config.guess and config.sub
Tom Lane [Wed, 12 May 2010 16:50:00 +0000 (16:50 +0000)]
Clean up unnecessary unportability and compiler warnings by removing the
cmp parameter for pg_scandir(). The code failed to support this anyway
for Sun/Windows, so pretending we could accept a parameter other than
NULL was just asking for trouble.
Bruce Momjian [Wed, 12 May 2010 13:59:21 +0000 (13:59 +0000)]
Move pg_upgrade TODO to TODO wiki.
Bruce Momjian [Wed, 12 May 2010 11:33:10 +0000 (11:33 +0000)]
Add PGFILEDESC description to Makefiles for all /contrib executables.
Add PGAPPICON to all executable makefiles.
Bruce Momjian [Wed, 12 May 2010 11:07:24 +0000 (11:07 +0000)]
Small formatting adjustment.
Bruce Momjian [Wed, 12 May 2010 02:24:43 +0000 (02:24 +0000)]
Add pg_upgrade IMPLEMENTATION file to CVS.
Bruce Momjian [Wed, 12 May 2010 02:23:56 +0000 (02:23 +0000)]
Add TODO file to CVS.
Bruce Momjian [Wed, 12 May 2010 02:19:11 +0000 (02:19 +0000)]
Add pg_upgrade to /contrib; will be in 9.0 beta2.
Add documentation.
Supports migration from PG 8.3 and 8.4.
Tom Lane [Tue, 11 May 2010 23:01:27 +0000 (23:01 +0000)]
Update time zone data files to tzdata release 2010j: DST law changes in
Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan,
Palestine, Russia, Syria, Tunisia. Historical corrections for Taiwan.
Tom Lane [Tue, 11 May 2010 22:36:52 +0000 (22:36 +0000)]
Add PKST to the default set of timezone abbreviations.
Per discussion, if we have PKT in there then PKST should be too.
Also, fix mistaken claim that these abbrevs are not known to zic.
Robert Haas [Tue, 11 May 2010 18:14:01 +0000 (18:14 +0000)]
Change typedef for rb_appendator to avoid conflict with C++ reserved words.
Fixes a complaint from src/tools/pginclude/cpluspluscheck reported by
Peter Eisentraut.
Tom Lane [Tue, 11 May 2010 16:42:28 +0000 (16:42 +0000)]
Cause the archiver process to adopt new postgresql.conf settings (particularly
archive_command) as soon as possible, namely just before issuing a new call
of archive_command, even when there is a backlog of files to be archived.
The original coding would only absorb new settings after clearing the backlog
and returning to the outer loop. Per discussion.
Back-patch to 8.3. The logic in prior versions is a bit different and it
doesn't seem worth taking any risks of breaking it.
Robert Haas [Tue, 11 May 2010 16:07:42 +0000 (16:07 +0000)]
Mention related ALTER TABLE variants in documentation for CLUSTER.
As suggested by Andy Lester.
Tom Lane [Tue, 11 May 2010 15:31:37 +0000 (15:31 +0000)]
Fix incorrect patch that removed permission checks on inheritance child
tables --- the parent table no longer got checked, either. Per bug #5458
from Takahiro Itagaki.
Itagaki Takahiro [Tue, 11 May 2010 04:52:28 +0000 (04:52 +0000)]
Set per-function GUC settings during validating the function.
Now validators work properly even when the settings contain
parameters that affect behavior of the function, like search_path.
Reported by Erwin Brandstetter.
Tom Lane [Mon, 10 May 2010 16:25:46 +0000 (16:25 +0000)]
When adding a "target IS NOT NULL" indexqual to the plan for an index-optimized
MIN or MAX, we must take care to insert the added qual in a legal place among
the existing indexquals, if any. The btree index AM requires the quals to
appear in index-column order. We didn't have to worry about this before
because "target IS NOT NULL" was just treated as a plain scan filter condition;
but as of 9.0 it can be an index qual and then it has to follow the rule.
Per report from Ian Barwick.
Tom Lane [Sun, 9 May 2010 18:17:47 +0000 (18:17 +0000)]
Suppress signed-vs-unsigned-char warning.
Tom Lane [Sun, 9 May 2010 18:11:55 +0000 (18:11 +0000)]
Fix missing static declaration for XLogRead().
Tom Lane [Sun, 9 May 2010 16:30:31 +0000 (16:30 +0000)]
Fix typo: PGTYPES_NUM_OVERFLOW should be PGTYPES_NUM_UNDERFLOW.
Noted by KOIZUMI Satoru.
Tom Lane [Sun, 9 May 2010 02:16:00 +0000 (02:16 +0000)]
Adjust comments about avoiding use of printf's %.*s.
My initial impression that glibc was measuring the precision in characters
(which is what the Linux man page says it does) was incorrect. It does take
the precision to be in bytes, but it also tries to truncate the string at a
character boundary. The bottom line remains the same: it will mess up
if the string is not in the encoding it expects, so we need to avoid %.*s
anytime there's a significant risk of that. Previous code changes are still
good, but adjust the comments to reflect this knowledge. Per research by
Hernan Gonzalez.
Tom Lane [Sat, 8 May 2010 16:39:53 +0000 (16:39 +0000)]
Work around a subtle portability problem in use of printf %s format.
Depending on which spec you read, field widths and precisions in %s may be
counted either in bytes or characters. Our code was assuming bytes, which
is wrong at least for glibc's implementation, and in any case libc might
have a different idea of the prevailing encoding than we do. Hence, for
portable results we must avoid using anything more complex than just "%s"
unless the string to be printed is known to be all-ASCII.
This patch fixes the cases I could find, including the psql formatting
failure reported by Hernan Gonzalez. In HEAD only, I also added comments
to some places where it appears safe to continue using "%.*s".
Michael Meskes [Fri, 7 May 2010 19:35:03 +0000 (19:35 +0000)]
ECPG connect routine only checked for NULL to find empty parameters, but user and password can also be "".
Tom Lane [Thu, 6 May 2010 19:28:25 +0000 (19:28 +0000)]
On Linux, use --enable-new-dtags when specifying -rpath to linker.
This should allow LD_LIBRARY_PATH to work as desired. Per trouble
report from Andy Colson.
Itagaki Takahiro [Thu, 6 May 2010 02:12:38 +0000 (02:12 +0000)]
Code page for EUC-KR is surely 51949.
Tom Lane [Wed, 5 May 2010 22:18:56 +0000 (22:18 +0000)]
Fix psql to not go into infinite recursion when expanding a variable that
refers to itself (directly or indirectly). Instead, print a message when
recursion is detected, and don't expand the repeated reference. Per bug
#5448 from Francis Markham.
Back-patch to 8.0. Although the issue exists in 7.4 as well, it seems
impractical to fix there because of the lack of any state stack that
could be used to track active expansions.
Heikki Linnakangas [Wed, 5 May 2010 15:10:25 +0000 (15:10 +0000)]
Fix incorrect parameter tag in docs, spotted by KOIZUMI Satoru.
Alvaro Herrera [Mon, 3 May 2010 15:35:30 +0000 (15:35 +0000)]
Remove spurious dot, per bug #5446 reported by koizumistr@minos.ocn.ne.jp
Heikki Linnakangas [Mon, 3 May 2010 11:17:52 +0000 (11:17 +0000)]
Need to hold ControlFileLock while updating control file. Update
minRecoveryPoint in control file when replaying a parameter change record,
to ensure that we don't allow hot standby on WAL generated without
wal_level='hot_standby' after a standby restart.
Heikki Linnakangas [Mon, 3 May 2010 10:31:29 +0000 (10:31 +0000)]
Change wording so that you don't need to understand that wal_levels
form a hierarchy. Per Simon's suggestion.
Heikki Linnakangas [Mon, 3 May 2010 09:15:17 +0000 (09:15 +0000)]
Change "literal" tag to the more appropriate "firstterm", when describing
what "eventually consistent" means.
Heikki Linnakangas [Mon, 3 May 2010 09:14:17 +0000 (09:14 +0000)]
Add cross-reference from wal_level to hot_standby setting. Update
the PITR documentation to mention that you need to set wal_level to
'archive' or 'hot_standby', to enable WAL archiving. Per Simon's request.
Tom Lane [Sun, 2 May 2010 22:37:43 +0000 (22:37 +0000)]
Improve printing of XLOG_HEAP_NEWPAGE records to include the forknum.
Tom Lane [Sun, 2 May 2010 22:28:05 +0000 (22:28 +0000)]
Fix replay of XLOG_HEAP_NEWPAGE WAL records to pay attention to the forknum
field of the WAL record. The previous coding always wrote to the main fork,
resulting in data corruption if the page was meant to go into a non-default
fork.
At present, the only operation that can produce such WAL records is
ALTER TABLE/INDEX SET TABLESPACE when executed with archive_mode = on.
Data corruption would be observed on standby slaves, and could occur on the
master as well if a database crash and recovery occurred after committing
the ALTER and before the next checkpoint. Per report from Gordon Shannon.
Back-patch to 8.4; the problem doesn't exist in earlier branches because
we didn't have a concept of multiple relation forks then.
Simon Riggs [Sun, 2 May 2010 12:28:43 +0000 (12:28 +0000)]
Update standbycheck test output with new ERROR message changes. No changes
to tests and no changes in accepted server behaviour.
Simon Riggs [Sun, 2 May 2010 12:22:40 +0000 (12:22 +0000)]
Docs for standbycheck regression tests.
Simon Riggs [Sun, 2 May 2010 11:32:53 +0000 (11:32 +0000)]
Mention that max_standby_delay has units of milliseconds. Units are mentioned
for all other parameters where the default is expressed in a different unit.
Tom Lane [Sun, 2 May 2010 02:10:33 +0000 (02:10 +0000)]
Clean up some awkward, inaccurate, and inefficient processing around
MaxStandbyDelay. Use the GUC units mechanism for the value, and choose more
appropriate timestamp functions for performing tests with it. Make the
ps_activity manipulation in ResolveRecoveryConflictWithVirtualXIDs have
behavior similar to ps_activity code elsewhere, notably not updating the
display when update_process_title is off and not truncating the display
contents at an arbitrarily-chosen length. Improve the docs to be explicit
about what MaxStandbyDelay actually measures, viz the difference between
primary and standby servers' clocks, and the possible hazards if their clocks
aren't in sync.
Tom Lane [Sat, 1 May 2010 22:46:30 +0000 (22:46 +0000)]
Add code to InternalIpcMemoryCreate() to handle the case where shmget()
returns EINVAL for an existing shared memory segment. Although it's not
terribly sensible, that behavior does meet the POSIX spec because EINVAL
is the appropriate error code when the existing segment is smaller than the
requested size, and the spec explicitly disclaims any particular ordering of
error checks. Moreover, it does in fact happen on OS X and probably other
BSD-derived kernels. (We were able to talk NetBSD into changing their code,
but purging that behavior from the wild completely seems unlikely to happen.)
We need to distinguish collision with a pre-existing segment from invalid size
request in order to behave sensibly, so it's worth some extra code here to get
it right. Per report from Gavin Kistner and subsequent investigation.
Back-patch to all supported versions, since any of them could get used
with a kernel having the debatable behavior.
Tom Lane [Sat, 1 May 2010 21:31:17 +0000 (21:31 +0000)]
Install hack workaround for failure of 'make all' in VPATH builds.
It appears that gmake gets confused if postgres.sgml is not present in
the working directory, and instantiates some default rule or other that
would let postgres.sgml be built from postgres.xml. I haven't been able
to track down exactly where that's coming from, but the problem can be
dodged by specifying srcdir explicitly in the rule for postgres.xml.
Per report from Vladimir Kokovic.
Tom Lane [Sat, 1 May 2010 18:15:07 +0000 (18:15 +0000)]
Adjust postgres.xml rule so that make will notice a failure exit from osx.
The previous coding had it in a pipe, which on most shells won't report
the error. Per experimentation with a bug report from Vladimir Kokovic.
This doesn't actually fix his problem, but it does explain why make
didn't report that there was a problem.
Tom Lane [Sat, 1 May 2010 17:04:38 +0000 (17:04 +0000)]
Fix leakage of proc-related storage in plpython's inline handler.
Per report from Andres Freund.
Tom Lane [Fri, 30 Apr 2010 22:24:50 +0000 (22:24 +0000)]
Update our information about OS X shared memory configuration: it's now
possible to set most of the SHM kernel parameters without a reboot.
Also, reorder the paragraph to explain the modern configuration method first.
There are probably not too many people who still care about how to do it on
OS X 10.3 or older.
Tom Lane [Fri, 30 Apr 2010 19:49:06 +0000 (19:49 +0000)]
Improve COPY documentation to clarify that it doesn't copy data to or from
child tables. Per gripe from Jaime Casanova.
Tom Lane [Fri, 30 Apr 2010 19:15:45 +0000 (19:15 +0000)]
Fix multiple memory leaks in PLy_spi_execute_fetch_result: it would leak
memory if the result had zero rows, and also if there was any sort of error
while converting the result tuples into Python data. Reported and partially
fixed by Andres Freund.
Back-patch to all supported versions. Note: I haven't tested the 7.4 fix.
7.4's configure check for python is so obsolete it doesn't work on my
current machines :-(. The logic change is pretty straightforward though.
Tom Lane [Fri, 30 Apr 2010 17:09:13 +0000 (17:09 +0000)]
Fix a couple of places where the result of fgets() wasn't checked.
This is mostly to suppress compiler warnings, although in principle
the cases could result in undesirable behavior.
Martin Pitt
Heikki Linnakangas [Fri, 30 Apr 2010 06:34:29 +0000 (06:34 +0000)]
Fix handling of b-tree reuse WAL records when hot standby is disabled,
and add missing code in btree_desc for them. This fixes the bug
with "tree_redo: unknown op code 208" error reported by Jaime Casanova.
Marc G. Fournier [Fri, 30 Apr 2010 03:16:58 +0000 (03:16 +0000)]
tag for 9.0beta1
Bruce Momjian [Thu, 29 Apr 2010 22:03:41 +0000 (22:03 +0000)]
Documentation fix: CREATE TRIGGER 'WHERE' -> 'WHEN'
Selena Deckelmann
Tom Lane [Thu, 29 Apr 2010 21:49:03 +0000 (21:49 +0000)]
Adjust error checks in pg_start_backup and pg_stop_backup to make it possible
to perform a backup without archive_mode being enabled. This gives up some
user-error protection in order to improve usefulness for streaming-replication
scenarios. Per discussion.
Tom Lane [Thu, 29 Apr 2010 21:36:19 +0000 (21:36 +0000)]
Rename the parameter recovery_connections to hot_standby, to reduce possible
confusion with streaming-replication settings. Also, change its default
value to "off", because of concern about executing new and poorly-tested
code during ordinary non-replicating operation. Per discussion.
In passing do some minor editing of related documentation.
Bruce Momjian [Thu, 29 Apr 2010 21:02:50 +0000 (21:02 +0000)]
Doc fix -- last major item should not be a bullet.
Bruce Momjian [Thu, 29 Apr 2010 20:54:28 +0000 (20:54 +0000)]
Move alpha release notes into a separate file; re-align sgml tags.
Bruce Momjian [Thu, 29 Apr 2010 20:43:22 +0000 (20:43 +0000)]
Update 9.0 release notes to current; add major items and introductory
text.
Tom Lane [Thu, 29 Apr 2010 16:32:41 +0000 (16:32 +0000)]
Install a workaround for 'TeX capacity exceeded' problem
when building PDF output for recent versions of the documentation.
There is probably a better answer out there somewhere, but
we need something now so we can build beta releases.
Tom Lane [Wed, 28 Apr 2010 21:23:29 +0000 (21:23 +0000)]
Fix typo, per Thom Brown.
Tom Lane [Wed, 28 Apr 2010 21:18:07 +0000 (21:18 +0000)]
Modify information_schema._pg_keysequal() to avoid search path risk when
contrib/intarray is loaded. Per bug #5417 from Kenaniah Cerny.
Not forcing initdb since backend doesn't directly depend on this,
and few people have run into it.
Tom Lane [Wed, 28 Apr 2010 19:38:49 +0000 (19:38 +0000)]
Minor editorializing on pg_controldata and pg_resetxlog: adjust some message
wording, deal explicitly with some fields that were being silently left zero.
Tom Lane [Wed, 28 Apr 2010 17:35:35 +0000 (17:35 +0000)]
pg_controldata needs #define FRONTEND, same as pg_resetxlog.
Per buildfarm results from dawn_bat.
Tom Lane [Wed, 28 Apr 2010 16:54:16 +0000 (16:54 +0000)]
Modify ShmemInitStruct and ShmemInitHash to throw errors internally,
rather than returning NULL for some-but-not-all failures as they used to.
Remove now-redundant tests for NULL from call sites.
We had to do something about this because many call sites were failing to
check for NULL; and changing it like this seems a lot more useful and
mistake-proof than adding checks to the call sites without them.
Alvaro Herrera [Wed, 28 Apr 2010 16:48:21 +0000 (16:48 +0000)]
Make pg_stats example query result a bit less wide, and add comment about
pg_stats.inherited
Heikki Linnakangas [Wed, 28 Apr 2010 16:10:43 +0000 (16:10 +0000)]
Introduce wal_level GUC to explicitly control if information needed for
archival or hot standby should be WAL-logged, instead of deducing that from
other options like archive_mode. This replaces recovery_connections GUC in
the primary, where it now has no effect, but it's still used in the standby
to enable/disable hot standby.
Remove the WAL-logging of "unlogged operations", like creating an index
without WAL-logging and fsyncing it at the end. Instead, we keep a copy of
the wal_mode setting and the settings that affect how much shared memory a
hot standby server needs to track master transactions (max_connections,
max_prepared_xacts, max_locks_per_xact) in pg_control. Whenever the settings
change, at server restart, write a WAL record noting the new settings and
update pg_control. This allows us to notice the change in those settings in
the standby at the right moment, they used to be included in checkpoint
records, but that meant that a changed value was not reflected in the
standby until the first checkpoint after the change.
Bump PG_CONTROL_VERSION and XLOG_PAGE_MAGIC. Whack XLOG_PAGE_MAGIC back to
the sequence it used to follow, before hot standby and subsequent patches
changed it to 0x9003.
Tom Lane [Wed, 28 Apr 2010 15:07:59 +0000 (15:07 +0000)]
Fix contrib/tsearch2 expected results to match recent changes in URL parsing.
Magnus Hagander [Wed, 28 Apr 2010 13:46:23 +0000 (13:46 +0000)]
Fix typo that had the code check the same thing twice.
Fujii Masao
Heikki Linnakangas [Wed, 28 Apr 2010 07:34:11 +0000 (07:34 +0000)]
Add recovery.conf parameters to the documentation index, per suggestion
by Fujii Masao.