Commit Graph

194 Commits

Author SHA1 Message Date
Tom Lane df7641e25a Add a new GUC variable called "IntervalStyle" that decouples interval output
from DateStyle, and create a new interval style that produces output matching
the SQL standard (at least for interval values that fall within the standard's
restrictions).  IntervalStyle is also used to resolve the conflict between the
standard and traditional Postgres rules for interpreting negative interval
input.

Ron Mayer
2008-11-09 00:28:35 +00:00
Bruce Momjian e33e0c43fe Document that SSL is only possible on tcp/ip connections in the
postgresql.conf 'ssl' section.
2008-11-04 22:40:40 +00:00
Tom Lane 3c2313f481 Change the pgstat logic so that the stats collector writes the stats file only
upon requests from backends, rather than on a fixed 500msec cycle.  (There's
still throttling logic to ensure it writes no more often than once per
500msec, though.)  This should result in a significant reduction in stats file
write traffic in typical scenarios where the stats are demanded only
infrequently.

This approach also means that the former difficulty with changing
stats_temp_directory on-the-fly has gone away, so remove the caution about
that as well as the thrashing we did to minimize the trouble window.

In passing, also fix pgstat_report_stat() so that we will send a stats
message if we have function call stats but not table stats to report;
this fixes a bug in the recent patch to support function-call stats.

Martin Pihlak
2008-11-03 01:17:08 +00:00
Heikki Linnakangas 15c121b3ed Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the
free space information is stored in a dedicated FSM relation fork, with each
relation (except for hash indexes; they don't use FSM).

This eliminates the max_fsm_relations and max_fsm_pages GUC options; remove any
trace of them from the backend, initdb, and documentation.

Rewrite contrib/pg_freespacemap to match the new FSM implementation. Also
introduce a new variant of the get_raw_page(regclass, int4, int4) function in
contrib/pageinspect that let's you to return pages from any relation fork, and
a new fsm_page_contents() function to inspect the new FSM pages.
2008-09-30 10:52:14 +00:00
Tom Lane e36716a653 Add standard boilerplate sentence about when stats_temp_directory can be changed. 2008-08-25 19:03:37 +00:00
Magnus Hagander f1e237b6b2 Unconditionally write the statsfile when SIGHUP is received, to minimize
the window during which backends have no statistics file to read.
2008-08-25 18:55:43 +00:00
Magnus Hagander be8d6c5c34 Make stats_temp_directory PGC_SIGHUP, and document how it may cause a temporary
"outage" of the statistics views.

This requires making the stats collector respond to SIGHUP, like the other
utility processes already did.
2008-08-25 15:11:01 +00:00
Bruce Momjian 8ddb739e9d Make "log_temp_files" super-user set only, like other logging options.
Simon Riggs
2008-08-22 18:47:07 +00:00
Tom Lane 9650830bc8 Cause the output from debug_print_parse, debug_print_rewritten, and
debug_print_plan to appear at LOG message level, not DEBUG1 as historically.
Make debug_pretty_print default to on.  Also, cause plans generated via
EXPLAIN to be subject to debug_print_plan.  This is all to make
debug_print_plan a reasonably comfortable substitute for the former behavior
of EXPLAIN VERBOSE.
2008-08-19 18:30:04 +00:00
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