Commit Graph

152 Commits

Author SHA1 Message Date
Robert Haas 2a90cb69e1 Fix typos.
Thomas Reiss
2016-03-15 16:28:17 -04:00
Robert Haas c16dc1aca5 Add simple VACUUM progress reporting.
There's a lot more that could be done here yet - in particular, this
reports only very coarse-grained information about the index vacuuming
phase - but even as it stands, the new pg_stat_progress_vacuum can
tell you quite a bit about what a long-running vacuum is actually
doing.

Amit Langote and Robert Haas, based on earlier work by Vinayak Pokale
and Rahila Syed.
2016-03-15 13:32:56 -04:00
Robert Haas 53be0b1add Provide much better wait information in pg_stat_activity.
When a process is waiting for a heavyweight lock, we will now indicate
the type of heavyweight lock for which it is waiting.  Also, you can
now see when a process is waiting for a lightweight lock - in which
case we will indicate the individual lock name or the tranche, as
appropriate - or for a buffer pin.

Amit Kapila, Ildus Kurbangaliev, reviewed by me.  Lots of helpful
discussion and suggestions by many others, including Alexander
Korotkov, Vladimir Borodin, and many others.
2016-03-10 12:44:09 -05:00
Alvaro Herrera b1a9bad9e7 pgstat: add WAL receiver status view & SRF
This new view provides insight into the state of a running WAL receiver
in a HOT standby node.
The information returned includes the PID of the WAL receiver process,
its status (stopped, starting, streaming, etc), start LSN and TLI, last
received LSN and TLI, timestamp of last message send and receipt, latest
end-of-WAL LSN and time, and the name of the slot (if any).

Access to the detailed data is only granted to superusers; others only
get the PID.

Author: Michael Paquier
Reviewer: Haribabu Kommi
2016-01-07 16:21:19 -03:00
Peter Eisentraut 19e7ca8938 doc: Add some markup 2015-12-12 11:31:28 -05:00
Magnus Hagander 9029f4b374 Add system view pg_stat_ssl
This view shows information about all connections, such as if the
connection is using SSL, which cipher is used, and which client
certificate (if any) is used.

Reviews by Alex Shulgin, Heikki Linnakangas, Andres Freund & Michael Paquier
2015-04-12 19:07:46 +02:00
Bruce Momjian 7e9ed623d9 docs: mention the optimizer can increase the index usage count
Report by Marko Tiikkaja
2015-03-19 22:38:15 -04:00
Peter Eisentraut 959df4b5fc doc: Remove link to outdated dtrace project on pgfoundry 2015-03-14 16:29:36 -04:00
Tom Lane 2fb7a75f37 Add pg_stat_get_snapshot_timestamp() to show statistics snapshot timestamp.
Per discussion, this could be useful for purposes such as programmatically
detecting a nonresponding stats collector.  We already have the timestamp
anyway, it's just a matter of providing a SQL-accessible function to fetch
it.

Matt Kelly, reviewed by Jim Nasby
2015-02-19 21:36:50 -05:00
Andres Freund 5ede3a3117 Document that pg_stat_*_tables.n_tup_upd includes n_tup_hot_upd.
Author: Peter Geoghegan
2014-12-04 23:55:19 +01:00
Magnus Hagander 386c9b7383 Restructure doc sections about statistics views
Break out the "dynamic statistics" views in the table from the
"collected statistics" ones. Could do with some more refactoring,
but this is a start.
2014-11-16 13:49:03 +01:00
Peter Eisentraut 220bb39dee doc: Reflect renaming of Mac OS X to OS X
bug #10528
2014-09-09 13:56:29 -04:00
Peter Eisentraut aa68872561 doc: Spell checking 2014-07-16 22:48:11 -04:00
Andres Freund 6647f59fd2 Fix typos in the cluster_name commit.
Thom Brown and Fujii Masao
2014-06-30 10:49:39 +02:00
Andres Freund 51adcaa0df Add cluster_name GUC which is included in process titles if set.
When running several postgres clusters on one OS instance it's often
inconveniently hard to identify which "postgres" process belongs to
which postgres instance.

Add the cluster_name GUC, whose value will be included as part of the
process titles if set. With that processes can more easily identified
using tools like 'ps'.

To avoid problems with encoding mismatches between postgresql.conf,
consoles, and individual databases replace non-ASCII chars in the name
with question marks. The length is limited to NAMEDATALEN to make it
less likely to truncate important information at the end of the
status.

