Commit Graph

10236 Commits

Author SHA1 Message Date
Bruce Momjian
0191e120e6 Document that the timestamp returned by pg_last_xact_replay_timestamp is
the time on the primary that the transaction was generated.
2011-03-18 19:18:08 -04:00
Bruce Momjian
a7136b7fa2 Document the all-balls IPv6 address. 2011-03-18 18:41:33 -04:00
Robert Haas
f94c6f9c0f Minor fixes for high availability documentation.
Erik Rijkers and me
2011-03-17 15:46:44 -04:00
Robert Haas
76dbb46153 Protocol documentation for Hot Standby feedback messages. 2011-03-17 15:10:55 -04:00
Robert Haas
84abea76f6 Add pause_at_recovery_target to recovery.conf.sample; improve docs.
Fujii Masao, but with the proposed behavior change reverted, and the
rest adjusted accordingly.
2011-03-17 14:04:11 -04:00
Robert Haas
9a56dc3389 Fix various possible problems with synchronous replication.
1. Don't ignore query cancel interrupts.  Instead, if the user asks to
cancel the query after we've already committed it, but before it's on
the standby, just emit a warning and let the COMMIT finish.

2. Don't ignore die interrupts (pg_terminate_backend or fast shutdown).
Instead, emit a warning message and close the connection without
acknowledging the commit.  Other backends will still see the effect of
the commit, but there's no getting around that; it's too late to abort
at this point, and ignoring die interrupts altogether doesn't seem like
a good idea.

3. If synchronous_standby_names becomes empty, wake up all backends
waiting for synchronous replication to complete.  Without this, someone
attempting to shut synchronous replication off could easily wedge the
entire system instead.

