Commit Graph

185 Commits

Author SHA1 Message Date
Magnus Hagander 5b8eb2b4b9 Make the temporary directory for pgstat files configurable by the GUC
variable stats_temp_directory, instead of requiring the admin to
mount/symlink the pg_stat_tmp directory manually.

For now the config variable is PGC_POSTMASTER. Room for further improvment
that would allow it to be changed on-the-fly.
2008-08-15 08:37:41 +00:00
Bruce Momjian 8d7af89016 Properly document archive/restore command examples on Windows.
ITAGAKI Takahiro
2008-07-18 17:33:17 +00:00
Tom Lane 7a97abe818 Add unchangeable GUC "variables" segment_size, wal_block_size, and
wal_segment_size to make those configuration parameters available to clients,
in the same way that block_size was previously exposed.  Bernd Helmle, with
comments from Abhijit Menon-Sen and some further tweaking by me.
2008-07-10 22:08:17 +00:00
Bruce Momjian 1e797d29c3 Documentation patch by Kevin L. McBride explaining GUC lock variables,
which are available if LOCK_DEBUG is defined.
2008-07-01 21:49:04 +00:00
Heikki Linnakangas 995fb74202 Turn PGBE_ACTIVITY_SIZE into a GUC variable, track_activity_query_size.
As the buffer could now be a lot larger than before, and copying it could
thus be a lot more expensive than before, use strcpy instead of memcpy to
copy the query string, as was already suggested in comments. Also, only copy
the PgBackendStatus struct and string if the slot is in use.

Patch by Thomas Lee, with some changes by me.
2008-06-30 10:58:47 +00:00
Alvaro Herrera bd2ef8707f In log_filename documentation, mention that strftime is not used directly to
expand the pattern specifier.

Per gripe from Josh Drake.
2008-06-14 21:59:59 +00:00
Tom Lane 07a5606735 Make to_char()'s localized month/day names depend on LC_TIME, not LC_MESSAGES.
Euler Taveira de Oliveira
2008-05-19 18:08:16 +00:00
Tom Lane 93c701edc6 Add support for tracking call counts and elapsed runtime for user-defined
functions.

Note that because this patch changes FmgrInfo, any external C functions
you might be testing with 8.4 will need to be recompiled.

Patch by Martin Pihlak, some editorialization by me (principally, removing
tracking of getrusage() numbers)
2008-05-15 00:17:41 +00:00
Tom Lane db147b3483 Allow the planner's estimate of the fraction of a cursor's rows that will be
retrieved to be controlled through a GUC variable.

Robert Hell
2008-05-02 21:26:10 +00:00
Tom Lane 1b1e335b15 Make the minimum allowed value of work_mem be 64KB always, rather than having
it vary with BLCKSZ as before.  This agrees with what the documentation says,
and avoids a regression test problem when BLCKSZ is larger than default.
Per recent discussion.
2008-05-01 19:55:40 +00:00
Tom Lane 87a2f050a9 Cause EXPLAIN's VERBOSE option to print the target list (output column list)
of each plan node, instead of its former behavior of dumping the internal
representation of the plan tree.  The latter display is still available for
those who really want it (see debug_print_plan), but uses for it are certainly
few and and far between.  Per discussion.

This patch also removes the explain_pretty_print GUC, which is obsoleted
by the change.
2008-04-18 01:42:17 +00:00
Neil Conway 2169e42bef Enable 64-bit integer datetimes by default, per previous discussion.
This requires a working 64-bit integer type. If such a type cannot
be found, "--disable-integer-datetimes" can be used to switch
back to the previous floating point-based datetime implementation.
2008-03-30 04:08:15 +00:00
Bruce Momjian a534afc854 Add to documentation:
+         Setting <varname>statement_timeout</> in
+         <filename>postgresql.conf</> is not recommended because it
+         affects all sessions.

Backpatch to 8.3.X.
2008-03-11 16:59:00 +00:00
Bruce Momjian 2d049a07c9 Back out doc addition that statement_timeout affects autovacuum. 2008-03-11 15:49:46 +00:00
Bruce Momjian bbd2e68cfb Document that statement_timeout is not recommended in postgresql.conf
because it affects all sessions, including autovacuum.
2008-03-11 15:39:23 +00:00
Magnus Hagander 52a8d4f8f7 Implement enum type for guc parameters, and convert a couple of existing
variables to it. More need to be converted, but I wanted to get this in
before it conflicts with too much...

