Commit Graph

7797 Commits

Author SHA1 Message Date
Tom Lane bdd6b62245 Switch over to using the src/timezone functions for formatting timestamps
displayed in the postmaster log.  This avoids Windows-specific problems with
localized time zone names that are in the wrong encoding, and generally seems
like a good idea to forestall other potential platform-dependent issues.
To preserve the existing behavior that all backends will log in the same time
zone, create a new GUC variable log_timezone that can only be changed on a
system-wide basis, and reference log-related calculations to that zone instead
of the TimeZone variable.

This fixes the issue reported by Hiroshi Saito that timestamps printed by
xlog.c startup could be improperly localized on Windows.  We still need a
simpler patch for that problem in the back branches, however.
2007-08-04 01:26:54 +00:00
Magnus Hagander 3f0245cb24 Update supported standalone VC++ version to 7.1+ only, and fix
some bad data leftover in win32.mak.

Per request from Hiroshi Saito.
2007-08-03 10:47:11 +00:00
Andrew Dunstan 63872601e8 Move session_start out of MyProcPort stucture and make it a global called MyStartTime,
so that we will be able to create a cookie for all processes for CSVlogs.
It is set wherever MyProcPid is set. Take the opportunity to remove the now
unnecessary session-only restriction on the %s and %c escapes in log_line_prefix.
2007-08-02 23:39:45 +00:00
Bruce Momjian c441e26ee8 Done:
< * Allow buffered WAL writes and fsync
2007-08-01 23:13:31 +00:00
Tom Lane 4a78cdeb6b Support an optional asynchronous commit mode, in which we don't flush WAL
before reporting a transaction committed.  Data consistency is still
guaranteed (unlike setting fsync = off), but a crash may lose the effects
of the last few transactions.  Patch by Simon, some editorialization by Tom.
2007-08-01 22:45:09 +00:00
Bruce Momjian 3bc619342f Remove links to old Win32 source code ports. 2007-08-01 00:24:55 +00:00
Peter Eisentraut dc6dc0f63a Update conformance information about bigint type
found by Michael Glaesemann
2007-07-27 10:37:52 +00:00
Neil Conway b2b9b4d59c Implement RETURN QUERY for PL/PgSQL. This provides some convenient syntax
sugar for PL/PgSQL set-returning functions that want to return the result
of evaluating a query; it should also be more efficient than repeated
RETURN NEXT statements. Based on an earlier patch from Pavel Stehule.
2007-07-25 04:19:09 +00:00
Tom Lane ad4295728e Create a new dedicated Postgres process, "wal writer", which exists to write
and fsync WAL at convenient intervals.  For the moment it just tries to
offload this work from backends, but soon it will be responsible for
guaranteeing a maximum delay before asynchronously-committed transactions
will be flushed to disk.

This is a portion of Simon Riggs' async-commit patch, committed to CVS
separately because a background WAL writer seems like it might be a good idea
independently of the async-commit feature.  I rebased walwriter.c on
bgwriter.c because it seemed like a more appropriate way of handling signals;
while the startup/shutdown logic in postmaster.c is more like autovac because
we want walwriter to quit before we start the shutdown checkpoint.
2007-07-24 04:54:09 +00:00
Alvaro Herrera 53d2951be7 Set a default autovacuum vacuum_cost_delay value of 20ms, to avoid excessive
I/O utilization, per discussion.

While at it, lower the autovacuum vacuum and analyze threshold values to 50
tuples.  It is a bit higher (i.e. more conservative) than what I originally
proposed but much better than the old values for small tables.
2007-07-24 01:53:56 +00:00
Alvaro Herrera aa81c558ee Reword paragraph about the autovacuum_max_workers setting. Patch from
Jim Nasby.
2007-07-23 17:22:00 +00:00
Magnus Hagander f70866fb23 SSPI authentication on Windows. GSSAPI compatible client when doing Kerberos
against a Unix server, and Windows-specific server-side authentication
using SSPI "negotiate" method (Kerberos or NTLM).

