Commit Graph

7900 Commits

Author SHA1 Message Date
Tom Lane 70b9b9b788 Change initdb and CREATE DATABASE to actively reject attempts to create
databases with encodings that are incompatible with the server's LC_CTYPE
locale, when we can determine that (which we can on most modern platforms,
I believe).  C/POSIX locale is compatible with all encodings, of course,
so there is still some usefulness to CREATE DATABASE's ENCODING option,
but this will insulate us against all sorts of recurring complaints
caused by mismatched settings.

I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
a new src/port/ file so it could be shared by CREATE DATABASE.
2007-09-28 22:25:49 +00:00
Bruce Momjian ae0b90f223 Remove:
< * SQL*Net listener that makes PostgreSQL appear as an Oracle database
<   to clients
2007-09-28 21:32:29 +00:00
Tom Lane 77c166ba6c Add virtual transaction IDs to CSVLOG output, so that messages coming from
the same transaction can be identified even when no regular XID was assigned.
This seems essential after addition of the lazy-XID patch.  Also some
minor code cleanup in write_csvlog().
2007-09-27 18:15:36 +00:00
Bruce Momjian 03a91e0d10 Lowercase all mentions of "PostgreSQL" in URLs, per Magnus. 2007-09-27 06:14:47 +00:00
Tom Lane f18dfc4835 Minor improvements in backup and recovery:
- create a separate archive_mode GUC, on which archive_command is dependent

- %r option in recovery.conf sends last restartpoint to recovery command

- %r used in pg_standby, updated README

- minor other code cleanup in pg_standby

- doc on Warm Standby now mentions pg_standby and %r

- log_restartpoints recovery option emits LOG message at each restartpoint

- end of recovery now displays last transaction end time, as requested
  by Warren Little; also shown at each restartpoint

- restart archiver if needed to carry away WAL files at shutdown

Simon Riggs
2007-09-26 22:36:30 +00:00
Bruce Momjian 80963144ad Rename "PostgreSQL" to "Postgres" in 3 places. 2007-09-26 20:38:28 +00:00
Bruce Momjian 9692324734 Rename "PostgreSQL" to "Postgres" in 7 places in the FAQ. 2007-09-26 20:36:50 +00:00
Bruce Momjian 10e1b9df5c Add:
> * Implement Boyer-Moore searching in strpos()
>
>   http://archives.postgresql.org/pgsql-patches/2007-08/msg00012.php
2007-09-26 08:47:43 +00:00
Bruce Momjian 1b57b8bfdc Document that libpq's PQntuples() might overflow. 2007-09-26 08:45:50 +00:00
Tom Lane 6f5c38dcd0 Just-in-time background writing strategy. This code avoids re-scanning
buffers that cannot possibly need to be cleaned, and estimates how many
buffers it should try to clean based on moving averages of recent allocation
requests and density of reusable buffers.  The patch also adds a couple
more columns to pg_stat_bgwriter to help measure the effectiveness of the
bgwriter.

Greg Smith, building on his own work and ideas from several other people,
in particular a much older patch from Itagaki Takahiro.
2007-09-25 20:03:38 +00:00
Tom Lane 48f7e64395 Simplify and rename some GUC variables, per various recent discussions:
* stats_start_collector goes away; we always start the collector process,
unless prevented by a problem with setting up the stats UDP socket.

* stats_reset_on_server_start goes away; it seems useless in view of the
availability of pg_stat_reset().

* stats_block_level and stats_row_level are merged into a single variable
"track_counts", which controls all reports sent to the collector process.

* stats_command_string is renamed to track_activities.

* log_autovacuum is renamed to log_autovacuum_min_duration to better reflect
its meaning.

