Commit Graph

29709 Commits

Author SHA1 Message Date
Heikki Linnakangas 3229db2d42 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.
2010-02-22 11:47:30 +00:00
Tom Lane 9738beb3d0 Fix multiple copy and paste-o's. No wonder this code didn't work. 2010-02-22 02:50:10 +00:00
Greg Stark b21121cd3d Oops, don't forget to rewind the directory before scanning it to fsync files in CREATE DATABASE 2010-02-22 00:11:05 +00:00
Andrew Dunstan f90a4c5df5 Adjust sample auto-explain output to reflect query text inclusion. 2010-02-20 22:24:29 +00:00
Tom Lane 05d8a561ff 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.
2010-02-20 21:24:02 +00:00
Bruce Momjian fada4204b9 Make 'include_realm' ordering consistent in the docs, to match recent
doc change.
2010-02-20 21:04:28 +00:00
Bruce Momjian 786e2f6871 Clarify documentation about username mapping when authenticating with
GSSAPI or Kerberos.

Ian Turner
2010-02-20 19:21:14 +00:00
Bruce Momjian de9ec65431 Document that many solid-state drives have volatile write-back caches. 2010-02-20 18:28:37 +00:00
Simon Riggs 7363021df3 Copy editing of Hot Standby docs. Some clarifications, addition
of missing items and minor edits.
2010-02-20 10:07:27 +00:00
Tom Lane 3f56ca1d49 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.
2010-02-19 21:49:10 +00:00
Peter Eisentraut 2f6cf9192c Revert version stamping in wrong branch 2010-02-19 18:42:30 +00:00
Peter Eisentraut a779afb40c Version stamp 9.0alpha4 2010-02-19 16:03:22 +00:00
Bruce Momjian f8f0140d73 Document --version and --help options for all client applications (they
all support it).

Per report from Josh Kupershmidt
2010-02-19 14:36:45 +00:00
Peter Eisentraut 4c6c6b52d2 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.
2010-02-19 14:12:19 +00:00
Heikki Linnakangas ad458cfe81 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.
2010-02-19 10:51:04 +00:00
Heikki Linnakangas 94f610b163 Forbid setval() during recovery. This prevents the PANIC reported by
Erik Rijkers. Patch by Andres Freund.
2010-02-19 06:29:19 +00:00
Bruce Momjian 2f6b4560af First pass over client applications documentation proofreading.
gabrielle
2010-02-19 03:50:03 +00:00
Bruce Momjian 4e3a616355 Remove mention that binary distributions pre-compile the tutorial files. 2010-02-19 01:15:54 +00:00
Itagaki Takahiro 3230fd056a 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.
2010-02-19 01:04:03 +00:00
Peter Eisentraut a39f02e369 Translation updates for 9.0alpha4 2010-02-19 00:40:05 +00:00
Peter Eisentraut 1222296768 Preliminary release notes for 9.0alpha4 2010-02-19 00:35:18 +00:00
Bruce Momjian a70d039104 Hot Standby documentation updates
Greg Smith
2010-02-19 00:15:25 +00:00
Tom Lane a232f30f05 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.
2010-02-18 23:50:06 +00:00
Tom Lane 858d1699f2 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.
2010-02-18 22:43:31 +00:00
Tom Lane 11d5ba97f8 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.
2010-02-18 18:41:47 +00:00
Heikki Linnakangas 3e87ba6ef7 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.
2010-02-18 11:13:46 +00:00
Itagaki Takahiro 1a1ad6320c date_recv should accept infinities.
Reported by James William Pye.
2010-02-18 04:31:16 +00:00
Bruce Momjian 9529f4d532 Add missing close tag. 2010-02-18 04:14:38 +00:00
Bruce Momjian 1bee1a3725 Wordsmithing of HS and SR documentation, with some wording improvements
from Erik Rijkers too.
2010-02-18 03:16:09 +00:00
Tom Lane 7981c34279 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.
2010-02-18 03:06:46 +00:00
Tom Lane c0d5be5d6a 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
2010-02-18 01:29:10 +00:00
Tom Lane 2b44d74dd4 Take care to reprocess an uncommitted notify message.
Oversight in my changes to cope with possible errors during message
processing; spotted by Joachim Wieland.
2010-02-17 16:54:06 +00:00
Magnus Hagander 075d43a01a Another typo fix.
Thom Brown
2010-02-17 05:51:40 +00:00
Andrew Dunstan 8823bc2e2b Use a fatal warning check with what looks like a more portable error message. Error noticed by Tom and buildfarm member kite. 2010-02-17 05:32:48 +00:00
Tom Lane 50a90fac40 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.
2010-02-17 04:19:41 +00:00
Itagaki Takahiro 37ec19a15c 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
2010-02-17 04:09:40 +00:00
Tom Lane c64339face 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.
2010-02-17 03:10:33 +00:00
Tom Lane 711804fddd Prevent #option dump from crashing on FORI statement with null step. Reported by Pavel. 2010-02-17 01:48:45 +00:00
Tom Lane 9cbcfca44a log_error_verbosity is now LOGGING_WHAT category. 2010-02-17 01:39:35 +00:00
Tom Lane 750ff8bdf7 Tweak description of payload parameter. 2010-02-17 00:57:06 +00:00
Tom Lane ee678fe30c 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.
2010-02-17 00:52:09 +00:00
Tom Lane d1e027221d 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.
2010-02-16 22:34:57 +00:00
Andrew Dunstan fc5173ad51 Add query text to auto_explain output.
Still to be done: fix docs and fix regression failures under auto_explain.
2010-02-16 22:19:59 +00:00
Andrew Dunstan 56adf3703c 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.
2010-02-16 21:39:52 +00:00
Bruce Momjian 813135d8c9 Move log_error_verbosity GUC setting to "What to log" section, and
document the behavior of terse and verbose output options.
2010-02-16 21:35:51 +00:00
Bruce Momjian 70d8a2c29e 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
2010-02-16 21:18:02 +00:00
Bruce Momjian 55ea144a14 Prevent psql version banner from being printed by the \c command if the
versions match, per report from Peter.
2010-02-16 21:07:01 +00:00
Bruce Momjian aa7e7ae9a6 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
2010-02-16 20:58:14 +00:00
Bruce Momjian 346a721eed Remove personal copyright now that file has been rewritten using
existing *.pl conversion script.

Andreas 'ads' Scherbaum
2010-02-16 20:35:07 +00:00
Bruce Momjian 93a57c3b57 Clarify documentation on the behavior of unnamed bind queries. 2010-02-16 20:15:14 +00:00