users/rhaas/postgres.git
13 years agoAdd some infrastructure for contrib/pg_stat_statements.
Tom Lane [Tue, 27 Mar 2012 19:14:13 +0000 (15:14 -0400)]
Add some infrastructure for contrib/pg_stat_statements.

Add a queryId field to Query and PlannedStmt.  This is not used by the
core backend, except for being copied around at appropriate times.
It's meant to allow plug-ins to track a particular query forward from
parse analysis to execution.

The queryId is intentionally not dumped into stored rules (and hence this
commit doesn't bump catversion).  You could argue that choice either way,
but it seems better that stored rule strings not have any dependency
on plug-ins that might or might not be present.

Also, add a post_parse_analyze_hook that gets invoked at the end of
parse analysis (but only for top-level analysis of complete queries,
not cases such as analyzing a domain's default-value expression).
This is mainly meant to be used to compute and assign a queryId,
but it could have other applications.

Peter Geoghegan

13 years agoNew GUC, track_iotiming, to track I/O timings.
Robert Haas [Tue, 27 Mar 2012 18:52:37 +0000 (14:52 -0400)]
New GUC, track_iotiming, to track I/O timings.

Currently, the only way to see the numbers this gathers is via
EXPLAIN (ANALYZE, BUFFERS), but the plan is to add visibility through
the stats collector and pg_stat_statements in subsequent patches.

Ants Aasma, reviewed by Greg Smith, with some further changes by me.

13 years agoSilence compiler warning about uninitialized variable.
Tom Lane [Tue, 27 Mar 2012 18:47:23 +0000 (14:47 -0400)]
Silence compiler warning about uninitialized variable.

13 years agopg_dump: Small message adjustment for consistency
Peter Eisentraut [Tue, 27 Mar 2012 16:52:39 +0000 (19:52 +0300)]
pg_dump: Small message adjustment for consistency

13 years agoImprove PL/Python database access function documentation
Peter Eisentraut [Mon, 26 Mar 2012 18:15:16 +0000 (21:15 +0300)]
Improve PL/Python database access function documentation

Organize the function descriptions as a list instead of running text,
for easier access.

13 years agoRemove dead assignment
Peter Eisentraut [Mon, 26 Mar 2012 18:03:10 +0000 (21:03 +0300)]
Remove dead assignment

found by Coverity

13 years agoCode cleanup for heap_freeze_tuple.
Robert Haas [Mon, 26 Mar 2012 15:03:06 +0000 (11:03 -0400)]
Code cleanup for heap_freeze_tuple.

It used to be case that lazy vacuum could call this function with only
a shared lock on the buffer, but neither lazy vacuum nor any other
code path does that any more.  Simplify the code accordingly and clean
up some related, obsolete comments.

13 years agoFix COPY FROM for null marker strings that correspond to invalid encoding.
Tom Lane [Mon, 26 Mar 2012 03:17:22 +0000 (23:17 -0400)]
Fix COPY FROM for null marker strings that correspond to invalid encoding.

The COPY documentation says "COPY FROM matches the input against the null
string before removing backslashes".  It is therefore reasonable