OSDN Git Service

pg-rex/syncrep.git
14 years agoFix typos, per Richard Huxton
Magnus Hagander [Thu, 25 Feb 2010 10:02:30 +0000 (10:02 +0000)]
Fix typos, per Richard Huxton

14 years agoClarify that the connection string for primary_conninfo is in the same
Heikki Linnakangas [Thu, 25 Feb 2010 09:32:19 +0000 (09:32 +0000)]
Clarify that the connection string for primary_conninfo is in the same
format as in PQconnectdb(). As pointed out by Thom Brown.

14 years agoFix typo.
Heikki Linnakangas [Thu, 25 Feb 2010 09:16:42 +0000 (09:16 +0000)]
Fix typo.

14 years agoSmall streaming replication document improvements. Be more explicit that
Heikki Linnakangas [Thu, 25 Feb 2010 08:57:47 +0000 (08:57 +0000)]
Small streaming replication document improvements. Be more explicit that
it's asynchronous.

14 years agoFix streaming replication starting at the very first WAL segment.
Heikki Linnakangas [Thu, 25 Feb 2010 07:31:40 +0000 (07:31 +0000)]
Fix streaming replication starting at the very first WAL segment.
Per complaint from Greg Stark.

14 years agoImprove warning about creating nested named subroutines in plperl.
Tom Lane [Thu, 25 Feb 2010 03:08:07 +0000 (03:08 +0000)]
Improve warning about creating nested named subroutines in plperl.
Per discussion.

14 years agoMake pg_stop_backup's reporting a bit more verbose in hopes of making
Tom Lane [Thu, 25 Feb 2010 02:17:50 +0000 (02:17 +0000)]
Make pg_stop_backup's reporting a bit more verbose in hopes of making
error cases less intimidating for novices.  Per discussion.

Greg Smith

14 years agoAllow zero-dimensional (ie, empty) arrays in contrib/ltree operations.
Tom Lane [Wed, 24 Feb 2010 18:02:24 +0000 (18:02 +0000)]
Allow zero-dimensional (ie, empty) arrays in contrib/ltree operations.

The main motivation for changing this is bug #4921, in which it's pointed out
that it's no longer safe to apply ltree operations to the result of
ARRAY(SELECT ...) if the sub-select might return no rows.  Before 8.3,
the ARRAY() construct would return NULL, which might or might not be helpful
but at least it wouldn't result in an error.  Now it returns an empty array
which results in a failure for no good reason, since the ltree operations
are all perfectly capable of dealing with zero-element arrays.

As far as I can find, these ltree functions are the only places where zero
array dimensionality is rejected unnecessarily.

Back-patch to 8.3 to prevent behavioral regression of queries that worked
in older releases.

14 years agoDocument that pg_restore -t can use -n for its schema qualification.
Bruce Momjian [Wed, 24 Feb 2010 16:27:40 +0000 (16:27 +0000)]
Document that pg_restore -t can use -n for its schema qualification.

14 years agoRevert removal of pre-7.4 documenation behavior mentions.
Bruce Momjian [Wed, 24 Feb 2010 15:54:31 +0000 (15:54 +0000)]
Revert removal of pre-7.4 documenation behavior mentions.

14 years agoRemove stray semicolon, per report from strk
Alvaro Herrera [Wed, 24 Feb 2010 14:10:24 +0000 (14:10 +0000)]
Remove stray semicolon, per report from strk

14 years agoRemove useless codes to initialize TupleDesc from dblink_exec.
Itagaki Takahiro [Wed, 24 Feb 2010 05:20:49 +0000 (05:20 +0000)]
Remove useless codes to initialize TupleDesc from dblink_exec.

14 years agoRemove pre-7.4 documentaiton mentions, now that 8.0 is the oldest
Bruce Momjian [Wed, 24 Feb 2010 03:33:49 +0000 (03:33 +0000)]
Remove pre-7.4 documentaiton mentions, now that 8.0 is the oldest
supported release.

14 years agoFix patch for printing backend and pg_dump versions so that it works in
Tom Lane [Wed, 24 Feb 2010 02:42:55 +0000 (02:42 +0000)]
Fix patch for printing backend and pg_dump versions so that it works in
a desirable fashion in archive-dump cases, ie you should get the pg_dump
version not the pg_restore version.