Only builds properly with MSVC for now.
2007-07-23 10:16:54 +00:00
Tom Lane ddb93cac24 Provide a bit more high-level documentation for the GEQO planner.
Per request from Luca Ferrari.
2007-07-21 04:02:41 +00:00
Magnus Hagander dc32d2cefa GSSAPI documentation 2007-07-18 12:00:47 +00:00
Bruce Momjian 9e19063abc Document that 'deleted' is also tracked by autovacuum. 2007-07-18 03:39:01 +00:00
Bruce Momjian df7128bd34 Document that age() adds days, then full months. 2007-07-18 03:12:42 +00:00
Bruce Momjian 27d074923d Add:
>
> 	o Allow GLOBAL temporary tables to exist as empty by default in
> 	  all sessions
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php
>
2007-07-18 00:16:21 +00:00
Bruce Momjian a5ca334a21 Remove http://www.benchmarkresources.com, no longer resolves to a
meaningful site.
2007-07-17 05:03:55 +00:00
Neil Conway 474774918b Implement CREATE TABLE LIKE ... INCLUDING INDEXES. Patch from NikhilS,
based in part on an earlier patch from Trevor Hardcastle, and reviewed
by myself.
2007-07-17 05:02:03 +00:00
Bruce Momjian 77d27e43e5 Add CVS Wiki URL to docs. 2007-07-17 01:52:34 +00:00
Bruce Momjian 74fbe9ccd1 Add:
> * Allow multiple indexes to be created concurrently, ideally via a
>   single heap scan, and have a restore of a pg_dump somehow use it
>
>   http://archives.postgresql.org/pgsql-general/2007-05/msg01274.php

Small blank line additions.
2007-07-17 00:07:54 +00:00
Bruce Momjian 5fb01d829a Update docs that GNU tar versions >=1.16 exit with 1 on files changed, 2
on other errors.
2007-07-16 22:20:51 +00:00
Tom Lane ae1b7e298c Allow plpgsql function parameter names to be qualified with the function's
name.  With this patch, it is always possible for the user to qualify a
plpgsql variable name if needed to avoid ambiguity.  While there is much more
work to be done in this area, this simple change removes one unnecessary
incompatibility with Oracle.  Per discussion.
2007-07-16 17:01:11 +00:00
Tom Lane a69f9028b5 Note incompatibility with Oracle's version of FOR ... REVERSE, per
Andrew Dunstan.  Minor other improvements in documentation of integer
FOR loops.
2007-07-15 00:45:16 +00:00
Tom Lane d849c5d182 Editorial overhaul of plpgsql documentation. Provide detailed documentation
of variable substitution and plan caching behavior in dedicated sections.
(A lot of this material existed already, but was scattered in various places
in the chapter.)  Reorganize material a little bit, mostly to try to avoid
diving into deep details in the first introductory sections.  Document some
fine points that had escaped treatment before, notably the ability to qualify
plpgsql variable names with block labels.  Some minor wordsmithing here and
there.
2007-07-14 23:02:25 +00:00
Tom Lane bf75e2a3c7 Add note that building from CVS requires bison and flex, whereas
building from a distribution tarball does not.
2007-07-10 23:03:18 +00:00
Tom Lane ff481ca0d4 Adjust processSQLNamePattern() so that $ within the pattern is always matched
literally, whether quoted or not.  Since we allow $ as a character within
identifiers, this behavior is useful, whereas the previous behavior of
treating it as the regexp ending anchor was nearly useless given that the
pattern is automatically anchored anyway.  This affects the arguments of
psql's \d commands as well as pg_dump's -n and -t switches.  Per discussion.
2007-07-10 00:21:31 +00:00
Tom Lane 9b619679a8 Minor copy-editing. 2007-07-09 01:08:09 +00:00
Tom Lane 5f7b1f8d9d Closer code review for PQconnectionUsedPassword() patch: in particular,
not OK to include postgres_fe.h into libpq-fe.h, hence declare it as
returning int not bool.
2007-07-08 18:28:56 +00:00
Tom Lane 3f33d7bcb6 Fix broken markup. 2007-07-08 17:47:38 +00:00
Joe Conway 51bc3dfe4b Arrange for the authentication request type to be preserved in
PGconn. Invent a new libpq connection-status function,
PQconnectionUsedPassword() that returns true if the server
demanded a password during authentication, false otherwise.
This may be useful to clients in general, but is immediately
useful to help plug a privilege escalation path in dblink.
Per list discussion and design proposed by Tom Lane.
2007-07-08 17:11:51 +00:00
Bruce Momjian 8c69d881ce Remove TODO.detail/win32intr, no longer needed. 2007-07-08 00:42:07 +00:00
Bruce Momjian 5b67de17ee Remove, per Magnus:
< 	o Check WSACancelBlockingCall() for interrupts [win32intr]
2007-07-08 00:41:11 +00:00
Tom Lane ad9a99c24f Improve description of SPI_scroll_cursor_move's return values, per a
gripe by Pavel Stehule awhile ago.
2007-07-05 19:15:12 +00:00
Neil Conway a55898131e Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE.
Sequences and views could previously be renamed using ALTER TABLE, but
this was a repeated source of confusion for users. Update the docs,
and psql tab completion. Patch from David Fetter; various minor fixes
by myself.
2007-07-03 01:30:37 +00:00
Tom Lane 9fc25c0511 Improve logging of checkpoints. Patch by Greg Smith, worked over
by Heikki and a little bit by me.
2007-06-30 19:12:02 +00:00
Tom Lane 4303c0fdbf Add a note that pg_start_backup will take awhile because of new
distributed checkpoint behavior.  Explain how to work around this
by issuing a manual CHECKPOINT command.  Per discussion with Heikki.
2007-06-29 15:46:21 +00:00
Bruce Momjian 700eabbe69 Done:
> * -Reduce checkpoint performance degredation by forcing data to disk
2007-06-28 21:55:00 +00:00
Neil Conway 7c07b136bc Add the function's volatility to the output of psql's \df+ command.
Update the psql reference page accordingly.
2007-06-28 06:40:16 +00:00
Tom Lane 867e2c91a0 Implement "distributed" checkpoints in which the checkpoint I/O is spread
over a fairly long period of time, rather than being spat out in a burst.
This happens only for background checkpoints carried out by the bgwriter;
other cases, such as a shutdown checkpoint, are still done at full speed.

