0.3.0 is out!

The new pgCenter version is now released - here is what to expect

Couple of days ago a new version of pgCenter has been released. Though it’s still only 0.3.0, it includes many new features and improvements and I hope you will enjoy using this version.

Here are some key highlights:
  • Advanced sorting and filtering
  • Compatibility with PostgreSQL 9.6
  • pg_stat_replication improvements
  • pg_stat_statements improvements
  • Summary info about running (auto)vacuum tasks
  • Support of libpq environment variables
  • pg_stat_activity and pg_stat_statements informative by default
  • Errors reporting when internal errors occur
  • and of course, many internal refactoring and code improvements
pgcenter

Let’s take a closer look at some of these.

Advanced sorting and filtering
 In previous versions pgCenter used poor sorting and was unable to sort text data. In the new release qsort_r() was implemented that allowed sorting of any available fields. In addition, the new version now has filtering option. Press 'F' hotkey, enter the pattern you are looking for and you will find what you’re looking for. It is especially useful for searching databases, tables, indexes and queries.

Compatibility with postgresql - 9.6
As you know, the new version of PostgreSQL - 9.6 has been released two months ago and it had a few stats’ improvements. First, is the wait_event and wait_event_type fields for running backends in pg_stat_activity. Second, is the pg_stat_progress_vacuum system view that provides progress reporting for VACUUM operations. Both of these features are implemented in the 0.3.0 version of pgCenter. Depending on your postgres version you will see either a waiting column (before 9.6) or wait_event_type/wait_event columns (for versions 9.6 or newer). New pg_stat_progress_vacuum is available through 'V' hotkey and only if you are working with 9.6.

pg_stat_replication improvements
As you probably know, pg_stat_replication is used for controlling hot standbys, by default showing only XLOG locations of standbys. Fortunately, postgres has three additional helpful functions: pg_current_xlog_location(), pg_last_xlog_receive_location() and pg_xlog_location_diff(). With their help pgCenter calculates detailed replication lag for connected standbys, even if you are connected to the standby and trying to check lag in cascaded replication.

pg_stat_statements improvements
pgCenter has five screens for pg_stat_statements:
  • Timings stats that show how much time queries consumed;
  • General stats that show number of running queries and number of returned rows;
  • General input/output stats on block (cache/disk) IO utilization;
  • Temp IO stats that show details about queries that were forced to use temp files in cases when work_mem wasn’t sufficient;
  • Local IO stats that include data on queries that work with temporary tables - it isn't the same as temp files.
Note that you can use 'x' hotkey for switching between pg_stat_statements stats and 'X' hotkey for browsing between different stats in the menu.

Summary info about running (auto)vacuum tasks
This feature can be seen at the top-right area of pgCenter and it allows you to quickly check how many manual or auto -vacuums run at any given moment including wraparound vacuums.

Support of libpq environment variables
Earlier versions of pgCenter supported connections settings only via startup parameters or through connection files. Basically, libpq has several environment variables for connection settings. pgCenter 0.3.0 supports same variables, so it is possible to define them in shell profile and run pgCenter without params.

pg_stat_activity and pg_stat_statements informative by default
The less important WHERE conditions were removed from queries for pg_stat_statements (do not show queries with calls less than 50) and for pg_stat_activity (do not show backends with transaction age or query age less than 5ms), that allows you to see the full picture straight away.

Errors reporting when errors occur
If something goes wrong in pgCenter, for example, send queries to non-existent table (hello pg_stat_progress_vacuum), you will see detailed error message instead of an empty screen.

Internal refactoring and code improvements
There are many internal refactoring and improvements, e.g. unsafe functions have been replaced by safer analogs, error handling has been added where undefined behaviour could occur, and many others.

PgCenter is definitely improving, so I would highly recommend giving it a go. At the same time, I’d like to remind that it is beta software, so if you do come across undefined behaviour or segfaults, I’d welcome your bug reports here.

If you are going to PostgreSQL Europe in Tallinn next week I welcome you to join me in my hands-on session on Friday, 4 November where I will be taking you through these and other useful features of pgCenter.

Comments

  1. Hi,

    there is a little typo:

    Reproduce segafult (after pgcenter crash, coredump file will be created in current directory).

    segafult, shoult be segfault i guess ;-)

    see you soon in Tallin, i will be your room-host.

    ReplyDelete
  2. This is a cool tool. A couple of things that I think would be useful:
    For 9.6+ show number of worker processes being utilized (if available...).
    Provide a way to do an "explain" on a problem query.
    There was a similar tool pg_top that had the explain stuff kind of working.

    ReplyDelete

Post a Comment

Popular Posts