Commit Graph

223 Commits

Author SHA1 Message Date
Tom Lane a2a8c7a662 Support hex-string input and output for type BYTEA.
Both hex format and the traditional "escape" format are automatically
handled on input.  The output format is selected by the new GUC variable
bytea_output.

As committed, bytea_output defaults to HEX, which is an *incompatible
change*.  We will keep it this way for awhile for testing purposes, but
should consider whether to switch to the more backwards-compatible
default of ESCAPE before 8.5 is released.

Peter Eisentraut
2009-08-04 16:08:37 +00:00
Tom Lane f5bc74192d Make GEQO's planning deterministic by having it start from a predictable
random number seed each time.  This is how it used to work years ago, but
we got rid of the seed reset because it was resetting the main random()
sequence and thus having undesirable effects on the rest of the system.
To fix, establish a private random number state for each execution of
geqo(), and initialize the state using the new GUC variable geqo_seed.
People who want to experiment with different random searches can do so
by changing geqo_seed, but you'll always get the same plan for the same
value of geqo_seed (if holding all other planner inputs constant, of course).

The new state is kept in PlannerInfo by adding a "void *" field reserved
for use by join_search hooks.  Most of the rather bulky code changes in
this commit are just arranging to pass PlannerInfo around to all the GEQO
functions (many of which formerly didn't receive it).

Andres Freund, with some editorialization by Tom
2009-07-16 20:55:44 +00:00
Peter Eisentraut f39df967e9 Add log_line_prefix placeholder %e to contain the current SQL state
Author: Guillaume Smet <guillaume.smet@gmail.com>
2009-07-03 19:14:25 +00:00
Tom Lane c30446b9c9 Proofreading for Bruce's recent round of documentation proofreading.
Most of those changes were good, but some not so good ...
2009-06-17 21:58:49 +00:00
Bruce Momjian 5d682cab65 Wording improvement for recent sesssion identifier SQL query. 2009-06-03 20:34:29 +00:00
Bruce Momjian 44ead23384 Add example of how to generate the session identifier from pg_stat_activity. 2009-06-03 00:38:34 +00:00
Tom Lane ade91586ea Remove the old advice to keep from_collapse_limit less than geqo_threshold,
instead just pointing out that a larger value may trigger use of GEQO.
Per Robert Haas.

In passing, do a bit of wordsmithing on the Genetic Query Optimizer section.
2009-06-02 17:37:55 +00:00
Bruce Momjian ba36c48e39 Proofreading adjustments for first two parts of documentation (Tutorial
and SQL).
2009-04-27 16:27:36 +00:00
Tom Lane 8d4f2ecd41 Change the default value of max_prepared_transactions to zero, and add
documentation warnings against setting it nonzero unless active use of
prepared transactions is intended and a suitable transaction manager has been
installed.  This should help to prevent the type of scenario we've seen
several times now where a prepared transaction is forgotten and eventually
causes severe maintenance problems (or even anti-wraparound shutdown).

The only real reason we had the default be nonzero in the first place was to
support regression testing of the feature.  To still be able to do that,
tweak pg_regress to force a nonzero value during "make check".  Since we
cannot force a nonzero value in "make installcheck", add a variant regression
test "expected" file that shows the results that will be obtained when
max_prepared_transactions is zero.

Also, extend the HINT messages for transaction wraparound warnings to mention
the possibility that old prepared transactions are causing the problem.

All per today's discussion.
2009-04-23 00:23:46 +00:00
Bruce Momjian d0b599012f Document that Solaris can't use effective_io_concurrency because of an
ineffective posix_fadvise().
2009-04-02 22:44:10 +00:00
Tom Lane 845693f70f Fix a couple of places that still claimed LC_COLLATE and LC_CTYPE can't
be changed after initdb.
2009-03-26 20:55:49 +00:00
Bruce Momjian 5c617f4e56 Update constraint_exclusion docs because parameter is now 3-valued, not
just enable/disable.
2009-03-23 15:14:14 +00:00
Tom Lane 640796ff41 Reduce the maximum value of vacuum_cost_delay and autovacuum_vacuum_cost_delay
to 100ms (from 1000).  This still seems to be comfortably larger than the
useful range of the parameter, and it should help discourage people from
picking uselessly large values.  Tweak the documentation to recommend small
values, too.  Per discussion of a couple weeks ago.
2009-02-28 00:10:52 +00:00
Peter Eisentraut 7380b6384b Don't append epoch to log_filename if no format specifier is given.
Robert Haas
2009-02-24 12:09:09 +00:00
Tom Lane 451a15f95c Add note that inlined SQL functions aren't tracked by track_functions. 2009-02-22 23:50:30 +00:00
Tom Lane 57b5984d24 Minor wordsmithing. 2009-02-15 18:28:48 +00:00
Alvaro Herrera 834a6da4f7 Update autovacuum to use reloptions instead of a system catalog, for
per-table overrides of parameters.

This removes a whole class of problems related to misusing the catalog,
and perhaps more importantly, gives us pg_dump support for the parameters.

Based on a patch by Euler Taveira de Oliveira, heavily reworked by me.
2009-02-09 20:57:59 +00:00
Heikki Linnakangas 6587818542 Add vacuum_freeze_table_age GUC option, to control when VACUUM should
ignore the visibility map and scan the whole table, to advance
relfrozenxid.
2009-01-16 13:27:24 +00:00
Tom Lane b7b8f0b609 Implement prefetching via posix_fadvise() for bitmap index scans. A new
GUC variable effective_io_concurrency controls how many concurrent block
prefetch requests will be issued.

(The best way to handle this for plain index scans is still under debate,
so that part is not applied yet --- tgl)

Greg Stark
2009-01-12 05:10:45 +00:00
Magnus Hagander 1b4e729eaa Make krb_realm and krb_server_hostname be pg_hba options only, and remove
their GUCs.

In passing, noted that the pg_hba options for krb5 authentication weren't
listed at all - so add this.
2009-01-09 10:13:19 +00:00
Tom Lane 445ce15702 Create a third option named "partition" for constraint_exclusion, and make it
the default.  This setting enables constraint exclusion checks only for
appendrel members (ie, inheritance children and UNION ALL arms), which are
the cases in which constraint exclusion is most likely to be useful.  Avoiding
the overhead for simple queries that are unlikely to benefit should bring
the cost down to the point where this is a reasonable default setting.
Per today's discussion.
2009-01-07 22:40:49 +00:00
Magnus Hagander af26089841 Add appropriate text for SIGHUP parameters instead of just removing it
like previous patch did.

Per note from Tom Lane
2009-01-07 12:21:47 +00:00
Magnus Hagander a27addbc87 Make it possible to change Kerberos/GSSAPI parameters without restarting
the postmaster. They are only used in backend processes, so it's just
a matter of re-labeling the GUCs.
2009-01-02 10:33:20 +00:00
Tom Lane 65e3ea7641 Increase the default value of default_statistics_target from 10 to 100,
and its maximum value from 1000 to 10000.  ALTER TABLE SET STATISTICS
similarly now allows a value up to 10000.  Per discussion.
2008-12-13 19:13:44 +00:00
Magnus Hagander bd33aca36e Add note that autovacuum can use up several times maintenance_work_mem,
with warning against setting it too high.
2008-12-08 15:11:39 +00:00
Tom Lane 86422cbbfc Minor copy-editing. 2008-11-21 20:21:59 +00:00
Magnus Hagander bae2116ac6 Document which GUC settings are enums and not strings, along with a short
paragraph about what that means.
2008-11-21 19:42:12 +00:00
Bruce Momjian 170b66a0c5 Issue a proper error message when MD5 is attempted when
db_user_namespace is enabled.

Also document this limitation.
2008-11-20 20:45:30 +00:00
Tom Lane a4917bef0e Add support for input and output of interval values formatted per ISO 8601;
specifically, we can input either the "format with designators" or the
"alternative format", and we can output the former when IntervalStyle is set
to iso_8601.

Ron Mayer
2008-11-11 02:42:33 +00:00
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