Commit Graph

500 Commits

Author SHA1 Message Date
Tom Lane da6c4f6ca8 Refer to OS X as "macOS", except for the port name which is still "darwin".
We weren't terribly consistent about whether to call Apple's OS "OS X"
or "Mac OS X", and the former is probably confusing to people who aren't
Apple users.  Now that Apple has rebranded it "macOS", follow their lead
to establish a consistent naming pattern.  Also, avoid the use of the
ancient project name "Darwin", except as the port code name which does not
seem desirable to change.  (In short, this patch touches documentation and
comments, but no actual code.)

I didn't touch contrib/start-scripts/osx/, either.  I suspect those are
obsolete and due for a rewrite, anyway.

I dithered about whether to apply this edit to old release notes, but
those were responsible for quite a lot of the inconsistencies, so I ended
up changing them too.  Anyway, Apple's being ahistorical about this,
so why shouldn't we be?
2016-09-25 15:40:57 -04:00
Bruce Momjian f2e016f8d5 doc: fix typo in recent patch
Reported-by: Jeff Janes

Backpatch-through: 9.6
2016-08-22 17:21:12 -04:00
Bruce Momjian 5285c5e873 doc: requirepeer is a way to avoid spoofing
We already mentioned unix_socket_directories as an option.

Reported-by: https://www.postgresql.org/message-id/45016837-6cf3-3136-f959-763d06a28076%402ndquadrant.com

Backpatch-through: 9.6
2016-08-18 21:41:56 -04:00
Peter Eisentraut f0fe1c8f70 Fix typos
From: Alexander Law <exclusion@gmail.com>
2016-08-16 14:52:29 -04:00
Tom Lane ca9112a424 Stamp HEAD as 10devel.
This is a good bit more complicated than the average new-version stamping
commit, because it includes various adjustments in pursuit of changing
from three-part to two-part version numbers.  It's likely some further
work will be needed around that change; but this is enough to get through
the regression tests, at least in Unix builds.

Peter Eisentraut and Tom Lane
2016-08-15 13:49:49 -04:00
Bruce Momjian 5ebad9a580 docs: re-add spaces before units removed
This reverts the spaces before k/M/G/TB units removed for consistency in
commit ca0c37b56f.

Discussion: 20160802165116.GC32575@momjian.us
2016-08-05 14:36:17 -04:00
Bruce Momjian a253a88594 doc: OS collation changes can break indexes
Discussion: 20160702155517.GD18610@momjian.us

Reviewed-by: Christoph Berg

Backpatch-through: 9.1
2016-08-02 17:13:10 -04:00
Bruce Momjian ca0c37b56f docs: properly capitalize and space kB, MB, GB, TB 2016-07-30 12:27:39 -04:00
Tom Lane 745513c702 Clarify usage of clientcert authentication option.
For some reason this option wasn't discussed at all in client-auth.sgml.
Document it there, and be more explicit about its relationship to the
"cert" authentication method.  Per gripe from Srikanth Venkatesh.

I failed to resist the temptation to do some minor wordsmithing in the
same area, too.

Discussion: <20160713110357.1410.30407@wrigleys.postgresql.org>
2016-07-16 14:12:44 -04:00
Stephen Frost 42ec6c2da6 Add missing hyphen
Pointed out by Alexander Law
2016-07-13 09:17:35 -04:00
Bruce Momjian b54f7a9ac9 doc: mention dependency on collation libraries
Document that index storage is dependent on the operating system's
collation library ordering, and any change in that ordering can create
invalid indexes.

Discussion: 20160617154311.GB19359@momjian.us

Backpatch-through: 9.1
2016-07-02 11:22:36 -04:00
Peter Eisentraut 9a83564c58 Allow SSL server key file to have group read access if owned by root
We used to require the server key file to have permissions 0600 or less
for best security.  But some systems (such as Debian) have certificate
and key files managed by the operating system that can be shared with
other services.  In those cases, the "postgres" user is made a member of
a special group that has access to those files, and the server key file
has permissions 0640.  To accommodate that kind of setup, also allow the
key file to have permissions 0640 but only if owned by root.

From: Christoph Berg <myon@debian.org>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
2016-03-19 11:03:22 +01:00
Fujii Masao 597f7e3a6e Correct the formulas for System V IPC parameters SEMMNI and SEMMNS in docs.
In runtime.sgml, the old formulas for calculating the reasonable
values of SEMMNI and SEMMNS were incorrect. They have forgotten to
count the number of semaphores which both the checkpointer process
(introduced in 9.2) and the background worker processes (introduced
in 9.3) need.

