Peter Eisentraut [Thu, 19 Jul 2018 12:54:17 +0000 (14:54 +0200)]
doc: Small improvement in quick start
Add an indication that the "SHOW HELP" example output is not complete.
Then we don't have to feel obliged to update it every time we add
something to the actual help output.
If we fail to calloc the rule buffer, going to failed: will deref
rule via the rule_free() call. Avoid by returning false directly
and bypass the failed: block.
If the fopen() call fails parse_namefile() frees the filename buffer
fn, and the caller does the same. Avoid freeing in parse_namefile()
and leave the cleanup to the caller.
Peter Eisentraut [Tue, 26 Dec 2017 21:49:36 +0000 (16:49 -0500)]
Fix psql invocation in tests
Always run psql with -X, otherwise some tests fail if there is something
in .psqlrc producing output. Also fix some potential portability
problems in option syntax: Put non-option arguments last, don't mix
options with and without arguments.
Peter Eisentraut [Thu, 14 Dec 2017 18:54:58 +0000 (13:54 -0500)]
Fix handling of absent rst2man
The makefile line
RST2MAN ?= rst2man
didn't have the desired effect, because config.mak sets RST2MAN, and ?=
doesn't do anything if the variable is set to empty. So instead let
configure put in a default value if the program cannot be found.
Euler Taveira [Fri, 8 Dec 2017 22:00:24 +0000 (22:00 +0000)]
Use default values in config file
Instead of using arbritary values, use the default values. It is to
avoid surprises if you just remove comment character (;). I also did
some cosmetic changes. While at it, add some default information for
auth_user.
Tomas Vondra [Sun, 24 Sep 2017 16:49:35 +0000 (18:49 +0200)]
Add SHOW STATS_TOTALS / STATS_AVERAGES as admin commands
We already had SHOW STATS, but after adding the wait_time colums it
got a bit too wide for regular screens. That's incovenient, as the
admin interface does not selecting only some of the columns.
But in most cases we're only interested either in totals or averages,
not both at the same time. So let's add commands showing only the
relevant subset of columns.
Tomas Vondra [Wed, 20 Sep 2017 21:22:39 +0000 (23:22 +0200)]
Track total time spent waiting for server
There already is maxwait column in pool details, showing how long
the oldest client is currently waiting. Which is useful, but it does
not allow us to easily break client time into the three basic
categories: busy, idle and waiting.
This adds tracking of total time spent waiting for a server, and
adds it as wait_time into SHOW STATS. The total value is simply
accumulated over time, the average value is 'per second' value.
The value is only updated when a client acquires a server, so if
a client is waiting indefinitely, the wait time won't be reflected
in the value. That would require inspecting the the list of waiting
clients, which seems like overkill. Moreover, that's what maxwait
is good for.
Tomas Vondra [Wed, 20 Sep 2017 19:00:17 +0000 (21:00 +0200)]
Track separate stats for queries and transactions
The documentation claimed avg_query tracks average query duration,
but it was only updated when switching into 'idle' state. So in
transaction or session pooling modes, it was actually the duration
of the whole transaction, including 'idle in transaction' time and
time spen executing (multiple) queries.
This was causing confusion, e.g. when the application was keeping
transactions open without executing any queries. In that case the
avg_query metric was increasing although the database was handling
queries just fine (without any slow-down).
Instead of just fixing the avg_query metric, it seems quite useful
to have timing data both for queries and transactions. So this
patch replaces
This is also related to the definition of 'request' which was used
to compute the avg_query, and so it equal to a transaction. This
patch replaces the counter with two - one for transactions and one
for queries. As we also computed avg_req, the patch replaces
It's not strictly required, but it's useful metadata, and part of the recommended license template text (see http://choosealicense.com/licenses/isc/ and https://opensource.org/licenses/isc-license)
Ilya Staheev [Mon, 21 Mar 2016 16:29:08 +0000 (17:29 +0100)]
Add PAM authentication support
Adds support for PAM authentication. Since PAM API is synchronous, this
patch introduces PAM authentication thread which processes the
authentication requests in backgrouns so that the normal poll operations
of the main thread are not blocked.
This feature is turned off by default and has to be enabled by
--with-pam configure parameter.
Author: Ilya Staheev
Reviewed by Marko Kreen and Petr Jelinek