14 years agoUn-break pg_dump for the case of zero-column tables.
Tom Lane [Wed, 24 Feb 2010 02:15:58 +0000 (02:15 +0000)]
Un-break pg_dump for the case of zero-column tables.

This was evidently broken by the CREATE TABLE OF TYPE patch.  It would have
been noticed if anyone had bothered to try dumping and restoring the
regression database ...

14 years agoUse CREATE OR REPLACE LANGUAGE in pg_dump to avoid the need for a couple of
Tom Lane [Wed, 24 Feb 2010 01:57:16 +0000 (01:57 +0000)]
Use CREATE OR REPLACE LANGUAGE in pg_dump to avoid the need for a couple of
significantly uglier kluges that were working around the change in plpgsql's
preinstalled status.

14 years agoMake pg_regress use CREATE OR REPLACE LANGUAGE, so that --load-language
Tom Lane [Wed, 24 Feb 2010 01:35:14 +0000 (01:35 +0000)]
Make pg_regress use CREATE OR REPLACE LANGUAGE, so that --load-language
will work whether or not the specified language is preinstalled.  This
responds to some complaints about having to change test scripts because
plpgsql is preinstalled as of 9.0.

14 years agoAdd an OR REPLACE option to CREATE LANGUAGE.
Tom Lane [Tue, 23 Feb 2010 22:51:43 +0000 (22:51 +0000)]
Add an OR REPLACE option to CREATE LANGUAGE.

This operates in the same way as other CREATE OR REPLACE commands, ie,
it replaces everything but the ownership and ACL lists of an existing
entry, and requires the caller to have owner privileges for that entry.

While modifying an existing language has some use in development scenarios,
in typical usage all the "replaced" values come from pg_pltemplate so there
will be no actual change in the language definition.  The reason for adding
this is mainly to allow programs to ensure that a language exists without
triggering an error if it already does exist.

This commit just adds and documents the new option.  A followon patch
will use it to clean up some unpleasant cases in pg_dump and pg_regress.

14 years agoModify freebsd start script to just exit 0 with message.
Bruce Momjian [Tue, 23 Feb 2010 22:17:25 +0000 (22:17 +0000)]
Modify freebsd start script to just exit 0 with message.

14 years agoUpdate startup scripts for Linux and FreeBSD.
Bruce Momjian [Tue, 23 Feb 2010 22:15:35 +0000 (22:15 +0000)]
Update startup scripts for Linux and FreeBSD.

Kevin Grittner

14 years agoHave pg_dump (-v) verbose mode output the pg_dump and server versions in
Bruce Momjian [Tue, 23 Feb 2010 21:48:32 +0000 (21:48 +0000)]
Have pg_dump (-v) verbose mode output the pg_dump and server versions in
text output mode, like we do in custom output mode.

Jim Cox

14 years agoRevert recent COPY manual change about encoding; add mention of "server".
Bruce Momjian [Tue, 23 Feb 2010 21:38:35 +0000 (21:38 +0000)]
Revert recent COPY manual change about encoding; add mention of "server".

14 years agoFix configure's regexp for extracting the Perl version number from perl -v
Tom Lane [Tue, 23 Feb 2010 18:35:07 +0000 (18:35 +0000)]
Fix configure's regexp for extracting the Perl version number from perl -v
output.  Per bug #5339, Perl 5.11 has changed the format of that output
enough to break the previous coding.

Alex Hunsaker

14 years agoClarify statements about tar archive format.
Tom Lane [Tue, 23 Feb 2010 17:28:09 +0000 (17:28 +0000)]
Clarify statements about tar archive format.

14 years agoMinor style policing for error messages in pg_dump tar code. Notably, change
Tom Lane [Tue, 23 Feb 2010 16:55:22 +0000 (16:55 +0000)]
Minor style policing for error messages in pg_dump tar code.  Notably, change
"dumping data out of order is not supported" to "restoring data out of order
is not supported", because you get that error during pg_restore not pg_dump.
Also fix some comments that didn't look so good after being pgindented as
perhaps they did originally.

14 years agoRevert recent change of to_char('HH12') handling for intervals; instead
Bruce Momjian [Tue, 23 Feb 2010 16:14:26 +0000 (16:14 +0000)]
Revert recent change of to_char('HH12') handling for intervals;  instead
improve documentation, and add C comment.