Thomas Munro, with some adjustments by me and review by a host of people.
2014-06-29 14:15:09 +02:00
Fujii Masao c8c9c1f5a3 Add description of pg_stat directory into doc.
Back-patch to 9.3 where pg_stat directory was introduced.
2014-06-05 01:43:17 +09:00
Fujii Masao eb56812144 Fix incorrect column name in pg_stat_replication document.
Fabrízio de Royes Mello
2014-05-19 17:03:30 +09:00
Heikki Linnakangas 4a781f1e6c Fix typo, trance -> tranche, in docs.
Amit Langote
2014-04-23 13:00:08 +03:00
Robert Haas dd1a3bccca Show xid and xmin in pg_stat_activity and pg_stat_replication.
Christian Kruse, reviewed by Andres Freund and myself, with further
minor adjustments by me.
2014-02-25 12:34:04 -05:00
Robert Haas 6615e77439 Use pg_lsn data type in pg_stat_replication, too.
Michael Paquier, per a suggestion from Andres Freund
2014-02-24 10:38:45 -05:00
Bruce Momjian 637fab6e57 doc: mention statistics reset during crash recovery
Takayuki Tsunakawa
2014-01-31 21:28:15 -05:00
Fujii Masao 9132b189bf Add pg_stat_archiver statistics view.
This view shows the statistics about the WAL archiver process's activity.

Gabriele Bartolini, reviewed by Michael Paquier, refactored a bit by me.
2014-01-29 02:58:22 +09:00
Robert Haas ea9df812d8 Relax the requirement that all lwlocks be stored in a single array.
This makes it possible to store lwlocks as part of some other data
structure in the main shared memory segment, or in a dynamic shared
memory segment.  There is still a main LWLock array and this patch does
not move anything out of it, but it provides necessary infrastructure
for doing that in the future.

This change is likely to increase the size of LWLockPadded on some
platforms, especially 32-bit platforms where it was previously only
16 bytes.

Patch by me.  Review by Andres Freund and KaiGai Kohei.
2014-01-27 11:07:44 -05:00
Magnus Hagander c87ff71f37 Expose the estimation of number of changed tuples since last analyze
This value, now pg_stat_all_tables.n_mod_since_analyze, was already
tracked and used by autovacuum, but not exposed to the user.

Mark Kirkwood, review by Laurenz Albe
2013-07-05 15:10:15 +02:00
Fujii Masao 2ef085d0e6 Get rid of pg_class.reltoastidxid.
Treat TOAST index just the same as normal one and get the OID
of TOAST index from pg_index but not pg_class.reltoastidxid.
This change allows us to handle multiple TOAST indexes, and
which is required infrastructure for upcoming
REINDEX CONCURRENTLY feature.

Patch by Michael Paquier, reviewed by Andres Freund and me.
2013-07-04 03:24:09 +09:00
Peter Eisentraut 82b55c9769 doc: Update DTrace information
The old web site link no longer worked, and some information was
outdated.
2013-04-10 23:06:19 -04:00
Peter Eisentraut 79a457dca7 doc: Add pg_stat_reset and related functions to index 2012-12-15 00:30:53 -05:00
Peter Eisentraut 5baf6da717 Documentation spell and markup checking 2012-06-08 00:06:20 +03:00
Tom Lane f35ebd2aa1 Update example of process titles shown by "ps".
This example was quite old: it lacked the WAL writer and autovac launcher
as well as the more recently added checkpointer.  Linux "ps" seems to show
slightly different stuff now too.
2012-05-11 18:33:39 -04:00
Tom Lane 809e7e21af Converge all SQL-level statistics timing values to float8 milliseconds.
This patch adjusts the core statistics views to match the decision already
taken for pg_stat_statements, that values representing elapsed time should
be represented as float8 and measured in milliseconds.  By using float8,
we are no longer tied to a specific maximum precision of timing data.
(Internally, it's still microseconds, but we could now change that without
needing changes at the SQL level.)

The columns affected are
pg_stat_bgwriter.checkpoint_write_time
pg_stat_bgwriter.checkpoint_sync_time
pg_stat_database.blk_read_time
pg_stat_database.blk_write_time
pg_stat_user_functions.total_time
pg_stat_user_functions.self_time
pg_stat_xact_user_functions.total_time
pg_stat_xact_user_functions.self_time

The first four of these are new in 9.2, so there is no compatibility issue
from changing them.  The others require a release note comment that they
are now double precision (and can show a fractional part) rather than
bigint as before; also their underlying statistics functions now match
the column definitions, instead of returning bigint microseconds.
2012-04-30 14:03:33 -04:00
Tom Lane 1dd89eadcd Rename I/O timing statistics columns to blk_read_time and blk_write_time.
This seems more consistent with the pre-existing choices for names of
other statistics columns.  Rename assorted internal identifiers to match.
2012-04-29 18:13:33 -04:00
Tom Lane 309c64745e Rename track_iotiming GUC to track_io_timing.
This spelling seems significantly more readable to me.
2012-04-29 16:23:54 -04:00
Tom Lane 5f2b089387 Further editorialization on the new documentation for statistics views.
Get rid of the per-column documentation of underlying functions, which did
far more to clutter the view descriptions than it did to be helpful, and
was rather incomplete and typo-ridden anyway.  Instead suggest that people
consult the definitions of the standard views to see the underlying
functions.