This commit fixes those formulas so that they count the number of
semaphores which the checkpointer process and the background worker
processes need.

Report and patch by Kyotaro Horiguchi. Only the patch for 9.3 was
modified by me. Back-patch to 9.2 where the checkpointer process was
added and the number of needed semaphores was increased.

Author: Kyotaro Horiguchi
Reviewed-by: Fujii Masao
Backpatch: 9.2
Discussion: http://www.postgresql.org/message-id/20160203.125119.66820697.horiguchi.kyotaro@lab.ntt.co.jp
2016-02-16 14:49:47 +09:00
Peter Eisentraut 7d17e683fc Add support for systemd service notifications
Insert sd_notify() calls at server start and stop for integration with
systemd.  This allows the use of systemd service units of type "notify",
which greatly simplifies the systemd configuration.

Reviewed-by: Pavel Stěhule <pavel.stehule@gmail.com>
2016-02-02 21:04:29 -05:00
Peter Eisentraut 253de19b84 doc: Remove redundant duplicate URLs from ulink elements
Empty ulink elements default to displaying the URL, so there is no need
to specify the URL again.  This was already done for most occurrences,
but some cases didn't follow this convention.
2015-12-31 22:26:57 -05:00
Peter Eisentraut 805ac78aab doc: Add index entries and better documentation link for Linux OOM 2015-12-31 22:03:13 -05:00
Tom Lane 8c72a7fab4 Update our documentation concerning where to create data directories.
Although initdb has long discouraged use of a filesystem mount-point
directory as a PG data directory, this point was covered nowhere in the
user-facing documentation.  Also, with the popularity of pg_upgrade,
we really need to recommend that the PG user own not only the data
directory but its parent directory too.  (Without a writable parent
directory, operations such as "mv data data.old" fail immediately.
pg_upgrade itself doesn't do that, but wrapper scripts for it often do.)

Hence, adjust the "Creating a Database Cluster" section to address
these points.  I also took the liberty of wordsmithing the discussion
of NFS a bit.

These considerations aren't by any means new, so back-patch to all
supported branches.
2015-07-28 18:43:30 -04:00
Tom Lane 7f32dbcd73 Fix broken link in documentation.
HP's web server has apparently become case-sensitive sometime recently.
Per bug #13479 from Daniel Abraham.  Corrected link identified by Alvaro.
2015-06-30 18:47:32 -04:00
Tom Lane 48913db887 In immediate shutdown, postmaster should not exit till children are gone.
This adjusts commit 82233ce7ea so that the
postmaster does not exit until all its child processes have exited, even
if the 5-second timeout elapses and we have to send SIGKILL.  There is no
great value in having the postmaster process quit sooner, and doing so can
mislead onlookers into thinking that the cluster is fully terminated when
actually some child processes still survive.

This effect might explain recent test failures on buildfarm member hamster,
wherein we failed to restart a cluster just after shutting it down with
"pg_ctl stop -m immediate".

I also did a bit of code review/beautification, including fixing a faulty
use of the Max() macro on a volatile expression.

Back-patch to 9.4.  In older branches, the postmaster never waited for
children to exit during immediate shutdowns, and changing that would be
too much of a behavioral change.
2015-06-19 14:23:39 -04:00
Bruce Momjian ebd33f27ab doc: mention more changes needed to use huge pages
Report by Laurence Parry
2014-10-13 17:23:36 -04:00
Peter Eisentraut 220bb39dee doc: Reflect renaming of Mac OS X to OS X
bug #10528
2014-09-09 13:56:29 -04:00
Bruce Momjian bf1c866597 upgrade docs: highlight pg_upgrade, warn about globals preservation
Also, remove OID preservation mention, mention non-text dump formats

Backpatch through 9.4
2014-08-25 15:34:55 -04:00
Tom Lane 5ff5bfb5f0 Update SysV parameter configuration documentation for FreeBSD.
FreeBSD hasn't made any use of kern.ipc.semmap since 1.1, and newer
releases reject attempts to set it altogether; so stop recommending
that it be adjusted.  Per bug #11161.

Back-patch to all supported branches.  Before 9.3, also incorporate
commit 7a42dff47, which touches the same text and for some reason
was not back-patched at the time.
2014-08-14 16:06:16 -04:00
Peter Eisentraut aa68872561 doc: Spell checking 2014-07-16 22:48:11 -04:00
Tom Lane df8b7bc9ff Improve our mechanism for controlling the Linux out-of-memory killer.
Arrange for postmaster child processes to respond to two environment
variables, PG_OOM_ADJUST_FILE and PG_OOM_ADJUST_VALUE, to determine whether
they reset their OOM score adjustments and if so to what.  This is superior
to the previous design involving #ifdef's in several ways.  The behavior is
now available in a default build, and both ends of the adjustment --- the
original adjustment of the postmaster's level and the subsequent
readjustment by child processes --- can now be controlled in one place,
namely the postmaster launch script.  So it's no longer necessary for the
launch script to act on faith that the server was compiled with the
appropriate options.  In addition, if someone wants to use an OOM score
other than zero for the child processes, that doesn't take a recompile
anymore; and we no longer have to cater separately to the two different
historical kernel APIs for this adjustment.

Gurjeet Singh, somewhat revised by me
2014-06-18 20:12:51 -04:00
Peter Eisentraut 3a9d430af5 doc: Fix DocBook XML validity
The main problem is that DocBook SGML allows indexterm elements just
about everywhere, but DocBook XML is stricter.  For example, this common
pattern

    <varlistentry>
     <indexterm>...</indexterm>
     <term>...</term>
     ...
    </varlistentry>

needs to be changed to something like

    <varlistentry>
     <term>...<indexterm>...</indexterm></term>
     ...
    </varlistentry>

See also bb4eefe7bf.

There is currently nothing in the build system that enforces that things
stay valid, because that requires additional tools and will receive
separate consideration.
2014-05-06 21:28:58 -04:00
Heikki Linnakangas f8ce16d0d2 Rename huge_tlb_pages to huge_pages, and improve docs.
Christian Kruse
2014-03-03 20:52:48 +02:00
Bruce Momjian 8fe3d90d34 docs: update partition encryption options
Text from Adam Vande More
2013-12-06 09:47:39 -05:00
Bruce Momjian fa4add50c4 docs: clarify SSL certificate authority chain docs
Previously, the requirements of how intermediate certificates were
handled and their chain to root certificates was unclear.
2013-12-06 09:42:08 -05:00
Robert Haas 9d323bda2e docs: Clarify that we also support Solaris versions greater than 10.
MauMau
2013-09-03 11:16:37 -04:00
Alvaro Herrera 82233ce7ea Send SIGKILL to children if they don't die quickly in immediate shutdown
On immediate shutdown, or during a restart-after-crash sequence,
postmaster used to send SIGQUIT (and then abandon ship if shutdown); but
this is not a good strategy if backends don't die because of that
signal.  (This might happen, for example, if a backend gets tangled
trying to malloc() due to gettext(), as in an example illustrated by
MauMau.)  This causes problems when later trying to restart the server,
because some processes are still attached to the shared memory segment.

Instead of just abandoning such backends to their fates, we now have
postmaster hang around for a little while longer, send a SIGKILL after
some reasonable waiting period, and then exit.  This makes immediate
shutdown more reliable.

There is disagreement on whether it's best for postmaster to exit after
sending SIGKILL, or to stick around until all children have reported
death.  If this controversy is resolved differently than what this patch
implements, it's an easy change to make.

Bug reported by MauMau in message 20DAEA8949EC4E2289C6E8E58560DEC0@maumau

MauMau and Álvaro Herrera
2013-06-28 17:49:46 -04:00
Tom Lane d0d75c4022 Add postgres_fdw contrib module.
There's still a lot of room for improvement, but it basically works,
and we need this to be present before we can do anything much with the
writable-foreign-tables patch.  So let's commit it and get on with testing.

Shigeru Hanada, reviewed by KaiGai Kohei and Tom Lane
2013-02-21 05:27:16 -05:00
Tom Lane 7d8cbeb0c3 Fix examples of how to use "su" while starting the server.
The syntax "su -c 'command' username" is not accepted by all versions of
su, for example not OpenBSD's.  More portable is "su username -c
'command'".  So change runtime.sgml to recommend that syntax.  Also,
add a -D switch to the OpenBSD example script, for consistency with other
examples.  Per Denis Lapshin and Gábor Hidvégi.
2012-09-25 13:52:53 -04:00
Robert Haas 35738b5906 Document how to prevent PostgreSQL itself from exhausting memory.
The existing documentation in Linux Memory Overcommit seemed to
assume that PostgreSQL itself could never be the problem, or at
least it didn't tell you what to do about it.

Per discussion with Craig Ringer and Kevin Grittner.
2012-08-30 14:24:07 -04:00
Bruce Momjian 7a42dff47e Update FreeBSD kernel configuration documentation.
Brad Davis
2012-08-26 23:21:57 -04:00
Tom Lane c9b0cbe98b Support having multiple Unix-domain sockets per postmaster.
Replace unix_socket_directory with unix_socket_directories, which is a list
of socket directories, and adjust postmaster's code to allow zero or more
Unix-domain sockets to be created.

This is mostly a straightforward change, but since the Unix sockets ought
to be created after the TCP/IP sockets for safety reasons (better chance
of detecting a port number conflict), AddToDataDirLockFile needs to be
fixed to support out-of-order updates of data directory lockfile lines.
That's a change that had been foreseen to be necessary someday anyway.

Honza Horak, reviewed and revised by Tom Lane
2012-08-10 17:27:15 -04:00
Robert Haas 390bfc643d Documentation cleanups for recent shared memory changes. 2012-07-04 15:56:12 -04:00
Tom Lane 93f4d7f806 Support Linux's oom_score_adj API as well as the older oom_adj API.
The simplest way to handle this is just to copy-and-paste the relevant
code block in fork_process.c, so that's what I did. (It's possible that
something more complicated would be useful to packagers who want to work
with either the old or the new API; but at this point the number of such
people is rapidly approaching zero, so let's just get the minimal thing
done.)  Update relevant documentation as well.
2012-06-13 15:35:52 -04:00
Bruce Momjian ebcaa5fcde Remove BSD/OS (BSDi) port. There are no known users upgrading to
Postgres 9.2, and perhaps no existing users either.
2012-05-03 10:58:44 -04:00
Peter Eisentraut a445cb92ef Add parameters for controlling locations of server-side SSL files
This allows changing the location of the files that were previously
hard-coded to server.crt, server.key, root.crt, root.crl.