14 years agoSecondary patch to fix interval to_char() for "HH" where hours >= 12.
Bruce Momjian [Tue, 23 Feb 2010 06:29:01 +0000 (06:29 +0000)]
Secondary patch to fix interval to_char() for "HH" where hours >= 12.

14 years agoSome platforms reject fsync() on files opened O_RDONLY.
Tom Lane [Tue, 23 Feb 2010 05:44:55 +0000 (05:44 +0000)]
Some platforms reject fsync() on files opened O_RDONLY.

14 years agoMake documentation more direct about the handling of COPY files based on
Bruce Momjian [Tue, 23 Feb 2010 05:17:33 +0000 (05:17 +0000)]
Make documentation more direct about the handling of COPY files based on
the client encoding.

14 years agoDocument that expression indexes that call functions allow function-level
Bruce Momjian [Tue, 23 Feb 2010 02:47:27 +0000 (02:47 +0000)]
Document that expression indexes that call functions allow function-level
statistics.

14 years agoSupress convertion of zero hours to '12' for intervals when using
Bruce Momjian [Tue, 23 Feb 2010 01:42:19 +0000 (01:42 +0000)]
Supress convertion of zero hours to '12' for intervals when using
to_char with HH, e.g.

to_char(interval '0d 0h 12m 44s', 'DD HH24 MI SS');

now returns:

 00 00 12 44

not:

 00 12 12 44

14 years agoUpdate pg_restore documentation to show new pg_restore custom listing
Bruce Momjian [Tue, 23 Feb 2010 00:21:19 +0000 (00:21 +0000)]
Update pg_restore documentation to show new pg_restore custom listing
format.

Pavel Golub

14 years agoRemove long-commented-out paragraph in documentation about function
Bruce Momjian [Mon, 22 Feb 2010 23:51:40 +0000 (23:51 +0000)]
Remove long-commented-out paragraph in documentation about function
inheritance in create table, per Andrew Dunstan.

14 years agoDocument that pg_ctl cares about the PGHOST environment variable.
Bruce Momjian [Mon, 22 Feb 2010 22:30:10 +0000 (22:30 +0000)]
Document that pg_ctl cares about the PGHOST environment variable.

14 years agoRevert configure warning to use "official distribution".
Bruce Momjian [Mon, 22 Feb 2010 21:16:50 +0000 (21:16 +0000)]
Revert configure warning to use "official distribution".

14 years agoRemove protocol documentation paragraph about environment variable
Bruce Momjian [Mon, 22 Feb 2010 18:12:04 +0000 (18:12 +0000)]
Remove protocol documentation paragraph about environment variable
passing being "covered elsewhere", per Dave Page.

14 years agoUse the term "bundled distribution" instead of "official distribution" in
Bruce Momjian [Mon, 22 Feb 2010 18:02:06 +0000 (18:02 +0000)]
Use the term "bundled distribution" instead of "official distribution" in
configure warnings.

14 years agoBriefly document in two places that pg_dump and pg_dumpall cannot be
Bruce Momjian [Mon, 22 Feb 2010 17:15:10 +0000 (17:15 +0000)]
Briefly document in two places that pg_dump and pg_dumpall cannot be
used for continuous archiving.

14 years agoLet's try forcing errno to zero before issuing fsync. The current buildfarm
Tom Lane [Mon, 22 Feb 2010 15:29:46 +0000 (15:29 +0000)]
Let's try forcing errno to zero before issuing fsync.  The current buildfarm
results claiming EBADF seem improbable enough that I'm not convinced fsync
is really returning that --- could it be failing to set errno at all?

14 years agoAdjust pg_fsync_writethrough so that it will set errno when failing
Tom Lane [Mon, 22 Feb 2010 15:26:14 +0000 (15:26 +0000)]
Adjust pg_fsync_writethrough so that it will set errno when failing
on a platform that doesn't support this operation.  The former coding
would allow an unrelated errno to be reported, which would be quite
misleading.  Not sure if this has anything to do with the current
buildfarm failures, but it's certainly bogus as-is.

14 years agoMove documentation of all recovery.conf option to a new chapter.
Heikki Linnakangas [Mon, 22 Feb 2010 11:47:30 +0000 (11:47 +0000)]
Move documentation of all recovery.conf option to a new chapter.
They used to be scattered between the "backup and restore" and "streaming
replication" chapters.