The older functions for obtaining individual facts about backends are now
somewhat obsoleted by pg_stat_get_activity, which means that they are not
documented by any standard view.  So I put that information into a separate
table.  (Maybe we should just deprecate them instead?)

In passing, fix a couple more documentation errors.
2012-04-29 15:36:04 -04:00
Tom Lane aebe989477 Make a copy-editing pass over the new documentation for statistics views.
Fix a bunch of typos, improve markup, make wording more uniform, rearrange
some material.  No substantive changes.
2012-04-29 13:24:44 -04:00
Heikki Linnakangas fb9bc5d9fb Fix typos in docs, some words were doubled.
Thom Brown
2012-04-10 09:31:31 +03:00
Robert Haas b736aef2ec Publish checkpoint timing information to pg_stat_bgwriter.
Greg Smith, Peter Geoghegan, and Robert Haas
2012-04-05 14:04:37 -04:00
Robert Haas 97e26dc66d Correctly explain units used by function-timing stats functions.
The views are in milliseconds, but the raw functions return
microseconds.
2012-04-05 11:50:06 -04:00
Robert Haas 644828908f Expose track_iotiming data via the statistics collector.
Ants Aasma's original patch to add timing information for buffer I/O
requests exposed this data at the relation level, which was judged too
costly.  I've here exposed it at the database level instead.
2012-04-05 11:40:24 -04:00
Magnus Hagander ac086d466d Fix some typos and correct wording in the monitoring docs patch
Thom Brown
2012-02-25 16:33:57 +01:00
Magnus Hagander ddfc2d9a37 Merge the list of statistics functions into the view documentation
Most people won't read them individually anyway, it's an easy way to find
them, and it's a lot of duplicated information if they are kept in two
different places.
2012-02-25 15:29:11 +01:00
Magnus Hagander da9ed7dafd Make each pg_stat_ view into it's own table in the documentation
This makes it easier to match a column name with the description of it,
and makes it possible to add more detailed documentation in the future.

This patch does not add that extra documentation at this point, only
the structure required for it.

Modeled on the changes already done to pg_stat_activity.
2012-02-25 15:20:49 +01:00
Magnus Hagander 61cb8c5abb Add deadlock counter to pg_stat_database
Adds a counter that tracks number of deadlocks that occurred in
each database to pg_stat_database.

Magnus Hagander, reviewed by Jaime Casanova
2012-01-26 15:58:19 +01:00
Magnus Hagander bc3347484a Track temporary file count and size in pg_stat_database
Add counters for number and size of temporary files used
for spill-to-disk queries for each database to the
pg_stat_database view.

Tomas Vondra, review by Magnus Hagander
2012-01-26 14:41:19 +01:00
Magnus Hagander 356fddfa0f Get rid of itemizedlist inside table
This renders badly on the website, and in this particular case also
doesn't actually add anything to the readability...
2012-01-20 12:30:19 +01:00
Magnus Hagander a65023e7de Further doc cleanups from the pg_stat_activity changes
Fujii Masao
2012-01-20 12:23:26 +01:00
Magnus Hagander 4f42b546fd Separate state from query string in pg_stat_activity
This separates the state (running/idle/idleintransaction etc) into
it's own field ("state"), and leaves the query field containing just
query text.

The query text will now mean "current query" when a query is running
and "last query" in other states. Accordingly,the field has been
renamed from current_query to query.

Since backwards compatibility was broken anyway to make that, the procpid
field has also been renamed to pid - along with the same field in
pg_stat_replication for consistency.

Scott Mead and Magnus Hagander, review work from Greg Smith
2012-01-19 14:19:20 +01:00
Bruce Momjian 153c8dbd8c Remove tabs in SGML file. 2011-12-18 08:32:58 -05:00
Magnus Hagander 6ef4ae1d4e Add missing documentation for function pg_stat_get_wal_senders()
Euler Taveira de Oliveira
2011-12-06 11:02:02 +01:00
Tom Lane c78d8cd146 Note that index-only scans can affect idx_tup_fetch.
An index-only scan that avoids heap fetches will increment idx_tup_read
but not idx_tup_fetch.
2011-10-08 11:09:18 -04:00
Simon Riggs 6ba77bce93 Minor doc additions for cascading replication. 2011-07-19 09:07:42 +01:00