Commit Graph

112 Commits

Author SHA1 Message Date
Bruce Momjian 630cd14426 Add initdb --sync-only option to sync the data directory to durable
storage.

Have pg_upgrade use it, and enable server options fsync=off and
full_page_writes=off.

Document that users turning fsync from off to on should run initdb
--sync-only.

[ Previous commit was incorrectly applied as a git merge. ]
2012-12-03 22:47:59 -05:00
Bruce Momjian 25d1ed04a2 Revert initdb --sync-only patch that had incorrect commit messages. 2012-12-03 22:46:51 -05:00
Bruce Momjian cd7569a546 dummy commit 2012-12-03 22:45:02 -05:00
Tom Lane b966dd6c42 Add fsync capability to initdb, and use sync_file_range() if available.
Historically we have not worried about fsync'ing anything during initdb
(in fact, initdb intentionally passes -F to each backend launch to prevent
it from fsync'ing).  But with filesystems getting more aggressive about
caching data, that's not such a good plan anymore.  Make initdb do a pass
over the finished data directory tree to fsync everything.  For testing
purposes, the -N/--nosync flag can be used to restore the old behavior.

Also, testing shows that on Linux, sync_file_range() is much faster than
posix_fadvise() for hinting to the kernel that an fsync is coming,
apparently because the latter blocks on a rather small request queue while
the former doesn't.  So use this function if available in initdb, and also
in the backend's pg_flush_data() (where it currently will affect only the
speed of CREATE DATABASE's cloning step).

We will later make pg_regress invoke initdb with the --nosync flag
to avoid slowing down cases such as "make check" in contrib.  But
let's not do so until we've shaken out any portability issues in this
patch.

Jeff Davis, reviewed by Andres Freund
2012-07-13 17:16:58 -04:00
Peter Eisentraut bb7520cc26 Make documentation of --help and --version options more consistent
Before, some places didn't document the short options (-? and -V),
some documented both, some documented nothing, and they were listed in
various orders.  Now this is hopefully more consistent and complete.
2012-06-18 02:46:59 +03:00
Peter Eisentraut fe2534e534 Some reference page improvements
initdb: Add -T option
oid2name: Put options in some non-random order
pg_dump: Put --section option in the right place

And some additional markup and terminology improvements.
2012-05-20 01:15:55 +03:00
Peter Eisentraut 1715ff1128 doc: Fix for too many brackets in command synopses on man pages
The default for the choice attribute of the <arg> element is "opt",
which would normally put the argument inside brackets.  But the DSSSL
stylesheets contain a hack that treats <arg> directly inside <group>
specially, so that <group><arg>-x</arg><arg>-y</arg></group> comes out
as [ -x | -y ] rather than [ [-x] | [-y] ], which it would technically
be.  But when building man pages, this doesn't work, and so the
command synopses on the man pages contain lots of extra brackets.

By putting choice="opt" or choice="plain" explicitly on every <arg>
and <group> element, we avoid any toolchain dependencies like that,
and it also makes it clearer in the source code what is meant.

In passing, make some small corrections in the documentation about
which arguments are really optional or not.
2012-05-03 22:58:00 +03:00
Peter Eisentraut 4266509c57 Improve markup of cmdsynopsis elements
Add more markup in particular so that the command options appear
consistently in monospace in the HTML output.

On the vacuumdb reference page, remove listing all the possible
options in the synopsis.  They have become too many now; we have the
detailed options list for that.
2012-04-30 21:18:03 +03:00
Bruce Momjian 9a39583264 Remove tabs in SGML files 2012-03-12 10:13:42 -04:00
Tatsuo Ishii da9e73a137 Add description for --no-locale and --text-search-config. 2012-03-11 19:16:15 +09:00
Peter Eisentraut 8a02339e9b initdb: Add options --auth-local and --auth-host
reviewed by Robert Haas and Pavel Stehule
2012-02-01 21:18:55 +02: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
Peter Eisentraut fc946c39ae Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Peter Eisentraut 6dcce3985b Remove unnecessary xref endterm attributes and title ids
The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
2010-04-03 07:23:02 +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 a37b001b80 Add init[db] option to pg_ctl
pg_ctl gets a new mode that runs initdb.  Adjust the documentation a bit to
not assume that initdb is the only way to run database cluster initialization.
But don't replace initdb as the canonical way.

Author: Zdenek Kotala <Zdenek.Kotala@Sun.COM>
2009-12-10 06:32:28 +00:00
Heikki Linnakangas 61d9674988 Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
ctype are now more like encoding, stored in new datcollate and datctype
columns in pg_database.

This is a stripped-down version of Radek Strnad's patch, with further
changes by me.
2008-09-23 09:20:39 +00:00
Tom Lane b581b85406 Fix seriously broken markup for libpq-envars cross-references. 2007-03-26 17:23:37 +00:00
Bruce Momjian 7c656baf15 Remove tabs from SGML reference files, so their addition can be detected
in the future.
2007-02-21 23:21:12 +00:00
Bruce Momjian 571df93cff More clearly document that most PostgreSQL utilities support libpq
environment variables.  Backpatch to 8.2.X.
2007-02-20 18:10:59 +00:00
Bruce Momjian 8b4ff8b6a1 Wording cleanup for error messages. Also change can't -> cannot.
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
2007-02-01 19:10:30 +00:00
Bruce Momjian e81c138e18 Update reference documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
2007-01-31 23:26:05 +00:00
Bruce Momjian c3578a68f8 Allow initdb to specify the pg_xlog directory.
Euler Taveira de Oliveira
2007-01-06 19:40:00 +00:00
Bruce Momjian 32cebaecff Remove emacs info from footer of SGML files. 2006-09-16 00:30:20 +00:00
Peter Eisentraut 5266f221a2 Merge postmaster and postgres command into just postgres. postmaster
symlink is kept for now for compatibility.  To call single-user mode, use
postgres --single.
2006-06-18 15:38:37 +00:00
Tom Lane 6f7fc0bade Cause initdb to create a third standard database "postgres", which
unlike template0 and template1 does not have any special status in
terms of backend functionality.  However, all external utilities such
as createuser and createdb now connect to "postgres" instead of
template1, and the documentation is changed to encourage people to use
"postgres" instead of template1 as a play area.  This should fix some
longstanding gotchas involving unexpected propagation of database
objects by createdb (when you used template1 without understanding
the implications), as well as ameliorating the problem that CREATE
DATABASE is unhappy if anyone else is connected to template1.
Patch by Dave Page, minor editing by Tom Lane.  All per recent
pghackers discussions.
2005-06-21 04:02:34 +00:00
Bruce Momjian 78bb800bc2 Update initdb locale/encoding documentation description. Backpatch to
8.0.X.
2005-02-22 02:54:19 +00:00
Bruce Momjian 246be304a5 Add mention of performance impact on LIKE of non-C locales. 2005-01-04 00:05:45 +00:00
Bruce Momjian ca9540d34f Add docs for initdb --auth. 2004-08-01 06:19:26 +00:00
Peter Eisentraut a837ed88b1 Detect locale/encoding mismatch in initdb, or pick a suitable encoding
automatically if none was specified.
2004-07-14 17:55:10 +00:00
Tom Lane 1b80b6da6a Add --pwfile option to initdb, so that passwords can be set by GUI tools
that aren't able to feed the password to initdb's /dev/tty.

Magnus Hagander
2004-06-24 19:26:59 +00:00
Neil Conway fd4f3b3b62 Improve the locale and character set docs, add some <xref>s pointing
to the character set docs where appropriate, and improve the postmaster
reference page. Character set cross-refs suggested by Gavin Kistner.
2004-03-23 02:47:35 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Peter Eisentraut c326d8f4f2 Add/edit index entries. 2003-08-31 17:32:24 +00:00
Peter Eisentraut 5e5c5cd31a Merge documentation into one book. (Build with "make html".) Replace
vague cross-references with real links.
2003-03-25 16:15:44 +00:00
Peter Eisentraut d258ba01ec Another big editing pass for consistent content and presentation. 2003-03-24 14:32:51 +00:00
Bruce Momjian be2b660ecd This patch includes a lot of minor cleanups to the SGML documentation,
including:

- replacing all the appropriate usages of <citetitle>PostgreSQL
...</citetitle> with &cite-user;, &cite-admin;, and so on

- fix an omission in the EXECUTE documentation

- add some more text to the EXPLAIN documentation

- improve the PL/PgSQL RETURN NEXT documentation (more work to do here)

- minor markup fixes


Neil Conway
2003-01-19 00:13:31 +00:00
Peter Eisentraut c086590380 Assorted reference page updates 2002-10-11 23:03:48 +00:00
Peter Eisentraut bc49968764 Add more appropriate markup. 2002-09-21 18:32:54 +00:00
Thomas G. Lockhart c05f29e895 Augment the date/time examples in the User's Guide to reflect the newer
capabilities of specifying time zones as intervals per SQL9x.
Put refentrytitle contents on the same line as the tag.
 Otherwise, leading whitespace is propagated into the product, which
 (at least) messes up the ToC layout.
Remove (some) docinfo tags containing dates. Best to omit if the dates
 are not accurate; maybe use CVS dates instead or leave them out.
2002-04-21 19:02:39 +00:00
Peter Eisentraut 867901db9e Locale support is on by default. The choice of locale is done in initdb
and/or with GUC variables.
2002-04-03 05:39:33 +00:00
Thomas G. Lockhart 03a321d214 Use PostgreSQL consistantly throughout docs. Before, usage was split evenly
between Postgres and PostgreSQL.
2001-12-08 03:24:40 +00:00
Peter Eisentraut 651a639b8b proof-reading 2001-11-28 20:49:10 +00:00
Peter Eisentraut c0d4d5473a Make the world somewhat safe for (not from) DELETE FROM pg_shadow;
Assign the fixed user id 1 to the user created by initdb.
A stand-alone backend will always set the user id to 1.
(Consequently, the name of that user is no longer important.)

In stand-alone mode, the user id 1 will have implicit superuser
status, to allow repairs even if there are no users defined.

Print a warning message when starting in stand-alone mode when no
users are defined.

Disallow dropping the current user and session user.

Granting/revoking superuser status also grants/revokes usecatupd.
(Previously, it would never grant it back.  This could lead to "deadlocks".)

CREATE USER and CREATE GROUP will start allocating user ids at 100
(unless explicitly specified), to prevent accidental creation of a
superuser (plus some room for future extensions).
2001-09-08 15:24:00 +00:00
Peter Eisentraut 89a1ea4207 Put some kind of grammatical uniformity in the <refpurpose> lines. 2001-09-03 12:57:50 +00:00
Tom Lane a2405d5554 Get rid of initdb -t bugs by the simple expedient of getting rid of
initdb -t.  This option is obsoleted by 7.1's ability to drop and
recreate template1 during normal operation.
2001-01-20 22:09:24 +00:00
Peter Eisentraut dccfd74935 Refine some things to create better looking man pages. 2000-12-25 23:15:27 +00:00
Peter Eisentraut d55f878193 Markup enhancements, some factual corrections. 2000-11-11 23:01:45 +00:00
Bruce Momjian b32685a999 Add proofreader's changes to docs.
Fix misspelling of disbursion to dispersion.
2000-10-05 19:48:34 +00:00
Thomas G. Lockhart 45f79cae14 Fixups in content and markup for 7.0 release. 2000-05-02 20:02:03 +00:00
Thomas G. Lockhart 39f69bc38f Start updating for the v7.0 release.
Use "generic functions" for math and other routines.
Use SQL92 "type 'literal'" syntax rather than Postgres "'literal'::type".
2000-03-27 17:14:43 +00:00
Peter Eisentraut 13f8875017 Added new pg_id to fix initdb problems
New INSTALL file
Fixed a copyright notice
2000-01-20 21:51:09 +00:00
Peter Eisentraut 28125ed5e0 Updated user interfaces on initdb, initlocation, pg_dump, ipcclean to a GNU-compliant'ish state.
Made ipcclean work on Linux.
2000-01-18 00:03:37 +00:00
Peter Eisentraut 2a1bfbce24 - Allow array on int8
- Prevent permissions on indexes
- Instituted --enable-multibyte option and tweaked the MB build process where necessary
- initdb prompts for superuser password
2000-01-15 18:30:35 +00:00
Bruce Momjian 83bad7c063 This is my -- hopefully sufficiently portable -- attempt at cleaning out
initdb. No more obscure dependencies on environment variables or paths.
It
now finds the templates and the right postgres itself (with cmd line
options as fallback). It also no longer depends on $USER (su safe), and
doesn't advertise that --username allows you to install the db as a
different user, since that doesn't work anyway. Also, recovery and
cleanup
on all errors. Consistent options, clearer documentation.

Please take a look at this and adopt it if you feel it's safe enough. I
have simulated all the stupid circumstances I could think of, but you
never know with shell scripts.

Oh yeah, you can give the postgres user a default password now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-17 01:05:31 +00:00
Thomas G. Lockhart a27512e634 Complete merge of all old man page information.
ecpg reference page still needs formatting.
1999-07-22 15:09:15 +00:00
Thomas G. Lockhart a4ac2f458e Fix markup for docbook2man man page generation.
No big deal; fixed lots of other markup at the same time.
Bigest change: make sure there is no whitespace
 in front of <term> contents.
This will probably help the other output types too.
1999-07-06 17:16:42 +00:00
Thomas G. Lockhart a75f2d21a8 Clean up to ensure tag completion as required by the newest versions
of Norm's Modular Style Sheets and jade/docbook.
From Vince Vielhaber <vev@michvhf.com>.
1998-12-29 02:24:47 +00:00
Thomas G. Lockhart 3d83e28b2b Minor cleanup in markup, especially in the Output section. 1998-10-30 19:34:40 +00:00
Thomas G. Lockhart 37d2f76ef7 Add new information for utility commands.
Haven't yet done cleardbdir, ipcclean, pg_passwd, and pg_upgrade.
Add reference info for the SQL VACUUM command (oops, forgot it earlier).
1998-10-05 02:54:45 +00:00