14 years agoFix multiple copy and paste-o's. No wonder this code didn't work.
Tom Lane [Mon, 22 Feb 2010 02:50:10 +0000 (02:50 +0000)]
Fix multiple copy and paste-o's.  No wonder this code didn't work.

14 years agoOops, don't forget to rewind the directory before scanning it to fsync files in CREAT...
Greg Stark [Mon, 22 Feb 2010 00:11:05 +0000 (00:11 +0000)]
Oops, don't forget to rewind the directory before scanning it to fsync files in CREATE DATABASE

14 years agoAdjust sample auto-explain output to reflect query text inclusion.
Andrew Dunstan [Sat, 20 Feb 2010 22:24:29 +0000 (22:24 +0000)]
Adjust sample auto-explain output to reflect query text inclusion.

14 years agoClean up handling of XactReadOnly and RecoveryInProgress checks.
Tom Lane [Sat, 20 Feb 2010 21:24:02 +0000 (21:24 +0000)]
Clean up handling of XactReadOnly and RecoveryInProgress checks.

Add some checks that seem logically necessary, in particular let's make
real sure that HS slave sessions cannot create temp tables.  (If they did
they would think that temp tables belonging to the master's session with
the same BackendId were theirs.  We *must* not allow myTempNamespace to
become set in a slave session.)

Change setval() and nextval() so that they are only allowed on temp sequences
in a read-only transaction.  This seems consistent with what we allow for
table modifications in read-only transactions.  Since an HS slave can't have a
temp sequence, this also provides a nicer cure for the setval PANIC reported
by Erik Rijkers.

Make the error messages more uniform, and have them mention the specific
command being complained of.  This seems worth the trifling amount of extra
code, since people are likely to see such messages a lot more than before.

14 years agoMake 'include_realm' ordering consistent in the docs, to match recent
Bruce Momjian [Sat, 20 Feb 2010 21:04:28 +0000 (21:04 +0000)]
Make 'include_realm' ordering consistent in the docs, to match recent
doc change.

14 years agoClarify documentation about username mapping when authenticating with
Bruce Momjian [Sat, 20 Feb 2010 19:21:14 +0000 (19:21 +0000)]
Clarify documentation about username mapping when authenticating with
GSSAPI or Kerberos.

Ian Turner

14 years agoDocument that many solid-state drives have volatile write-back caches.
Bruce Momjian [Sat, 20 Feb 2010 18:28:37 +0000 (18:28 +0000)]
Document that many solid-state drives have volatile write-back caches.

14 years agoCopy editing of Hot Standby docs. Some clarifications, addition
Simon Riggs [Sat, 20 Feb 2010 10:07:27 +0000 (10:07 +0000)]
Copy editing of Hot Standby docs. Some clarifications, addition
of missing items and minor edits.

14 years agoReduce the rescan cost estimate for Materialize nodes to cpu_operator_cost per
Tom Lane [Fri, 19 Feb 2010 21:49:10 +0000 (21:49 +0000)]
Reduce the rescan cost estimate for Materialize nodes to cpu_operator_cost per
tuple, instead of the former cpu_tuple_cost.  It is sane to charge less than
cpu_tuple_cost because Materialize never does any qual-checking or projection,
so it's got less overhead than most plan node types.  In particular, we want
to have the same charge here as is charged for readout in cost_sort.  That
avoids the problem recently exhibited by Teodor wherein the planner prefers
a useless sort over a materialize step in a context where a lot of rescanning
will happen.  The rescan costs should be just about the same for both node
types, so make their estimates the same.

Not back-patching because all of the current logic for rescan cost estimates
is new in 9.0.  The old handling of rescans is sufficiently not-sane that
changing this in that structure is a bit pointless, and might indeed cause
regressions.

14 years agoRevert version stamping in wrong branch
Peter Eisentraut [Fri, 19 Feb 2010 18:42:30 +0000 (18:42 +0000)]
Revert version stamping in wrong branch

14 years agoVersion stamp 9.0alpha4
Peter Eisentraut [Fri, 19 Feb 2010 16:03:22 +0000 (16:03 +0000)]
Version stamp 9.0alpha4