server.crt and server.key continue to be the default settings and are
thus required to be present by default if SSL is enabled.  But the
settings for the server-side CA and CRL are now empty by default, and
if they are set, the files are required to be present.  This replaces
the previous behavior of ignoring the functionality if the files were
not found.
2012-02-22 23:40:46 +02:00
Tom Lane bc9306f4c5 Update information about configuring SysV IPC parameters on NetBSD.
Per Emmanuel Kasper, sysctl works fine as of NetBSD 5.0.
2011-11-30 20:55:00 -05:00
Peter Eisentraut 6477d66780 -DLINUX_OOM_ADJ=0 should be in CPPFLAGS, not CFLAGS 2011-11-08 06:49:50 +02:00
Magnus Hagander d8ea33f2c0 Support configurable eventlog application names on Windows
This allows different instances to use the eventlog with different
identifiers, by setting the event_source GUC, similar to how
syslog_ident works.

Original patch by MauMau, heavily modified by Magnus Hagander
2011-10-25 20:02:55 +02:00
Bruce Momjian d764835bbc Properly document semphore requirements by accounting for worker
processes.

Backpatch to 9.1 and 9.0.

Submitted by Anton Yuzhaninov, confirmed by Robert Haas
2011-09-06 11:08:32 -04:00
Peter Eisentraut 1368409034 MacOS -> Mac OS
Josh Kupershmidt
2011-08-17 10:05:22 +03:00
Peter Eisentraut a99d45b805 Small update on suggested startup file locations
Debian/Ubuntu don't have a /etc/rc.d/ directory, so add some
alternative names as suggestions.
2011-07-14 19:07:39 +03:00
Peter Eisentraut c13dc6402b Spell checking and markup refinement 2011-05-19 01:14:45 +03:00
Peter Eisentraut a3b681f0bc Link some tables into the surrounding text by their id 2011-05-04 20:24:07 +03:00
Tom Lane dca30da343 Avoid extra whitespace in the arguments of <indexterm>.
As noted by Thom Brown, this confuses the DocBook index processor; it
fails to merge entries that differ only in whitespace, and sorts them
unexpectedly as well.  Seems like a toolchain bug, but I'm not going to
hold my breath waiting for a fix.

Note: easiest way to find these is to look for double spaces in HTML.index.
2011-04-08 11:36:05 -04:00
Magnus Hagander 6f9192df61 Rename ident authentication over local connections to peer
This removes an overloading of two authentication options where
one is very secure (peer) and one is often insecure (ident). Peer
is also the name used in libpq from 9.1 to specify the same type
of authentication.

Also make initdb select peer for local connections when ident is
chosen, and ident for TCP connections when peer is chosen.

ident keyword in pg_hba.conf is still accepted and maps to peer
authentication.
2011-03-19 18:44:35 +01:00