The log_autovacuum change is not a compatibility issue since it didn't exist
before 8.3 anyway.  The other changes need to be release-noted.
2007-09-24 03:12:23 +00:00
Andrew Dunstan 02138357ff Remove "convert 'blah' using conversion_name" facility, because if it
produces text it is an encoding hole and if not it's incompatible
with the spec, whatever the spec means (which we're not sure about anyway).
2007-09-24 01:29:30 +00:00
Bruce Momjian d16f270e59 Typo fix from Brendan Jurd. 2007-09-23 18:06:47 +00:00
Tom Lane 90c156f0d1 Document the translations from Postgres message severity levels to
syslog and eventlog severity levels, per suggestion from Josh Drake.
Also, some wordsmithing for the csvlog documentation.
2007-09-22 19:10:44 +00:00
Tom Lane cc59049daf Improve handling of prune/no-prune decisions by storing a page's oldest
unpruned XMAX in its header.  At the cost of 4 bytes per page, this keeps us
from performing heap_page_prune when there's no chance of pruning anything.
Seems to be necessary per Heikki's preliminary performance testing.
2007-09-21 21:25:42 +00:00
Bruce Momjian 754838caa3 Done:
> * -Consider shrinking expired tuples to just their headers
> * -Allow heap reuse of UPDATEd rows if no indexed columns are changed,
>   and old and new versions are on the same heap page

Not needed anymore:

< * Reuse index tuples that point to heap tuples that are not visible to
<   anyone?
2007-09-20 18:54:19 +00:00
Tom Lane 282d2a03dd HOT updates. When we update a tuple without changing any of its indexed
columns, and the new version can be stored on the same heap page, we no longer
generate extra index entries for the new version.  Instead, index searches
follow the HOT-chain links to ensure they find the correct tuple version.

In addition, this patch introduces the ability to "prune" dead tuples on a
per-page basis, without having to do a complete VACUUM pass to recover space.
VACUUM is still needed to clean up dead index entries, however.

Pavan Deolasee, with help from a bunch of other people.
2007-09-20 17:56:33 +00:00
Bruce Momjian 4893eadc3c Remove tabs from SGML file. 2007-09-19 03:13:57 +00:00
Andrew Dunstan 55613bf9cd Close previously open holes for invalidly encoded data to enter the
database via builtin functions, as recently discussed on -hackers.

chr() now returns a character in the database encoding. For UTF8 encoded databases
the argument is treated as a Unicode code point. For other multi-byte encodings
the argument must designate a strict ascii character, or an error is raised,
as is also the case if the argument is 0.

ascii() is adjusted so that it remains the inverse of chr().

The two argument form of convert() is gone, and the three argument form now
takes a bytea first argument and returns a bytea. To cover this loss three new
functions are introduced:
. convert_from(bytea, name) returns text - converts the first argument from the
  named encoding to the database encoding
. convert_to(text, name) returns bytea - converts the first argument from the
  database encoding to the named encoding
. length(bytea, name) returns int - gives the length of the first argument in
  characters in the named encoding
2007-09-18 17:41:17 +00:00
Tom Lane e92da1a9d1 Update release notes for last-minute fix. 2007-09-16 03:03:00 +00:00
Bruce Momjian 9a36a09f2e Update Japanese FAQ.
Jun Kuwamura
2007-09-15 00:58:19 +00:00
Bruce Momjian c16ffbc677 Add:
>
> 	o Prevent long-lived temporary tables from causing frozen-xid
> 	  advancement starvation
>
> 	  http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php
2007-09-14 19:02:46 +00:00
Bruce Momjian dc8a8a0463 Add:
>
> * Make it possible to use RETURNING together with conditional DO INSTEAD
>   rules, such as for partitioning setups
>
>   http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php
2007-09-14 18:50:48 +00:00
Bruce Momjian 18cad61e67 Fix markup. 2007-09-14 18:39:58 +00:00
Bruce Momjian 637878cd85 Update pronunciation FAQ item. 2007-09-14 18:38:44 +00:00
Bruce Momjian 23221f4eea Update to mention alternate project name is "Postgres". 2007-09-14 18:29:59 +00:00
Tom Lane b2acd633e4 Fix markup that doesn't work in back branches. 2007-09-14 16:15:35 +00:00
Bruce Momjian 12afe7bc76 Document atan2() as y/x, rather than x/y, to conform to general usage.
Andrew Maclean
2007-09-14 15:53:48 +00:00
Tom Lane 9b2afa90bf Minor editorialization on release notes. 2007-09-14 15:50:51 +00:00
Bruce Momjian 4b836d8312 Add some links for escape strings.
Brendan Jurd

Fix markup in previous commit.
2007-09-14 14:54:25 +00:00
Bruce Momjian f6a168e2c3 Add LDAP URL documentation.
Albe Laurenz
2007-09-14 14:31:22 +00:00
Bruce Momjian 13e26073bd Update documentation to mention that autovacuum also does analyze so we
don't need to recommend nightly analyzes anymore unless autovacuum is off.
2007-09-14 13:43:03 +00:00
Bruce Momjian fc79628641 Clarify tar documentation about return error codes.
Backpatch to 8.2.X.
2007-09-14 13:26:22 +00:00
Bruce Momjian ae36e0d589 Update tsearch include location in example.
Oleg.
2007-09-14 13:21:30 +00:00
Bruce Momjian c0f2b109bc This is small patch fixes a spi example (PG_MODULE_MAGIC is required as
of PostgreSQL 8.2) and provides a link to compiling and linking section.

Euler Taveira de Oliveira
2007-09-14 04:18:27 +00:00
Bruce Momjian edc18429bd Update GNU tar error code documentation.
Backpatch to 8.2.X.
2007-09-14 04:15:50 +00:00
Bruce Momjian 6c9e4d7e08 Mentino that PAM doesn't work for Unix system authentication because of
the problems non-root reading /etc/shadow.
2007-09-14 03:53:54 +00:00
Bruce Momjian aa33bdd783 Update documented error text.
Fujii Masao
2007-09-14 02:43:18 +00:00
Bruce Momjian dfe2e3f7a5 Clarify age() 'months' calculation documentation. 2007-09-14 00:52:45 +00:00
Bruce Momjian f307fe4c9b Update documentation to emphasize autovacuum rather than
administrator-scheduled vacuums.
2007-09-13 23:43:35 +00:00
Bruce Momjian e8e2bd799f Update Japanese FAQ, backpatch.
Jun Kuwamura
2007-09-13 03:34:11 +00:00
Bruce Momjian 8049626ee2 Update Japanese FAQ to current release number. 2007-09-12 03:11:42 +00:00
Bruce Momjian 0735264aab Upcoming most recent release will be 8.2.5. 2007-09-11 17:34:12 +00:00
Bruce Momjian da7192d1d4 Stamp 2007-09-11 17:19:49 +00:00
Tom Lane 82a47982f3 Arrange for SET LOCAL's effects to persist until the end of the current top
transaction, unless rolled back or overridden by a SET clause for the same
variable attached to a surrounding function call.  Per discussion, these
seem the best semantics.  Note that this is an INCOMPATIBLE CHANGE: in 8.0
through 8.2, SET LOCAL's effects disappeared at subtransaction commit
(leading to behavior that made little sense at the SQL level).

I took advantage of the opportunity to rewrite and simplify the GUC variable
save/restore logic a little bit.  The old idea of a "tentative" value is gone;
it was a hangover from before we had a stack.  Also, we no longer need a stack
entry for every nesting level, but only for those in which a variable's value
actually changed.
2007-09-11 00:06:42 +00:00
Tom Lane f243a1a1bd Revert temporary patch that made synchronous_commit default to OFF. 2007-09-10 02:01:19 +00:00
Tom Lane b7adf47eda Set the correct context (PGC_SIGHUP) for log_autovacuum, per ITAGAKI Takahiro.
Fix grammatical errors in its description.
2007-09-10 01:39:19 +00:00
Bruce Momjian 85e79a4a83 Add Hash thread URL:
>   http://archives.postgresql.org/pgsql-hackers/2007-09/msg00051.php
2007-09-07 19:07:58 +00:00
Tom Lane cd1aae5864 Allow CREATE INDEX CONCURRENTLY to disregard transactions in other
databases, per gripe from hubert depesz lubaczewski.  Patch from
Simon Riggs.
2007-09-07 00:58:57 +00:00
Bruce Momjian 190df8a4cf Done:
< * Reduce XID consumption of read-only queries
<
<    http://archives.postgresql.org/pgsql-hackers/2007-08/msg00516.php
<
<
> * -Reduce XID consumption of read-only queries
2007-09-05 21:58:47 +00:00