14 years agoDocument --version and --help options for all client applications (they
Bruce Momjian [Fri, 19 Feb 2010 14:36:45 +0000 (14:36 +0000)]
Document --version and --help options for all client applications (they
all support it).

Per report from Josh Kupershmidt

14 years agoSmall corrections to message output targets in pg_ctl
Peter Eisentraut [Fri, 19 Feb 2010 14:12:19 +0000 (14:12 +0000)]
Small corrections to message output targets in pg_ctl

- The message "server stopped" should be affected by the -s option, just
  like "server started" already was.

- The message "could not start server" should consistently go to stderr.

14 years agoDon't use O_DIRECT when writing WAL files if archiving or streaming is
Heikki Linnakangas [Fri, 19 Feb 2010 10:51:04 +0000 (10:51 +0000)]
Don't use O_DIRECT when writing WAL files if archiving or streaming is
enabled. Bypassing the kernel cache is counter-productive in that case,
because the archiver/walsender process will read from the WAL file
soon after it's written, and if it's not cached the read will cause
a physical read, eating I/O bandwidth available on the WAL drive.

Also, walreceiver process does unaligned writes, so disable O_DIRECT
in walreceiver process for that reason too.

14 years agoForbid setval() during recovery. This prevents the PANIC reported by
Heikki Linnakangas [Fri, 19 Feb 2010 06:29:19 +0000 (06:29 +0000)]
Forbid setval() during recovery. This prevents the PANIC reported  by
Erik Rijkers. Patch by Andres Freund.

14 years agoFirst pass over client applications documentation proofreading.
Bruce Momjian [Fri, 19 Feb 2010 03:50:03 +0000 (03:50 +0000)]
First pass over client applications documentation proofreading.

gabrielle

14 years agoRemove mention that binary distributions pre-compile the tutorial files.
Bruce Momjian [Fri, 19 Feb 2010 01:15:54 +0000 (01:15 +0000)]
Remove mention that binary distributions pre-compile the tutorial files.

14 years agoFix STOP WAL LOCATION in backup history files no to return the next
Itagaki Takahiro [Fri, 19 Feb 2010 01:04:03 +0000 (01:04 +0000)]
Fix STOP WAL LOCATION in backup history files no to return the next
segment of XLOG_BACKUP_END record even if the the record is placed
at a segment boundary. Furthermore the previous implementation could
return nonexistent segment file name when the boundary is in segments
that has "FE" suffix; We never use segments with "FF" suffix.

Backpatch to 8.0, where hot backup was introduced.

Reported by Fujii Masao.

14 years agoTranslation updates for 9.0alpha4
Peter Eisentraut [Fri, 19 Feb 2010 00:40:05 +0000 (00:40 +0000)]
Translation updates for 9.0alpha4

14 years agoPreliminary release notes for 9.0alpha4
Peter Eisentraut [Fri, 19 Feb 2010 00:35:18 +0000 (00:35 +0000)]
Preliminary release notes for 9.0alpha4

14 years agoHot Standby documentation updates
Bruce Momjian [Fri, 19 Feb 2010 00:15:25 +0000 (00:15 +0000)]
Hot Standby documentation updates

Greg Smith

14 years agoVolatile-ize all five places where we expect a PG_TRY block to restore
Tom Lane [Thu, 18 Feb 2010 23:50:06 +0000 (23:50 +0000)]
Volatile-ize all five places where we expect a PG_TRY block to restore
old memory context in plpython.  Before only one of them was marked
volatile, but per report from Zdenek Kotala, some compilers do the
wrong thing here.

14 years agoProvide some rather hokey ways for EXPLAIN to print FieldStore and assignment
Tom Lane [Thu, 18 Feb 2010 22:43:31 +0000 (22:43 +0000)]
Provide some rather hokey ways for EXPLAIN to print FieldStore and assignment
ArrayRef expressions that are not in the immediate context of an INSERT or
UPDATE targetlist.  Such cases never arise in stored rules, so ruleutils.c
hadn't tried to handle them.  However, they do occur in the targetlists of
plans derived from such statements, and now that EXPLAIN VERBOSE tries to
print targetlists, we need some way to deal with the case.

I chose to represent an assignment ArrayRef as "array[subscripts] := source",
which is fairly reasonable and doesn't omit any information.  However,
FieldStore is problematic because the planner will fold multiple assignments
to fields of the same composite column into one FieldStore, resulting in a
structure that is hard to understand at all, let alone display comprehensibly.
So in that case I punted and just made it print the source expression(s).

Backpatch to 8.4 --- the lack of functionality exists in older releases,
but doesn't seem to be important for lack of anything that would call it.

14 years agoFix ExecEvalArrayRef to pass down the old value of the array element or slice
Tom Lane [Thu, 18 Feb 2010 18:41:47 +0000 (18:41 +0000)]
Fix ExecEvalArrayRef to pass down the old value of the array element or slice
being assigned to, in case the expression to be assigned is a FieldStore that
would need to modify that value.  The need for this was foreseen some time
ago, but not implemented then because we did not have arrays of composites.
Now we do, but the point evidently got overlooked in that patch.  Net result
is that updating a field of an array element doesn't work right, as
illustrated if you try the new regression test on an unpatched backend.
Noted while experimenting with EXPLAIN VERBOSE, which has also got some issues
in this area.

Backpatch to 8.3, where arrays of composites were introduced.

14 years agoFix pq_getbyte_if_available() function. It was confused on what it
Heikki Linnakangas [Thu, 18 Feb 2010 11:13:46 +0000 (11:13 +0000)]
Fix pq_getbyte_if_available() function. It was confused on what it
returns if no data is immediately available. Patch by me with numerous
fixes from Fujii Masao and Magnus Hagander.

14 years agodate_recv should accept infinities.
Itagaki Takahiro [Thu, 18 Feb 2010 04:31:16 +0000 (04:31 +0000)]
date_recv should accept infinities.

Reported by James William Pye.

14 years agoAdd missing close tag.
Bruce Momjian [Thu, 18 Feb 2010 04:14:38 +0000 (04:14 +0000)]
Add missing close tag.

14 years agoWordsmithing of HS and SR documentation, with some wording improvements
Bruce Momjian [Thu, 18 Feb 2010 03:16:09 +0000 (03:16 +0000)]
Wordsmithing of HS and SR documentation, with some wording improvements
from Erik Rijkers too.

14 years agoForce READY portals into FAILED state when a transaction or subtransaction
Tom Lane [Thu, 18 Feb 2010 03:06:46 +0000 (03:06 +0000)]
Force READY portals into FAILED state when a transaction or subtransaction
is aborted, if they were created within the failed xact.  This prevents
ExecutorEnd from being run on them, which is a good idea because they may
contain references to tables or other objects that no longer exist.
In particular this is hazardous when auto_explain is active, but it's
really rather surprising that nobody has seen an issue with this before.
I'm back-patching this to 8.4, since that's the first version that contains
auto_explain or an ExecutorEnd hook, but I wonder whether we shouldn't
back-patch further.

14 years agoFix up pg_dump's treatment of large object ownership and ACLs. We now emit
Tom Lane [Thu, 18 Feb 2010 01:29:10 +0000 (01:29 +0000)]
Fix up pg_dump's treatment of large object ownership and ACLs.  We now emit
a separate archive entry for each BLOB, and use pg_dump's standard methods
for dealing with its ownership, ACL if any, and comment if any.  This means
that switches like --no-owner and --no-privileges do what they're supposed
to.  Preliminary testing says that performance is still reasonable even
with many blobs, though we'll have to see how that shakes out in the field.

KaiGai Kohei, revised by me

14 years agoTake care to reprocess an uncommitted notify message.
Tom Lane [Wed, 17 Feb 2010 16:54:06 +0000 (16:54 +0000)]
Take care to reprocess an uncommitted notify message.

Oversight in my changes to cope with possible errors during message
processing; spotted by Joachim Wieland.

14 years agoAnother typo fix.
Magnus Hagander [Wed, 17 Feb 2010 05:51:40 +0000 (05:51 +0000)]
Another typo fix.

Thom Brown

14 years agoUse a fatal warning check with what looks like a more portable error message. Error...
Andrew Dunstan [Wed, 17 Feb 2010 05:32:48 +0000 (05:32 +0000)]
Use a fatal warning check with what looks like a more portable error message. Error noticed by Tom and buildfarm member kite.

14 years agoStamp HEAD as 9.0devel, and update various places that were referring to 8.5
Tom Lane [Wed, 17 Feb 2010 04:19:41 +0000 (04:19 +0000)]
Stamp HEAD as 9.0devel, and update various places that were referring to 8.5
(hope I got 'em all).  Per discussion, this release will be 9.0 not 8.5.

14 years agoSupport new syntax and improve handling of parentheses in psql tab-completion.
Itagaki Takahiro [Wed, 17 Feb 2010 04:09:40 +0000 (04:09 +0000)]
Support new syntax and improve handling of parentheses in psql tab-completion.

Newly supported syntax are:
  - ALTER {TABLE|INDEX|TABLESPACE} {SET|RESET} with options
  - ALTER TABLE ALTER COLUMN {SET|RESET} with options
  - ALTER TABLE ALTER COLUMN SET STORAGE
  - CREATE INDEX CONCURRENTLY
  - CREATE INDEX ON (without name)
  - CREATE INDEX ... USING with pg_am.amname instead of hard-corded names
  - CREATE TRIGGER with events
  - DROP AGGREGATE function with arguments

14 years agoWhen updating ShmemVariableCache from a checkpoint record, be sure to set
Tom Lane [Wed, 17 Feb 2010 03:10:33 +0000 (03:10 +0000)]
When updating ShmemVariableCache from a checkpoint record, be sure to set
all the values derived from oldestXid, not just that field.  Brain fade in
one of my patches associated with flat file removal, exposed by a report
from Fujii Masao.

With this change, xidVacLimit should always be valid, so remove a couple of
bits of complexity associated with the previous assumption that sometimes
it wouldn't get set right away.

14 years agoPrevent #option dump from crashing on FORI statement with null step. Reported by...
Tom Lane [Wed, 17 Feb 2010 01:48:45 +0000 (01:48 +0000)]
Prevent #option dump from crashing on FORI statement with null step.  Reported by Pavel.

14 years agolog_error_verbosity is now LOGGING_WHAT category.
Tom Lane [Wed, 17 Feb 2010 01:39:35 +0000 (01:39 +0000)]
log_error_verbosity is now LOGGING_WHAT category.

14 years agoTweak description of payload parameter.
Tom Lane [Wed, 17 Feb 2010 00:57:06 +0000 (00:57 +0000)]
Tweak description of payload parameter.

14 years agoMake NOTIFY_PAYLOAD_MAX_LENGTH depend explicitly on BLCKSZ and
Tom Lane [Wed, 17 Feb 2010 00:52:09 +0000 (00:52 +0000)]
Make NOTIFY_PAYLOAD_MAX_LENGTH depend explicitly on BLCKSZ and
NAMEDATALEN, so this code doesn't go nuts with smaller than default
BLCKSZ or larger than default NAMEDATALEN.  The standard value is
still exactly 8000.

14 years agoReplace the pg_listener-based LISTEN/NOTIFY mechanism with an in-memory queue.
Tom Lane [Tue, 16 Feb 2010 22:34:57 +0000 (22:34 +0000)]
Replace the pg_listener-based LISTEN/NOTIFY mechanism with an in-memory queue.
In addition, add support for a "payload" string to be passed along with
each notify event.

This implementation should be significantly more efficient than the old one,
and is also more compatible with Hot Standby usage.  There is not yet any
facility for HS slaves to receive notifications generated on the master,
although such a thing is possible in future.

Joachim Wieland, reviewed by Jeff Davis; also hacked on by me.

14 years agoAdd query text to auto_explain output.
Andrew Dunstan [Tue, 16 Feb 2010 22:19:59 +0000 (22:19 +0000)]
Add query text to auto_explain output.

Still to be done: fix docs and fix regression failures under auto_explain.

14 years agoClean up package namespace use and use of Safe in plperl.
Andrew Dunstan [Tue, 16 Feb 2010 21:39:52 +0000 (21:39 +0000)]
Clean up package namespace use and use of Safe in plperl.
Prevent use of another buggy version of Safe.pm.
Only register the exit handler if we have  successfully created an interpreter.
Change log level of perl warnings from NOTICE to WARNING.

The infrastructure is there if in future we decide to allow
DBAs to specify extra modules that will be allowed in trusted code.
However, for now the relevant variables are declared as lexicals
rather than as package variables, so that they are not (or should not be)
accessible.

Mostly code from Tim Bunce, reviewed by Alex Hunsaker, with some
tweaks by me.

14 years agoMove log_error_verbosity GUC setting to "What to log" section, and
Bruce Momjian [Tue, 16 Feb 2010 21:35:51 +0000 (21:35 +0000)]
Move log_error_verbosity GUC setting to "What to log" section, and
document the behavior of terse and verbose output options.

14 years agoHonor to_char() "FM" specification in YYY, YY, and Y; it was already
Bruce Momjian [Tue, 16 Feb 2010 21:18:02 +0000 (21:18 +0000)]
Honor to_char() "FM" specification in YYY, YY, and Y;  it was already
honored by YYYY.  Also document Oracle "toggle" FM behavior.

Per report from Guy Rouillier

14 years agoPrevent psql version banner from being printed by the \c command if the
Bruce Momjian [Tue, 16 Feb 2010 21:07:01 +0000 (21:07 +0000)]
Prevent psql version banner from being printed by the \c command if the
versions match, per report from Peter.

14 years agoHave SELECT and CREATE TABLE AS queries return a row count. While this
Bruce Momjian [Tue, 16 Feb 2010 20:58:14 +0000 (20:58 +0000)]
Have SELECT and CREATE TABLE AS queries return a row count.  While this
is invisible in psql, other interfaces, like libpq, make this value
visible.

Boszormenyi Zoltan

14 years agoRemove personal copyright now that file has been rewritten using
Bruce Momjian [Tue, 16 Feb 2010 20:35:07 +0000 (20:35 +0000)]
Remove personal copyright now that file has been rewritten using
existing *.pl conversion script.

Andreas 'ads' Scherbaum

14 years agoClarify documentation on the behavior of unnamed bind queries.
Bruce Momjian [Tue, 16 Feb 2010 20:15:14 +0000 (20:15 +0000)]
Clarify documentation on the behavior of unnamed bind queries.

14 years agorevert to showing buffer counts in explain (buffers)
Greg Stark [Tue, 16 Feb 2010 20:07:13 +0000 (20:07 +0000)]
revert to showing buffer counts in explain (buffers)

14 years agoAdd emulation of non-blocking sockets to the win32 socket/signal layer,
Magnus Hagander [Tue, 16 Feb 2010 19:26:02 +0000 (19:26 +0000)]
Add emulation of non-blocking sockets to the win32 socket/signal layer,
and use this in pq_getbyte_if_available.

It's only a limited implementation which swithes the whole emulation layer
no non-blocking mode, but that's enough as long as non-blocking is only
used during a short period of time, and only one socket is accessed during
this time.

14 years agoDo not check nan values for infinity. Some system are not able to handle this.
Michael Meskes [Tue, 16 Feb 2010 18:41:23 +0000 (18:41 +0000)]
Do not check nan values for infinity. Some system are not able to handle this.

By Zoltán Böszörményi

14 years agoFix synopsis of DO statement.
Itagaki Takahiro [Tue, 16 Feb 2010 00:49:42 +0000 (00:49 +0000)]
Fix synopsis of DO statement.

14 years agoMove main error message text in plperl into errmsg from errdetail,
Alvaro Herrera [Mon, 15 Feb 2010 22:23:25 +0000 (22:23 +0000)]
Move main error message text in plperl into errmsg from errdetail,
and move the context information into errcontext instead of errmsg.
This makes them better conform to our guidelines.

Also remove a few errcode declarations that were providing the default
value ERRCODE_INTERNAL_ERROR.

14 years agoWhen sorting functions in pg_dump, break ties (same name) by number of arguments
Peter Eisentraut [Mon, 15 Feb 2010 19:59:47 +0000 (19:59 +0000)]
When sorting functions in pg_dump, break ties (same name) by number of arguments

14 years agoFix another stupid typo...
Magnus Hagander [Mon, 15 Feb 2010 17:10:50 +0000 (17:10 +0000)]
Fix another stupid typo...

Jan Urbanski

14 years agoFix typo in comment
Alvaro Herrera [Mon, 15 Feb 2010 16:10:34 +0000 (16:10 +0000)]
Fix typo in comment

14 years agoTemporarily disable fsyncing the database directory in CREATE DATABASE
Greg Stark [Mon, 15 Feb 2010 11:40:49 +0000 (11:40 +0000)]
Temporarily disable fsyncing the database directory in CREATE DATABASE
until we can work out portability issues the build farm uncovered.

In passing avoid fsyncing subdirectories twice.

14 years agoremove an unused variable 'dirfd'.
Itagaki Takahiro [Mon, 15 Feb 2010 04:05:06 +0000 (04:05 +0000)]
remove an unused variable 'dirfd'.