4. Avoid depending on the assumption that if a walsender updates
MyProc->syncRepState, we'll see the change even if we read it without
holding the lock.  The window for this appears to be quite narrow (and
probably doesn't exist at all on machines with strong memory ordering)
but protecting against it is practically free, so do that.

5. Remove useless state SYNC_REP_MUST_DISCONNECT, which isn't needed and
doesn't actually do anything.

There's still some further work needed here to make the behavior of fast
shutdown plausible, but that looks complex, so I'm leaving it for a
separate commit.  Review by Fujii Masao.
2011-03-17 13:12:21 -04:00
Bruce Momjian
e148443ddd Document guc context values, and reference them from the config doc section.
Tom Lane
2011-03-17 00:27:01 -04:00
Robert Haas
5f588e2005 Corrections to CREATE FOREIGN TABLE documentation.
Omit incorrect = sign, and properly document server_name parameter.

Shigeru Hanada
2011-03-16 08:13:02 -04:00
Bruce Momjian
a858ca19df Adjust doc wording about the casting exceptions for composite types. 2011-03-15 20:47:31 -04:00
Bruce Momjian
b774efa9d5 Fix spelling error in fuzzystrmatch docs. 2011-03-15 19:50:02 -04:00
Bruce Momjian
df4a9595c2 Wording adjustment for restart_after_crash entry
Specifically, mention that "restart" is disabled by this parameter.
2011-03-15 12:43:39 -04:00
Robert Haas
f0f3617135 Minor sync rep documentation improvements.
- Make the name of the ID tag for the GUC entry match the GUC name.
- Clarify that synchronous_replication waits for xlog flush, not receipt.
- Mention that synchronous_replication won't wait if max_wal_senders=0.
2011-03-15 11:25:04 -04:00
Bruce Momjian
94fe9c0f4e Use "backend process" rather than "backend server", where appropriate. 2011-03-12 09:38:56 -05:00
Bruce Momjian
7a8f43968a In docs, rename "backwards compatibility" to "backward compatibility"
for consistency.
2011-03-11 14:33:10 -05:00
Tom Lane
e3c732a85c Create an explicit concept of collations that work for any encoding.
Use collencoding = -1 to represent such a collation in pg_collation.
We need this to make the "default" entry work sanely, and a later
patch will fix the C/POSIX entries to be represented this way instead
of duplicating them across all encodings.  All lookup operations now
search first for an entry that's database-encoding-specific, and then
for the same name with collencoding = -1.

Also some incidental code cleanup in collationcmds.c and pg_collation.c.
2011-03-11 13:20:11 -05:00
Tom Lane
ac435a79c8 Remove duplicate indexterm to silence openjade wrning. 2011-03-11 11:41:51 -05:00
Bruce Momjian
4869d10afc Update documentation on FreeBSD write cache control. 2011-03-11 11:36:42 -05:00
Bruce Momjian
ffe92d15d5 Document that to_char('FM') removes only trailing zeros. 2011-03-11 10:48:30 -05:00
Bruce Momjian
a1bb5a480d Document how listen_addresses can do only IPv4 or IPv6. 2011-03-11 10:31:43 -05:00
Bruce Momjian
59bacbe147 Adds index entries for session_user and pg_describe_object
Removes extraneous closing parenthesis from pg_describe_object
Puts pg_describe_object and has_sequence_privilege in correct
alphabetical position in function listing

Thom Brown
2011-03-11 10:23:59 -05:00
Bruce Momjian
35a1964e55 In plpsql docs, use RAISE rather than undefined log function. 2011-03-11 08:47:44 -05:00
Bruce Momjian
cbd2811461 Improve extract(day) documentation with interval values. 2011-03-11 08:17:49 -05:00
Bruce Momjian
ea5c4c71f6 Fix "unparenthesized" mention in vacuum docs. 2011-03-11 07:57:53 -05:00
Bruce Momjian
3896138b7c Update kernel docs for Solaris 10.
Josh Berkus
2011-03-11 07:53:34 -05:00
Bruce Momjian
afaed3add8 Document that pg_dump --clean might generate some harmless errors on restore. 2011-03-11 07:05:38 -05:00
Bruce Momjian
06711de9d9 Document that libpq's PQgetResult() should be called after a fatal error
to fully process errors.
2011-03-11 05:55:13 -05:00
Bruce Momjian
ad44d50591 Document that the parenthesized VACUUM syntax is deprecated, not the
FREEZE functionality.
2011-03-11 05:34:09 -05:00
Bruce Momjian
26174d5fd0 Reference doc "examples" section for pg_dump options that often need
complex quoting, e.g. -t and -n.
2011-03-10 19:40:23 -05:00
Bruce Momjian
3aa6041db5 More wording improvements for disallowed SQL function commands. 2011-03-10 18:50:44 -05:00
Bruce Momjian
2fdd357cae Improve SQL function disallowed command wording. 2011-03-10 18:47:44 -05:00
Bruce Momjian
678a0d286c Clarify what commands are not allowed in SQL functions. 2011-03-10 18:46:21 -05:00
Tom Lane
7564654adf Revert addition of third argument to format_type().
Including collation in the behavior of that function promotes a world view
we do not want.  Moreover, it was producing the wrong behavior for pg_dump
anyway: what we want is to dump a COLLATE clause on attributes whose
attcollation is different from the underlying type, and likewise for
domains, and the function cannot do that for us.  Doing it the hard way
in pg_dump is a bit more tedious but produces more correct output.

In passing, fix initdb so that the initial entry in pg_collation is
properly pinned.  It was droppable before :-(
2011-03-10 17:30:46 -05:00
Robert Haas
1c3b434a08 Add missing index terms for recovery control functions.
Fujii Masao
2011-03-10 14:29:53 -05:00
Bruce Momjian
ed0327495c Use '=' when documenting long options. 2011-03-10 09:10:34 -05:00
Tom Lane
a051ef699c Remove collation information from TypeName, where it does not belong.
The initial collations patch treated a COLLATE spec as part of a TypeName,
following what can only be described as brain fade on the part of the SQL
committee.  It's a lot more reasonable to treat COLLATE as a syntactically
separate object, so that it can be added in only the productions where it
actually belongs, rather than needing to reject it in a boatload of places
where it doesn't belong (something the original patch mostly failed to do).
In addition this change lets us meet the spec's requirement to allow
COLLATE anywhere in the clauses of a ColumnDef, and it avoids unfriendly
behavior for constructs such as "foo::type COLLATE collation".

To do this, pull collation information out of TypeName and put it in
ColumnDef instead, thus reverting most of the collation-related changes in
parse_type.c's API.  I made one additional structural change, which was to
use a ColumnDef as an intermediate node in AT_AlterColumnType AlterTableCmd
nodes.  This provides enough room to get rid of the "transform" wart in
AlterTableCmd too, since the ColumnDef can carry the USING expression
easily enough.

Also fix some other minor bugs that have crept in in the same areas,
like failure to copy recently-added fields of ColumnDef in copyfuncs.c.

While at it, document the formerly secret ability to specify a collation
in ALTER TABLE ALTER COLUMN TYPE, ALTER TYPE ADD ATTRIBUTE, and
ALTER TYPE ALTER ATTRIBUTE TYPE; and correct some misstatements about
what the default collation selection will be when COLLATE is omitted.

BTW, the three-parameter form of format_type() should go away too,
since it just contributes to the confusion in this area; but I'll do
that in a separate patch.
2011-03-09 22:39:20 -05:00
Bruce Momjian
01752f7bba Document that server single-user mode does not do checkpoints or other
background processing.
2011-03-09 20:19:59 -05:00
Tom Lane
49a08ca1e9 Adjust the permissions required for COMMENT ON ROLE.
Formerly, any member of a role could change the role's comment, as of
course could superusers; but holders of CREATEROLE privilege could not,
unless they were also members.  This led to the odd situation that a
CREATEROLE holder could create a role but then could not comment on it.
It also seems a bit dubious to let an unprivileged user change his own
comment, let alone those of group roles he belongs to.  So, change the
rule to be "you must be superuser to comment on a superuser role, or
hold CREATEROLE to comment on non-superuser roles".  This is the same
as the privilege check for creating/dropping roles, and thus fits much
better with the rule for other object types, namely that only the owner
of an object can comment on it.

In passing, clean up the documentation for COMMENT a little bit.

Per complaint from Owen Jacobson and subsequent discussion.
2011-03-09 11:28:34 -05:00
Bruce Momjian
c290476cbd Remove '=' from initdb switch syntax. 2011-03-09 09:48:05 -05:00
Bruce Momjian
8cc55b1c0f Improve wording of initdb and pg_controldata manual pages.
gabrielle <gorthx@gmail.com>
2011-03-09 09:19:24 -05:00
Itagaki Takahiro
48ff3913d6 Remove 's' from recovery_target_timeline's' from the release note. 2011-03-09 20:00:11 +09:00
Itagaki Takahiro
1144726d07 synchronous_standby_names is a string parameter. 2011-03-09 19:49:16 +09:00
Robert Haas
26ed3fdb45 Make alpha release notes more consistent as regards periods. 2011-03-09 00:06:02 -05:00
Robert Haas
f14ae5f905 Update alpha release notes for latest commits. 2011-03-09 00:00:03 -05:00
Tom Lane
c0dc44ebba A bit more editing for collation documentation. 2011-03-08 22:50:38 -05:00
Robert Haas
51c0124481 Create "replication and recovery" section in alpha release notes. 2011-03-08 20:55:29 -05:00
Tom Lane
a612b17120 Assorted editing for collation documentation.
I made a pass over this to familiarize myself with the feature, and found
some things that could be improved.
2011-03-08 17:10:59 -05:00
Bruce Momjian
915cd10c16 Adjust CHAR() doc mention of pattern matching issues for trailing
spaces.
2011-03-08 12:54:00 -05:00
Bruce Momjian
7465ae06be Document that char() ignores spaces in non-pattern comparisons, not in
pattern comparisons such as LIKE and regex.
2011-03-08 11:03:40 -05:00
Tom Lane
cfcdc99db6 Improve description of inquiry functions that accept regclass.
Per a suggestion from Thom Brown, though this is not his proposed patch.
2011-03-07 16:21:26 -05:00
Tom Lane
f8c0af840d Minor copy-editing in CREATE TRIGGER reference page.
Per suggestions from Thom Brown and Robert Haas.
2011-03-07 16:00:36 -05:00