summaryrefslogtreecommitdiff
path: root/contrib/pg_stat_statements
AgeCommit message (Collapse)Author
2011-04-10pgindent run before PG 9.1 beta 1.Bruce Momjian
2011-04-07Revise the API for GUC variable assign hooks.Tom Lane
The previous functions of assign hooks are now split between check hooks and assign hooks, where the former can fail but the latter shouldn't. Aside from being conceptually clearer, this approach exposes the "canonicalized" form of the variable value to guc.c without having to do an actual assignment. And that lets us fix the problem recently noted by Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus log messages about "parameter "wal_buffers" cannot be changed without restarting the server". There may be some speed advantage too, because this design lets hook functions avoid re-parsing variable values when restoring a previous state after a rollback (they can store a pre-parsed representation of the value instead). This patch also resolves a longstanding annoyance about custom error messages from variable assign hooks: they should modify, not appear separately from, guc.c's own message about "invalid parameter value".
2011-02-27Refactor the executor's API to support data-modifying CTEs better.Tom Lane
The originally committed patch for modifying CTEs didn't interact well with EXPLAIN, as noted by myself, and also had corner-case problems with triggers, as noted by Dean Rasheed. Those problems show it is really not practical for ExecutorEnd to call any user-defined code; so split the cleanup duties out into a new function ExecutorFinish, which must be called between the last ExecutorRun call and ExecutorEnd. Some Asserts have been added to these functions to help verify correct usage. It is no longer necessary for callers of the executor to call AfterTriggerBeginQuery/AfterTriggerEndQuery for themselves, as this is now done by ExecutorStart/ExecutorFinish respectively. If you really need to suppress that and do it for yourself, pass EXEC_FLAG_SKIP_TRIGGERS to ExecutorStart. Also, refactor portal commit processing to allow for the possibility that PortalDrop will invoke user-defined code. I think this is not actually necessary just yet, since the portal-execution-strategy logic forces any non-pure-SELECT query to be run to completion before we will consider committing. But it seems like good future-proofing.
2011-02-14Convert contrib modules to use the extension facility.Tom Lane
This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-09-22Convert cvsignore to gitignore, and add .gitignore for build targets.Magnus Hagander
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-04-28Modify ShmemInitStruct and ShmemInitHash to throw errors internally,Tom Lane
rather than returning NULL for some-but-not-all failures as they used to. Remove now-redundant tests for NULL from call sites. We had to do something about this because many call sites were failing to check for NULL; and changing it like this seems a lot more useful and mistake-proof than adding checks to the call sites without them.
2010-02-26pgindent run for 9.0Bruce Momjian
2010-01-08Add buffer access counters to pg_stat_statements.Itagaki Takahiro
This uses the same infrastructure with EXPLAIN BUFFERS to support {shared|local}_blks_{hit|read|written} andtemp_blks_{read|written} columns in the pg_stat_statements view. The dumped file format also updated. Thanks to Robert Haas for the review.
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-12-29Previous fix for temporary file management broke returning a set fromHeikki Linnakangas
PL/pgSQL function within an exception handler. Make sure we use the right resource owner when we create the tuplestore to hold returned tuples. Simplify tuplestore API so that the caller doesn't need to be in the right memory context when calling tuplestore_put* functions. tuplestore.c automatically switches to the memory context used when the tuplestore was created. Tuplesort was already modified like this earlier. This patch also removes the now useless MemoryContextSwitch calls from callers. Report by Aleksei on pgsql-bugs on Dec 22 2009. Backpatch to 8.1, like the previous patch that broke this.
2009-12-15Add a hook to let loadable modules get control at ProcessUtility execution,Tom Lane
and use it to extend contrib/pg_stat_statements to track utility commands. Itagaki Takahiro, reviewed by Euler Taveira de Oliveira.
2009-12-15Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.Robert Haas
This patch also removes buffer-usage statistics from the track_counts output, since this (or the global server statistics) is deemed to be a better interface to this information. Itagaki Takahiro, reviewed by Euler Taveira de Oliveira.
2009-12-01Revert due to Tom's concerns:Bruce Momjian
Add ProcessUtility_hook() to handle all DDL to contrib/pg_stat_statements.
2009-12-01ProcessUtility_hook:Bruce Momjian
Add ProcessUtility_hook() to handle all DDL to contrib/pg_stat_statements. Itagaki Takahiro
2009-07-27Improve comment, per gripe from Alvaro.Tom Lane
2009-07-27Fix pg_stat_statements for EXEC_BACKEND case.Tom Lane
We should not try to load old statistics when re-attaching to existing shared memory. Per bug #4941. Itagaki Takahiro
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-01-05Add EmitWarningsOnPlaceholders calls to contrib modules that are likely toTom Lane
get listed in custom_variable_classes.
2009-01-04Add contrib/pg_stat_statements for server-wide tracking of statement executionTom Lane
statistics. Takahiro Itagaki