Other than just centralising the text-to-int conversion for parameters,
this allows the pg_settings view to contain a list of available options
and allows an error hint to show what values are allowed.
2008-03-10 12:55:13 +00:00
Tom Lane 2abf130a4e Increase the default value of log_min_messages to WARNING, so that
NOTICE-grade messages are not logged by default.  Per pgsql-hackers
discussion back on 21-Nov-2007.
2008-03-10 03:22:29 +00:00
Tom Lane d9384a4b73 Remove postmaster.c's check that NBuffers is at least twice MaxBackends.
With the addition of multiple autovacuum workers, our choices were to delete
the check, document the interaction with autovacuum_max_workers, or complicate
the check to try to hide that interaction.  Since this restriction has never
been adequate to ensure backends can't run out of pinnable buffers, it doesn't
really have enough excuse to live to justify the second or third choices.
Per discussion of a complaint from Andreas Kling (see also bug #3888).

This commit also removes several documentation references to this restriction,
but I'm not sure I got them all.
2008-03-09 04:56:28 +00:00
Bruce Momjian 91215f6241 Document that increasing the number of checkpoints segments or
checkpoint timeout can incrase the time needed for crash recovery, per
suggestion from Simon.
2008-03-05 16:59:10 +00:00
Bruce Momjian 2f67722dda No need to use checkpoint_warning to log checkpoints --- we added
log_checkpoints in 8.3.
2008-02-16 21:14:08 +00:00
Bruce Momjian 2fce2336dc Add suggestion about how to set checkpoint_warning to log all
checkpoints.
2008-02-16 21:11:32 +00:00
Tom Lane 19c40492f0 Move example of turning off synchronous_commit to a more logical place,
to wit in the description of that variable rather than some other one.
2008-02-02 23:29:12 +00:00
Tom Lane 47df4f6688 Add a GUC variable "synchronize_seqscans" to allow clients to disable the new
synchronized-scanning behavior, and make pg_dump disable sync scans so that
it will reliably preserve row ordering.  Per recent discussions.
2008-01-30 18:35:55 +00:00
Tom Lane b5518c8e88 Minor editorial improvements in documentation of session_replication_role;
in particular correct the obsolete claim that it can't be changed once
any plans have been cached.
2008-01-27 19:12:28 +00:00
Tom Lane 1e985720eb Improve description of bgwriter_lru_multiplier, per discussion. 2008-01-21 03:28:42 +00:00
Alvaro Herrera 230e8962f3 Make CSV column ordering a bit more logical. 2007-12-11 20:07:31 +00:00
Alvaro Herrera 3bf66d6f1c Extend the format of CSV logs to include the additional information supplied
with the logged event.  CSV logs are now a first-class citizen along plain
text logs in that they carry much of the same information.

Per complaint from depesz on bug #3799.
2007-12-11 15:19:05 +00:00
Peter Eisentraut 9293425819 spell checker run 2007-11-28 15:42:31 +00:00
Bruce Momjian 497365f48a Add comments about VACUUM to free space map docs.
Joshua D. Drake
2007-11-28 05:01:24 +00:00
Tom Lane 3ebb8867aa Minor improvement in documentation of temp_tablespaces: avoid grammatical
ambiguity and say what the default value is.
2007-11-19 02:26:10 +00:00
Bruce Momjian 4521207390 Remove tabs from SGML files. 2007-11-09 23:52:08 +00:00
Magnus Hagander 4b606ee444 Add parameter krb_realm used by GSSAPI, SSPI and Kerberos
to validate the realm of the connecting user. By default
it's empty meaning no verification, which is the way
Kerberos authentication has traditionally worked in
PostgreSQL.
2007-11-09 17:31:07 +00:00
Bruce Momjian c00055ea80 Document that syncronhous commit can be turned off in a single
multi-statement transaction.
2007-11-05 17:35:38 +00:00
Bruce Momjian 53e3f9dcfd Add documentation mention that FSM == Free Space Map, so the config
parameter name makes more sense.
2007-11-01 17:06:30 +00:00
Tom Lane 41a312a1f6 Add a note pointing out that you can't log to syslog without tweaking
the syslog configuration file (at least not on most known Unixen).
I dunno why we hadn't had that info in the docs all along ...
2007-10-20 04:00:38 +00:00
Neil Conway 81f285da7c Replace a reference to "start_log_collector" with "logging_collector",
per Guillaume Lelarge.
2007-10-09 18:14:01 +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
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
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
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 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
Tom Lane 295e63983d Implement lazy XID allocation: transactions that do not modify any database
rows will normally never obtain an XID at all.  We already did things this way
for subtransactions, but this patch extends the concept to top-level
transactions.  In applications where there are lots of short read-only
transactions, this should improve performance noticeably; not so much from
removal of the actual XID-assignments, as from reduction of overhead that's
driven by the rate of XID consumption.  We add a concept of a "virtual
transaction ID" so that active transactions can be uniquely identified even
if they don't have a regular XID.  This is a much lighter-weight concept:
uniqueness of VXIDs is only guaranteed over the short term, and no on-disk
record is made about them.

Florian Pflug, with some editorialization by Tom.
2007-09-05 18:10:48 +00:00
Tom Lane 40c1d7c10e Text search doc updates --- first cut at
syncing the existing docs with the final syntax decisions.
2007-08-22 04:45:20 +00:00
Bruce Momjian bbde090330 Remove tabs from SGML files. 2007-08-21 15:13:16 +00:00
Andrew Dunstan e1a1da9f4b minor typo fixes in CSVlog docs, per Michael Glaesemann 2007-08-19 03:23:30 +00:00
Andrew Dunstan fd801f4faa Provide for logfiles in machine readable CSV format. In consequence, rename
redirect_stderr to logging_collector.
Original patch from Arul Shaji, subsequently modified by Greg Smith, and then
heavily modified by me.
2007-08-19 01:41:25 +00:00
Tom Lane b83bd31bd9 TEMPORARILY make synchronous_commit default to OFF, so that we can get more
thorough testing of async-commit mode from the buildfarm.  This patch MUST
get reverted before 8.3 release!
2007-08-13 19:27:12 +00:00
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