Remove the "all buffers" scan in the bgwriter, and associated stats
infrastructure, since this seems no longer very useful when the checkpoint
itself is properly throttled.

Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas,
and some minor API editorialization by me.
2007-06-28 00:02:40 +00:00
Tom Lane b09c248bdd Fix PGXS conventions so that extensions can be built against Postgres
installations whose pg_config program does not appear first in the PATH.
Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho
and others.
2007-06-26 22:05:04 +00:00
Tom Lane ec0bb02db8 Add a <tip> that log_line_prefix should usually end with a space to
provide visual separation from the rest of the log line; I've been
noticing lately that quite a few newbies fail to figure this out for
themselves.  Also a little editorial cleanup of the log_line_prefix
description.
2007-06-22 16:15:23 +00:00
Peter Eisentraut 9f6aacd9e6 Update password example. 2007-06-21 12:20:10 +00:00
Peter Eisentraut 8ddb046bc9 Update examples of create/drop scripts. 2007-06-21 10:43:09 +00:00
Tom Lane 4c2d3ccf8a Add a caveat pointing out that constraint exclusion doesn't work with
constraints the planner is unable to disprove, hence simple btree-compatible
conditions should be used.  We've seen people try to get cute with stuff
like date_part(something) = something at least twice now.  Even if we
wanted to try to teach predtest.c about the properties of date_part,
most of the useful variants aren't immutable so nothing could be proved.
2007-06-20 23:11:38 +00:00
Neil Conway 8f3d07764f Remove some empty columns from a few system catalog tables in the
SGML docs.
2007-06-20 19:24:05 +00:00
Tom Lane 6e07228728 Code review for log_lock_waits patch. Don't try to issue log messages from
within a signal handler (this might be safe given the relatively narrow code
range in which the interrupt is enabled, but it seems awfully risky); do issue
more informative log messages that tell what is being waited for and the exact
length of the wait; minor other code cleanup.  Greg Stark and Tom Lane
2007-06-19 20:13:22 +00:00
Tom Lane 23347231a5 Tweak the API for per-datatype typmodin functions so that they are passed
an array of strings rather than an array of integers, and allow any simple
constant or identifier to be used in typmods; for example
	create table foo (f1 widget(42,'23skidoo',point));
Of course the typmodin function has still got to pack this info into a
non-negative int32 for storage, but it's still a useful improvement in
flexibility, especially considering that you can do nearly anything if you
are willing to keep the info in a side table.  We can get away with this
change since we have not yet released a version providing user-definable
typmods.  Per discussion.
2007-06-15 20:56:52 +00:00
Bruce Momjian 7ced811d45 Update item:
< * Allow EXPLAIN output to be more easily processed by scripts
> * Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
2007-06-13 21:38:00 +00:00
Magnus Hagander 1ad08a8e9a Update documentation of resultmap file format. 2007-06-12 17:49:12 +00:00