pgCenter is a command-line admin tool for observing and troubleshooting Postgres.

Overview

Web site GitHub release Build Status Go Report Card


pgCenter is a command-line admin tool for observing and troubleshooting Postgres.


Main goal

Postgres provides various activity statistics about its runtime, such as connections, statements, database operations, replication, resources usage and more. General purpose of the statistics is to help DBAs to monitor and troubleshoot Postgres. However, these statistics provided in textual form retrieved from SQL functions and views, and Postgres doesn't provide native tools for working with statistics views.

pgCenter's main goal is to help Postgres DBA working with statistics and provide a convenient way to observe Postgres in runtime.

Key features

  • Top-like interface that allows you to monitor stats changes as you go. See details here.
  • Configuration management function allows viewing and editing of current configuration files and reloading the service, if needed.
  • Logfiles functions allow you to quickly check Postgres logs without stopping statistics monitoring.
  • "Poor man’s monitoring" allows you to collect Postgres statistics into files and build reports later on. See details here.
  • Wait events profiler allows to see what wait events occur during queries execution. See details here.

Supported statistics

When troubleshooting Postgres it's always important to keep an eye not only on Postgres metrics, but also system metrics, since Postgres utilizes system resources, such as cpu, memory, storage and network when working. pgCenter allows you to see both kinds of statistics related to Postgres and your system.

PostgreSQL statistics

pgCenter supports majority of statistics views available in Postgres, and at the same time, uses additional SQL functions applied to statistics to show these in a more convenient way. The following stats are available:

  • current summary activity - a compilation/selection of metrics from different sources - postgres uptime, version, recovery status, number of clients grouped by their states, number of (auto)vacuums, statements per second, age of the longest transaction and the longest vacuum;
  • pg_stat_activity - information related to the current activity of connected clients and Postgres background processes.
  • pg_stat_database - database-wide statistics, such as number of commits/rollbacks, handled tuples, deadlocks, temporary files, etc.
  • pg_stat_replication - statistics on replication, connected standby hosts and their activity.
  • pg_stat_user_tables, pg_statio_user_tables - statistics on accesses (including IO) to tables.
  • pg_stat_user_indexes, pg_statio_user_indexes - statistics on accesses (including IO) to indexes.
  • pg_stat_user_functions - statistics on execution of functions.
  • pg_stat_statements - statistics on SQL statements executed including time and resources usage.
  • statistics on tables sizes based on pg_relation_size() and pg_total_relation_size() functions;
  • pg_stat_progress_vacuum - information about progress of (auto)vacuums status.
  • pg_stat_progress_cluster - information about progress of CLUSTER and VACUUM FULL operations.
  • pg_stat_progress_create_index - information about progress of CREATE INDEX and REINDEX operations.
System statistics

pgcenter top also provides system usage information based on statistics from procfs filesystem:

  • load average and CPU usage time (user, system, nice, idle, iowait, software and hardware interrupts, steal);
  • memory and swap usage, amount of cached and dirty memory, writeback activity;
  • storage devices statistics: iops, throughput, latencies, average queue and requests size, devices utilization;
  • network interfaces statistics: throughput in bytes and packets, different kind of errors, saturation and utilization.

In case of connecting to remote Postgres there is possibility to use additional SQL functions used for retrieving /proc statistics from remote host. For more information see details here.

Install notes

pgCenter is written on Go language and distributed as a single precompiled binary file. Download it from releases, unpack and it's ready to use.

Additional information and usage examples available here.

Usage notes

  • pgCenter has been developed to work on Linux and hasn't been tested on other OS (operating systems), therefore, it is not recommended to use it on alternative systems because it will not operate properly.
  • pgCenter can also be run using Docker.
  • pgCenter supports a wide range of PostgreSQL versions, despite of difference in statistics between each version. If pgCenter is unable to read a particular stat, it will show a descriptive error message.
  • ideally, pgCenter requires SUPERUSER database privileges, or at least privileges that will allow you to view statistics, read settings, logfiles and send signals to other backends. Roles with such privileges (except reading logs) have been introduced in Postgres 10, see details here.
  • it is recommended to run pgCenter on the same host where Postgres is running. This is because for Postgres pgCenter is just a simple client application and it may have the same problems as other applications that work with Postgres, such as network-related problems, slow responses, etc.
  • it is possible to run pgCenter on one host and connect to Postgres which runs on another host, but some functions may not work - this fully applies to pgcenter top command.
  • pgCenter also supports Amazon RDS for PostgreSQL, but as mentioned above, some functions will not work and also system stats will not be available, because of PostgreSQL RDS instances don't support untrusted procedural languages due to security reasons.

Development and testing

The following notes are important for people who interested in developing new features.

  • pgcenter goes with special docker image used for local and CI/CD testing. See testing directory for details.
  • see docs about how to deploy environment for local development.

Known issues

pgCenter is beta software, thus in some circumstances, segfaults and panics may occur. When panics occur please do let me know - this helps me in making necessary changes and improve this software. To make sure that I can reproduce an issue you’ve been having and can address it accordingly please follow these steps:

  • build pgCenter from the master branch and try to reproduce the bug/crash.
  • create an issue and include clear instructions on how the bug could be reproduced.
  • also, please list the information about your operating system, its release version and version of Postgres.

Thanks

  • Thank you for using pgCenter!
  • Sebastien Godard for sysstat.
  • Brendan Gregg and Tim Cook for nicstat.
  • Pavel Stěhule for his articles.
  • Pavel Alexeev, package maintainer on EPEL testing repo (Fedora/Centos).
  • Manuel Rüger, ebuild maintainer on mrueg overlay (Gentoo Linux).
  • Anton Novojilov, package maintainer on RHEL/CentOS Linux (Essential Kaos repo).
  • Nikolay A. Fetisov, package maintainer at Sisyphus ALT Linux.
  • Devrim Gündüz, package maintainer on official PostgreSQL yum repo.
Comments
  • runtime error: slice bounds out of range [:-1]

    runtime error: slice bounds out of range [:-1]

    Sometime if choice "pg_stat_statements input/output" pgcenter fail with kernel panic. PostgreSQL 11.6

    SELpanic: runtime error: slice bounds out of range [:-1], seqmax, seqmin,
    postgres  xxxxx~  54        132       0         0         c8c520c~  SELECT tableoid, oid, conname, pg_catalog.pg_get_constraintdef(oid) AS co
    goroutine 1 [running]:6       6         0         0         84d9044~  SELECT tableoid, oid, conname, confrelid, pg_catalog.pg_get_constraintdef
    github.com/lesovsky/pgcenter/top.printStatData(0xc0001dc2d0, 0xc000a6a7d0, 0xc0057b8900)id, conname, confrelid, pg_catalog.pg_get_constraintdef
    postgres/home/travis/gopath/src/github.com/lesovsky/pgcenter/top/stat.go:246 +0x632um, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t
    github.com/lesovsky/pgcenter/top.printDbstat(0xc0001dc2d0, 0x40319c28f5c28f5c, 0x402e1eb851eb851f, 0x402a8f5c28f5c28f, 0xc004123be8, 0x3, 0x41d49133e9c00000, 0x4080c80000000000, 0x4193dd25cc000000, 0x4195ce0878000000, ...)ableoid, oid, adnum, pg_catalog.pg_get_expr(adbin, adrelid) AS ad
    postgres/home/travis/gopath/src/github.com/lesovsky/pgcenter/top/stat.go:181 +0xc4tableoid, pol.polname, pol.polcmd, pol.polpermissive, CASE WH
    github.com/lesovsky/pgcenter/top.printAllStat.func1(0xc00014c000, 0xc000a6b904, 0x3) tgfoid::pg_catalog.regproc AS tgfname, pg_catalog.pg_get_t
    postgres/home/travis/gopath/src/github.com/lesovsky/pgcenter/top/stat.go:92 +0x489_in_recovery()                                               
    github.com/jroimartin/gocui.(*Gui).consumeevents(0xc00014c000, 0x0, 0x0)LECT pg_get_userbyid(p.userid) AS user, d.datname AS database, date_tru
    postgres/home/travis/gopath/pkg/mod/github.com/jroimartin/[email protected]/gui.go:399 +0x1e8byid(p.userid) AS user, d.datname AS database, p.shared
    github.com/jroimartin/gocui.(*Gui).MainLoop(0xc00014c000, 0x845e38, 0xc00014c000)me, tgfoid::pg_catalog.regproc AS tgfname, pg_catalog.pg_get_t
    postgres/home/travis/gopath/pkg/mod/github.com/jroimartin/[email protected]/gui.go:381 +0x206$1, now() - pg_postmaster_start_time())                
    github.com/lesovsky/pgcenter/top.uiLoop(0xb18f00, 0x0)      e2a899f~  SET deadlock_timeout TO 1000                                             
    postgres/home/travis/gopath/src/github.com/lesovsky/pgcenter/top/ui.go:49 +0x156cription from pg_catalog.pg_description where objoid = $1 and c
    github.com/lesovsky/pgcenter/top.RunMain(0xc00008c540, 0x0, 0x2, 0x7ffdd641473f, 0x13, 0x1538, 0x0, 0x0, 0x0, 0x0, ...),2) AS avg_query, sum(ca
    postgres/home/travis/gopath/src/github.com/lesovsky/pgcenter/top/top.go:43 +0x194                                                              
    github.com/lesovsky/pgcenter/cmd/top.glob..func1(0xb14540, 0xc00008c540, 0x0, 0x2)tableoid, pol.polname, pol.polcmd, pol.polpermissive, CASE WH
    postgres/home/travis/gopath/src/github.com/lesovsky/pgcenter/cmd/top/top.go:23 +0x72eoid, pr.oid, p.pubname FROM pg_publication_rel pr, pg_publ
    github.com/spf13/cobra.(*Command).execute(0xb14540, 0xc00008c520, 0x2, 0x2, 0xb14540, 0xc00008c520)                                            
    postgres/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2aag_stat_statements(IN showtext boolean, OUT userid oid, O
    github.com/spf13/cobra.(*Command).ExecuteC(0xb13960, 0x0, 0x78e840, 0xc000074058)ize_pretty(pg_database_size($1))                              
    postgres/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2eaers CASCADE                                             
    github.com/spf13/cobra.(*Command).Execute(...)
    	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:800
    main.main()
    	/home/travis/gopath/src/github.com/lesovsky/pgcenter/pgcenter.go:8 +0x2d
    
    opened by patsevanton 14
  • PostgreSQL 11.x

    PostgreSQL 11.x

    I try use pgcenter with PostgreSQL 11.x, and get this error:

    pgcenter top -U user -h 10.156.0.7 -d backend_prod
    Password for user user : ERROR: pq: password authentication failed for user "user"
    

    if i will try psql :

    Password for user user: 
    psql (9.6.11, server 11.1 (Ubuntu 11.1-3.pgdg18.04+1))
    WARNING: psql major version 9.6, server major version 11.
             Some psql features might not work.
    SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
    Type "help" for help.
    
    backend_prod=# \q
    

    password is correct.

    bug 
    opened by grigorov 12
  • support OS X

    support OS X

    This is what I get trying to build pgcenter on OS X 10.10.5: $ make cc -g -std=gnu99 -Wall -pedantic -I/usr/local/Cellar/postgresql/9.5.4_1/include -L/usr/local/lib -o pgcenter pgcenter.c -lpq -lncurses -lmenu pgcenter.c:13:10: fatal error: 'linux/types.h' file not found

    include <linux/types.h>

         ^
    

    1 error generated. make: *** [pgcenter] Error 1

    opened by slotrans 10
  • Installation issues

    Installation issues

    [email protected]:~/github$ cd pgcenter/
    [email protected]:~/github/pgcenter$ make
    gcc -g -std=gnu99 -Wall -pedantic -I/usr/include/postgresql -L/usr/lib/x86_64-linux-gnu -o pgcenter pgcenter.c -lncurses -ltinfo -lpq
    pgcenter.c:11:21: fatal error: ncurses.h: No such file or directory
     #include <ncurses.h>
                         ^
    compilation terminated.
    Makefile:25: recipe for target 'pgcenter' failed
    make: *** [pgcenter] Error 1
    [email protected]:~/github/pgcenter$ uname -a
    Linux dev 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17) x86_64 GNU/Linux
    
    opened by NikolayS 10
  • Timing Statements query error

    Timing Statements query error

    Describe the bug pgcenter fails to show timing statistics after 12.6 -> 13.2 PostgreSQL upgrade. I've tried 0.6.4 an 0.8.0 RPM packages - the same result :-(

    ERROR: column p.total_time does not exist

    Environment Describe the environment where the bug occurred.

    • OS: CentOS Linux 7 (Core)
    • pgCenter Version: pgcenter v0.8.0 df1cea5201ee10e6a9b99fae6a45bc5a3a4f70b4-release
    • pgCenter installation method: RPM from releases page
    • PostgreSQL Version: PostgreSQL 13.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

    To Reproduce Simple press 'x' button and you'll see screenshot

    All extensions were upgraded too after PGSQL upgrade itself.

                                                List of installed extensions
            Name        | Version |   Schema   |                              Description                               
    --------------------+---------+------------+------------------------------------------------------------------------
     pg_stat_statements | 1.8     | public     | track planning and execution statistics of all SQL statements executed
     plpgsql            | 1.0     | pg_catalog | PL/pgSQL procedural language
    (2 rows)
    
    sync=# 
    

    Dropping the extension and re-creating it - does not help.

    Expected behavior Usually it shows the timing stat table

    Additional context Not this time.

    opened by AndreyKopeyko 8
  • Environment variable PGHOSTADDR not supported

    Environment variable PGHOSTADDR not supported

    Hi

    We're using a bastion host and SSH-tunnels to connect to Postgres in Amazon RDS from outside of VPC networks. To support sslmode=verify-full we use environment variable PGHOSTADDR that contains DNS-name of RDS-host, but we actually connect to SSH-tunnel on localhost.

    It works fine with psql and other libpq-based programs, but pgcenter panics and crashes with error:

    panic: setting PGHOSTADDR not supported
    
    opened by take-five 8
  • Doesn't work with PostgreSQL built manually from source

    Doesn't work with PostgreSQL built manually from source

    Steps to reproduce

    1. Create a new Ubuntu 14.04 LTS VM or LXC container
    2. Build PostgreSQL from source according to official documentation (it's easy!): ./configure --enable-tap-tests --enable-debug && make clean && make -j8 && make check && sudo make install
    3. Use this init.d script to start a service: https://github.com/afiskon/postgresql-initd
    4. Install pgcenter
    5. Run pgcenter postgres

    Expected result:

    Nice picture like this: http://blog.postgresql-consulting.com/2015/12/pgcenter-020-released.html

    Actual result:

    Something like this http://i.imgur.com/Wpv9aUl.png

    The connection to the server was lost. Attempting reconnect.
    FATAL: no connection to the server
    ERROR: Connection to : with [email protected] failed.
    
    opened by afiskon 8
  • canceling statement due to statement timeout with PGOPTIONS='--statement-timeout=300' pgcenter top

    canceling statement due to statement timeout with PGOPTIONS='--statement-timeout=300' pgcenter top

    Hello! Run pgcenter

    pgcenter --version pgcenter v0.6.4 be1d2ad-master

    PGOPTIONS='--statement-timeout=300' pgcenter top and get error ERROR: canceling statement due to statement timeout with

    PostgreSQL 9.6 - patroni cluster

    checkpoint_completion_target = '0.7'
    cluster_name = 'vm-dev-postgresql'
    default_statistics_target = '100'
    effective_cache_size = '6GB'
    hba_file = '/tmp/pg_hba.conf'
    hot_standby = 'on'
    listen_addresses = '0.0.0.0'
    log_directory = '/var/log/pgsql'
    log_file_mode = '416'
    log_line_prefix = '%t [%p]: [%l-1] %c %x %d %u %a %h '
    maintenance_work_mem = '512MB'
    max_connections = '1500'
    max_locks_per_transaction = '64'
    max_prepared_transactions = '0'
    max_replication_slots = '10'
    max_wal_senders = '10'
    max_wal_size = '2GB'
    max_worker_processes = '8'
    min_wal_size = '1GB'
    port = '5432'
    shared_buffers = '2GB'
    shared_preload_libraries = 'pg_stat_statements'
    synchronous_standby_names = '*'
    track_commit_timestamp = 'off'
    unix_socket_directories = '/var/run/postgresql'
    wal_buffers = '16MB'
    wal_keep_segments = '8'
    wal_level = 'replica'
    wal_log_hints = 'on'
    work_mem = '20971kB'
    ident_file = '/var/lib/pgsql/9.6/data/pg_ident.conf'
    

    Log:

    2020-03-26 08:36:00 MSK [68519]: [66083-1] 5e674d70.10ba7 0     LOG:  using stale statistics instead of current ones because stats collector is not responding
    2020-03-26 08:36:03 MSK [54621]: [27-1] 5e7c3eed.d55d 0 postgres postgres pgcenter 127.0.0.1 ERROR:  canceling statement due to statement timeout
    2020-03-26 08:36:03 MSK [54621]: [28-1] 5e7c3eed.d55d 0 postgres postgres pgcenter 127.0.0.1 STATEMENT:  SELECT
    	datname,
    	coalesce(xact_commit, 0) AS commits,
    	coalesce(xact_rollback, 0) AS rollbacks,
    	coalesce(blks_read * (SELECT current_setting('block_size')::int / 1024), 0) AS reads,
    	coalesce(blks_hit, 0) AS hits,
    	coalesce(tup_returned, 0) AS returned,
    	coalesce(tup_fetched, 0) AS fetched,
    	coalesce(tup_inserted, 0) AS inserts,
    	coalesce(tup_updated, 0) AS updates,
    	coalesce(tup_deleted, 0) AS deletes,
    	coalesce(conflicts, 0) AS conflicts,
    	coalesce(deadlocks, 0) AS deadlocks,
    	coalesce(temp_files, 0) AS temp_files,
    	coalesce(temp_bytes, 0) AS temp_bytes,
    	coalesce(blk_read_time, 0)::numeric(20,2) AS read_t,
    	coalesce(blk_write_time, 0)::numeric(20,2) AS write_t,
    	date_trunc('seconds', now() - stats_reset)::text AS stats_age
    	FROM pg_stat_database
    	ORDER BY datname DESC
    2020-03-26 08:36:09 MSK [54621]: [29-1] 5e7c3eed.d55d 0 postgres postgres pgcenter 127.0.0.1 ERROR:  canceling statement due to statement timeout
    2020-03-26 08:36:09 MSK [54621]: [30-1] 5e7c3eed.d55d 0 postgres postgres pgcenter 127.0.0.1 STATEMENT:  SELECT
    	datname,
    	coalesce(xact_commit, 0) AS commits,
    	coalesce(xact_rollback, 0) AS rollbacks,
    	coalesce(blks_read * (SELECT current_setting('block_size')::int / 1024), 0) AS reads,
    	coalesce(blks_hit, 0) AS hits,
    	coalesce(tup_returned, 0) AS returned,
    	coalesce(tup_fetched, 0) AS fetched,
    	coalesce(tup_inserted, 0) AS inserts,
    	coalesce(tup_updated, 0) AS updates,
    	coalesce(tup_deleted, 0) AS deletes,
    	coalesce(conflicts, 0) AS conflicts,
    	coalesce(deadlocks, 0) AS deadlocks,
    	coalesce(temp_files, 0) AS temp_files,
    	coalesce(temp_bytes, 0) AS temp_bytes,
    	coalesce(blk_read_time, 0)::numeric(20,2) AS read_t,
    	coalesce(blk_write_time, 0)::numeric(20,2) AS write_t,
    	date_trunc('seconds', now() - stats_reset)::text AS stats_age
    	FROM pg_stat_database
    	ORDER BY datname DESC
    2020-03-26 08:36:09 MSK [54621]: [31-1] 5e7c3eed.d55d 0 postgres postgres pgcenter 127.0.0.1 LOG:  could not send data to client: Broken pipe
    2020-03-26 08:36:09 MSK [54621]: [32-1] 5e7c3eed.d55d 0 postgres postgres pgcenter 127.0.0.1 FATAL:  connection to client lost
    2020-03-26 08:36:11 MSK [68519]: [66084-1] 5e674d70.10ba7 0     LOG:  using stale statistics instead of current ones because stats collector is not responding
    
    opened by patsevanton 7
  • Failed to stat logfile / Can't determine log file

    Failed to stat logfile / Can't determine log file

    pgcenter_0.6.0_Linux_x86_64.deb

    'L' logtail. result: Failed to stat logfile: stat : no such file or directory

    l open log file with pager. result: Can't determine log file: can't parse log_filename format

    show log_directory;

        log_directory
    ---------------------
     /var/log/postgresql
    

    show log_filename;

       log_filename
    -------------------
     postgresql-%a.log
    

    p.s. This actions is worked on v0.4.0.

    bug 
    opened by vitabaks 7
  • pgcenter not working with PostgreSQL 10 (killed with oom-killer)

    pgcenter not working with PostgreSQL 10 (killed with oom-killer)

    Hi!

    At startup pgcenter used all available memory and was killed with oom-killer this behavior is only with version 10

    Tested on different servers Local and remote connection

    Please help me! I would very much like to use a pgcenter with postgresql 10


    pgcenter: latest (installed from source) OS: Debian 8 (3.16.0-4-amd64) and 9 (4.9.0-6-amd64) PostgreSQL: 10.4 and 10.5

    opened by vitabaks 7
  • shouldn't show cpu/io stats when not on db host

    shouldn't show cpu/io stats when not on db host

    if you connect to a remote db host, it's confusing to show cpu/io stats (because they are not real)

    this could either be auto-detected or use a commandline flag

    opened by seamusabshere 7
  • ERROR

    ERROR "relation does not exist" after swich to context s (pg_tables_size)

    Describe the bug ERROR "relation does not exist" after swich to context s (pg_tables_size)

    Environment

    • OS: PRETTY_NAME="Astra Linux (Smolensk 1.6)" NAME="Astra Linux (Smolensk)" ID=astra ID_LIKE=debian ANSI_COLOR="1;31" HOME_URL="http://astralinux.ru" SUPPORT_URL="http://astralinux.ru/support" VARIANT_ID=smolensk VARIANT=Smolensk VERSION_ID=1.6

    • pgCenter Version pgcenter v0.6.4 be1d2ad-master

    • pgCenter installation method: releases page

    • PostgreSQL Version PostgreSQL 9.6.10 on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit

    To Reproduce After swich to context s (pg_tables_size) rise the error "relation 'dbo.t1hlog' does not exist" image Below is a screenshot of the t context, which shows which table exists image

    Expected behavior I would like to see context 's' for my database.

    bug 
    opened by light341 6
  • panic: runtime error: slice bounds out of range [:-1]

    panic: runtime error: slice bounds out of range [:-1]

    Describe the bug While switching pg_stat_statements switch with 'x' getting panic: panic: runtime error: slice bounds out of range [:-1]

    goroutine 1 [running]: github.com/lesovsky/pgcenter/top.printStatData(0xc0001bc2d0, 0x4000666666666666, 0x40087ae147ae147b, 0x40095c28f5c28f5c, 0x3c6d, 0x3bd, 0x1839, 0x1e83, 0x1dfd, 0x86, ...) /home/runner/work/pgcenter/pgcenter/top/stat.go:394 +0x677 github.com/lesovsky/pgcenter/top.printDbstat(0xc0001bc2d0, 0xc0001241c0, 0x4000666666666666, 0x40087ae147ae147b, 0x40095c28f5c28f5c, 0x3c6d, 0x3bd, 0x1839, 0x1e83, 0x1dfd, ...) /home/runner/work/pgcenter/pgcenter/top/stat.go:309 +0x14f github.com/lesovsky/pgcenter/top.printStat.func1(0xc0001b2000, 0xc0001d79e0, 0x0) /home/runner/work/pgcenter/pgcenter/top/stat.go:135 +0x73b github.com/jroimartin/gocui.(*Gui).consumeevents(0xc0001b2000, 0xc0001d7b10, 0x0) /home/runner/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:399 +0x1b4 github.com/jroimartin/gocui.(*Gui).MainLoop(0xc0001b2000, 0x946418, 0x9b5380) /home/runner/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:381 +0x1fa github.com/lesovsky/pgcenter/top.mainLoop(0x9b53b8, 0xc0000b8010, 0xc000100780, 0x0, 0xc0000b8530) /home/runner/work/pgcenter/pgcenter/top/ui.go:45 +0x225 github.com/lesovsky/pgcenter/top.RunMain(0xc000120000, 0x0, 0x0) /home/runner/work/pgcenter/pgcenter/top/top.go:30 +0x19b github.com/lesovsky/pgcenter/cmd/top.glob..func1(0xc19f20, 0xc0000c67e0, 0x0, 0x2, 0x0, 0x0) /home/runner/work/pgcenter/pgcenter/cmd/top/top.go:31 +0xc5 github.com/spf13/cobra.(*Command).execute(0xc19f20, 0xc0000c67c0, 0x2, 0x2, 0xc19f20, 0xc0000c67c0) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:762 +0x472 github.com/spf13/cobra.(*Command).ExecuteC(0xc1a180, 0xc00004e778, 0xc000093f78, 0x406365) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fe github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:800 main.main() /home/runner/work/pgcenter/pgcenter/cmd/pgcenter.go:62 +0x31

    Environment Describe the environment where the bug occurred.

    • OS: [NAME=Fedora VERSION="29 (Twenty Nine)" ID=fedora VERSION_ID=29 VERSION_CODENAME="" PLATFORM_ID="platform:f29" PRETTY_NAME="Fedora 29 (Twenty Nine)" ANSI_COLOR="0;34" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:29" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=29 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=29 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"]
    • pgCenter Version [pgcenter v0.8.0 df1cea5201ee10e6a9b99fae6a45bc5a3a4f70b4-release]
    • pgCenter installation method: [https://github.com/lesovsky/pgcenter/releases/tag/v0.8.0]
    • PostgreSQL Version [PostgreSQL 10.17 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2), 64-bit]

    To Reproduce Run pgcenter top Switch pg_stat_statements with 'x'

    Expected behavior Switching pg_stat_statements

    opened by makeconfig2017 2
  • Top is not working when starting using docker

    Top is not working when starting using docker

    Docker postgrespro-standard work in centos 8.3

    pgcenter 0.6.6 work in docker

    docker exec -it srv-db-APSD-VO pgcenter --version
    pgcenter v0.6.6 4f87424-master
    docker exec -it srv-db-APSD-VO pgcenter top
    

    изображение

    pgcenter 0.7.0 not work docker:

    docker exec -it srv-db-APSD-VO /opt/pgpro/data/pgcenter --version
    pgcenter v0.7.0 45c8bf0d0098f377692be886691eba9ee6005808-release
    docker exec -it srv-db-APSD-VO /opt/pgpro/data/pgcenter top -h localhost
    panic: send on closed channel
    
    goroutine 65 [running]:
    github.com/lesovsky/pgcenter/top.collectStat(0x9e5620, 0xc000138c40, 0xc000122080, 0xc000382000, 0xc0001281e0)
            /home/runner/work/pgcenter/pgcenter/top/stat.go:57 +0x371
    github.com/lesovsky/pgcenter/top.doWork.func1(0x9e5620, 0xc000138c40, 0xc000148000, 0xc000382000, 0xc000380000)
            /home/runner/work/pgcenter/pgcenter/top/ui.go:77 +0x65
    created by github.com/lesovsky/pgcenter/top.doWork
            /home/runner/work/pgcenter/pgcenter/top/ui.go:76 +0xeb
    
    opened by strav66 20
  • Problem with ordering by time columns

    Problem with ordering by time columns

    First of all thanks very much for the tool - the best one in its niche!

    I believe pgcenter v0.5.0 has a problem with ordering by time columns. Please note that in the example below when using descending ordering by t_all_t 791:04:45 goes after 79:18:40 which is wrong.

    user       database   t_all_t      t_read_t   t_write_t   t_cpu_t      all_t     read_t   write_t   cpu_t     calls   queryid      query            
    *****	   *****      96:58:35     00:02:00   00:00:00    96:56:34     0.00      0        0         0.00      0       5081e3f831   
    *****	   *****      96:06:25     00:00:05   00:00:00    96:06:20     0.00      0        0         0.00      0       50e483e9ae   
    *****	   *****      95:48:34     00:00:00   00:00:00    95:48:34     0.00      0        0         0.00      0       767b8a56f9   
    *****	   *****      86:49:53     00:07:09   00:00:00    86:42:44     0.00      0        0         0.00      0       01d93a5541   
    *****	   *****      82:54:56     00:04:13   00:00:00    82:50:42     0.00      0        0         0.00      0       36bc1dca66   
    *****	   *****      82:25:43     00:03:37   00:00:00    82:22:06     0.00      0        0         0.00      0       868c464987   
    *****	   *****      80:39:06     00:00:01   00:00:00    80:39:04     15.00     0        0         15.00     2       79d439f1fa   
    *****	   *****      79:18:40     00:00:00   00:00:00    79:18:40     0.00      0        0         0.00      0       117b589937   
    *****	   *****      791:04:45    02:42:08   00:00:00    788:22:37    52.00     0.50     0         51.50     46      c0ad1d000f   
    *****	   *****      77:20:25     05:42:33   00:00:00    71:37:51     0.50      0.00     0         1.00      1       d8c30fc873   
    *****	   *****      74:42:21     00:00:00   00:00:00    74:42:21     0.00      0        0         0.00      1       313c122eae   
    *****	   *****      74:38:34     00:00:00   00:00:00    74:38:33     0.00      0        0         0.00      0       0c83c46b25   
    *****	   *****      74:23:57     00:06:18   00:00:00    74:17:38     0.50      0        0         0.50      0       e8609f8be3   
    *****	   *****      74:15:11     00:06:20   00:00:00    74:08:50     0.00      0        0         0.00      0       86eebe2b71   
    

    Thanks in advance.

    opened by grayhemp 2
Releases(v0.9.2)
  • v0.9.2(Jul 18, 2021)

  • v0.9.0(Jun 15, 2021)

    Changelog

    Major enhancements:

    • add session statistics from pg_stat_database (Postgres 14)
    • add WAL usage statistics from pg_stat_wal (Postgres 14)
    • add progress statistics about running COPY commands from pg_stat_progress_copy (Postgres 14)
    • add filesystem stats for top utility
    • extend statistics about tables sizes
    • add support for millisecond resolution for record and report utilities
    • add naming convention for columns names

    See more details here.

    For packages check out v0.9.1 release

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.9.0_checksums.txt(391 bytes)
    pgcenter_0.9.0_linux_amd64.tar.gz(5.58 MB)
  • v0.8.0(Mar 8, 2021)

    Changelog

    d1d2570 Add PGresult validation before returning result. 3cee979 Add connection options required for use with simple protocol. 53d22ff Add pg_stat_progress_analyze: add query, view, implement in 'top'. 7c53d2d Add pg_stat_progress_analyze: implement in 'report'. 4bc08dd Add pg_stat_progress_basebackup: add query, view, implement in 'top'. 8387146 Add pg_stat_progress_basebackup: implement in 'report'. d413cef Add pg_stat_statements WAL usage: add query, view, implement in 'top'. d281ffc Add pg_stat_statements WAL usage: add to 'top' query report. 38d36c4 Add pg_stat_statements WAL usage: implement in 'profile'. 8f1b194 Add templates for issues and feature requests. 82e3710 Check postgres locality using all available addresses from network interfaces. dc3b68a Checking for context cancel when attempting to write stats into the stats channel. Used stats writing operation is blocking, to avoid infinite blocking also listening for context cancellation. 8093f5d Close statCh channel inside the writer function. Fix MainLoop method execution. b20ba2a Dockerfile: use alpine image instead of scratch due ti ot has 'getconf' executable inside. a5c4f51 Fetch 'master' udpates 1f39a3c Make report.readFileStat as stat.NewPGresultFile. 1685e33 Profile: change rows order in report footer. ea188d9 Profile: implement accounting for parallel workers using leader_pid. 1) add cmd flag, 2) make query selection depend on Postgres version. 3d54c8d Profile: implement accounting for parallel workers using leader_pid. 1) getting stats using NewPGresulQuery, 2) add stats parser, 3) refactor accounting, 4) add new and improve existing tests, 5) code blocks re-arrangement, 6) rewrite comments. f1daad9 Profile: rename stats type to waitEventsStat to avoid types/packages name collisions; add and improve comments. 9c7af51 Release notes for v0.8.0 draft. 390bc13 Rename NewPGresult to NewPGresultQuery. d3c97a1 Update go version to 1.16: refactor ioutil usage; update pgcenter and pgcenter-testing docker images, update version in goreleaser. da3e4f9 v0.8.0 release notes: add external links. df1cea5 v0.8.0 release notes: update image links.

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.8.0_checksums.txt(294 bytes)
    pgcenter_0.8.0_linux_amd64.deb(5.57 MB)
    pgcenter_0.8.0_linux_amd64.rpm(5.56 MB)
    pgcenter_0.8.0_linux_amd64.tar.gz(5.56 MB)
  • v0.7.0(Feb 13, 2021)

    Changelog

    fda643b Add GH Actions workflows. d69a7c9 Add TODOs and comments. 96eefb1 Add collector config entity. Read config at collector init. 4238b7f Add comments. 94c01b2 Add executing queries integration tests. 968e3ad Add explicit cast to text to avoid saving numeric values suing scientific notation when scanning values by 'pgx' driver. 3b4c13e Add extra tests for sort method of PGresult. 3ca2f12 Add forgotten comments. c2e3c50 Add goreleaser configuration. 1e61fd3 Add prefill stat collection. da41107 Add query execution test across all supported PG version (from 9.5 to 13). 044ef69 Add test for stat/diskstats. c221fe5 Add test for stat/log, # close conn to postgres after tests. 599a0f9 Add test for stat/log. 4cc393a Add test for stat/postgres, #1. Move align functions to dedicated package. cb30e29 Add test for stat/postgres, #2. Code rearrangement (rename vars, functions). 8f982b7 Add test for stat/stat. 02b41c3 Add test target into Makefile. 7d90705 Add tests for internal/align; adjust function (remove unreachable path). b2fbc55 Add tests for internal/math, internal/postgres. b994b1d Add tests for internal/query, Refactor const names. d47b2e4 Add tests for internal/view. 9c81b1a Add tests for stat/netdev. d3c63e0 Add tests for top/config, top/config_view. 2918fb9 Adding linting #1: - enable golangci-lint; - comment unused code in ethtool. Don't remove it, hope I will use it in future. d540ce0 Adding linting #2: fix variable name. 36fe95a Adding linting #3: fix lint warnings. d4f351d Adding linting #4: fix rest of lint warnings. 06f2efa Adding linting #5: add gosec, fix/suppress gosec warnings. 92e4723 Adjust README, Changelog and docs accordingly to made changes. e77774c Attempt to fix test which hangs when executing under GH Actions, #2. 43b2b31 Attempt to fix test which hangs when executing under GH Actions, #3. bd2207c Avoid unneeded space removing. 7669aa6 Cmd: rename variable name, tiny comments edits. 6919a26 Comment out broken test. 17c49bc Copy 'stat' module to internal/ dir; remove 'context' from the copy; swap stat module in 'top' program. 6154cdb Enable dummy 'record' sub-command. 6c32ff5 Enable dummy report/cmd; refactor functions; add tests. 5f75e1a Enable iostat. 123b843 Enable logtail; move log-related functions to stat pkg. e081a13 Enable netdev (former nicstat). 6d44cc7 Enable the rest of 'report' code. 7780d4f Enabling rest functionality of 'record' sub-command. 8fe0195 Fix error when converting numbers in scientific notation as integers. 62c43c5 Fix file descriptors leak when opening stat/log files. 92f57d8 Fix password prompt when unable connect to Postgres due to failed auth. dc97397 Fix progress. 937916e Fix reconnect to postgres if connection failed. e9fe82c Fix refresh interval logic. 0e7514d Fix statements report queries which produces wrong totals and ratios. c260d08 Fix typo, fix TODO, add another TODO. 45c8bf0 GH Actions: run release workflow only on pushes to 'release' branch. 026b1b5 Help screen edits. 5122663 Introduce new mainLoop() instead of uiLoop(). New loop uses channel approach - one stats collector goroutine collects stats and send it over channel to printer goroutine. 69cfccf Make Configure method of query.Options as a object constructor. 4842aa9 Make lib/ as deprecated. 5548ea0 Make the following functions workings: change refresh interval. b35e7dd Make the following functions workings: open configs in PAGER, EDITOR programs. 9524cff Make the following functions workings: switching between columns, switch sort order, change width. 662b513 Make the following functions workings: switching to pg_stat_statements/pg_stat_progress_* views using menus. b371223 Make the following functions workings: toggle all/user tables, change query age. cc89c7e Make the following functions workings: toggle show idle connections. 9cc2da7 Make views completely switchable. 4ab0d0b Make views switching possible. 9813ec8 Makefile: remove race target, run tests with '-parallel 1' to avoid terminating concurrent postgres processes when executing 'Test_killGroup'. 3fa7bdf Merge pull request #83 from dmfay/master c31f2c0 Minor edits of comments, message templates, errors. 28d958f Minor edits of ethtool.go. 7f0df1b Minor edits of top/help. d767ee7 Minor edits of top/menu, add comments, error handling, add TODOs, add test. 15d02b1 Minor edits of top/pgconfig, edit comments, add error handling. 4a1b4e9 Minor edits, add comments, function rearrangement. 5604376 Move all queries into separate package. d7f7639 Move changeRefresh to top/config_view; add tests. a582ab8 Move global var into app struct. a865f64 Move menu-related global variables into config. e1e18eb Move pgcenter.go into cmd package. 6d07e79 Profile refactoring: add test for cmd/profile. 0b6ffea Profile refactoring: refactor state-changing logic. 85f1868 Profile refactoring: remove global vars, remove use of goroutines, use ticker in loop logic, print data to io.Writer. d933542 Profile refactoring: reorganize logic, add tests. 5bd48bd Profile: enable command. Minor edits in sub-command settings. 6a44ab7 Record: fix continuous recording when running with no startup options/args. Don't close recorder's file descriptor when signalled, it's already done before 'select'. a2ff31a Record: rename 'collector' interface to 'recorder'. 4621041 Record: rename 'truncate' cmd option to 'append' - keep the same as in previous versions. d5585a8 Record: use timer instead of ticker to avoid saving files with duplicated timestamps. 91d0992 Refactor Makefile targets. 72484f2 Refactoring 'stat' module: implement cpu usage stats. 86b37bf Refactoring 'stat' module: implement meminfo stats. 00b21bb Refactoring 'stat' module: implement root structures, add loadavg stats. cf07ecc Refactoring postgres stat code. cf18efe Refactoring top/extra: remove 'aux', add comments, simplify switch-wrapped logic. 310a78d Refactoring top/pgkill: add tests. ff0c3e1 Refactoring: add error handling. 620a11b Refactoring: add proper postgres connection closing on tests. d079dce Refactoring: add tests, minor edits. 70a75cc Refactoring: enable 'config' sub-command. 9eaed79 Refactoring: fix disabling extra stats. 5919fdb Refactoring: increase string limit. 4350663 Refactoring: move errSaved global variable into 'app'. df010ac Refactoring: remove cmdTimer global variable, replace global const with in-place variables. b28bf54 Refactoring: rename doExit to uiExit, remove doUpdate, reorganize exit handler, add tests. 2c001b1 Remove 'context' entity. Introduce 'view' instead and put it to the config. View is a configurable entity which define reflect program behaviour. c5f7a8b Remove 'util' argument in query.NewOptions; fix unused StringLimit option in record. c786241 Remove TODOs related to diskstats/netdev - don't need to fix them. Adjust comments. fba76eb Remove deprecated code, tidy go.mod. 0ed6739 Remove deprecated uiLoop(). 59cac19 Remove global variables in 'top' command: #2 refactor input args in way to moving to use pgx module. 80f3f1c Remove global variables in 'top' command: #3 remove almost all global vars. 38166b9 Remove global variables: #1 move sync.WaitGroup into uiLoop(). 8c9d7ea Remove unnecessary constants. 508d29a Remove unnecessary travis and old goreleaser configs; attempt to fix test which hangs when executing under GH Actions. 2469d98 Rename func and struct names; add 'app' container. 9e82f5e Rename top/error -> top/errrate, make type/method private, add tests. 55a0c57 Report: add initial tests. cdca194 Report: enable 'describe' functionality. 9897848 Report: enable order functionality. e6b2483 Report: fix 'today' dependant tests. ee04c0a Report: fix cmd short parameter for rate; refactor start/end time processing; fix ordering stats; add more tests. b1ca314 Report: fix descriptions for start/end options. 1456357 Report: reorder structs fields; add print header report function; adjust help message accordingly to changes. e4bfe70 Report: round rate interval that less than 1 seconds. be3509b Return error if empty query passed to NewPGresult. 60b53e3 Return fake queryid for pg_stat_statements - it provides uniqueness using single column. f6744c9 Revert changes of showHelp(). f7b55f7 Silence errors and usage messages produced by cmd lib (native errors returned by sub-commands are kept). bd2a794 Simplify views creation: format queries when configure views. 1758b9f Store native config in DB struct instead of driver-specific. c2cd663 Switching to new refactored functions; remove obsoleted code. 174ea15 Temporarily disable all commands except 'top'. d3904e1 Testing, setup dedicated testing environment: - make tests avoid to run against service listening on standard (5432) port. - add pgcenter-testing Dockerfile considered for testing purposes. - converge tests execution in docker image and local execution. 6b4b9d0 Tidy go.mod, minor edits. 4f26fcb Tiny edits in cmd. 2c89c76 Top: add query selector for activity query of pg_stat_statements. 9449144 Top: fix keeping of extra stats after using external utils (psql, pager, editor). 7b7a298 Top: fix printing errors when reading stats failed. c69faab Top: move code to create info string into dedicated function. 6dff5ba Top: refactor dialogPrompts global variable to function. c332fd7 Top: unify dialog-related handlers. 31532c3 Top: use native queryid in pg_stat_statements views, refactor query reports. 15b9708 Update Dockerfile. b2e6321 Use value instead of pointer when working with postgres.Config and TestConfig. a4630e7 When user changes 'view', pass it from UI goroutine to stats goroutine. 46c3b93 merge refactoring branch 9b40a73 postgres connection options processing: fix ignore of PGPORT libpq env var; add processing for PGOPTIONS env var. 08da5d4 preserve spacing when collapsing multiline queries 1350546 record: add 'collector' interface, wrap all tar-based logic into tarCollector; add tests. d274e4c record: adjust cmd help strings; use millisecond interval when using 'oneshot' - ticker panics when getting zero duration value. 1082088 record: implement 'app' container, remove dead code. ed3723d record: replace time.After() with time.Ticker. eef3baf record: return use ticker instead of timer; create filename at the same time when adding the file header. be08d81 stat: move checking postgres state from collectActivityStat() to collector.Update(). 3ca589f top: fix keeping query options in config after app setup. 18ec825 top: fix set/show process mask. a12242c top: fix wrong condition for printing query report. 96eac32 top: improve errors handling when print db stat. 91d0d31 top: make condition for detecting waiting backends more narrow. 4a58790 top: remove obsoleted file-heading comments. 042db5b values/columns aligning: for values longer than column names use width equal to value length, but no longer than 32.

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.7.0_checksums.txt(294 bytes)
    pgcenter_0.7.0_linux_amd64.deb(5.85 MB)
    pgcenter_0.7.0_linux_amd64.rpm(5.85 MB)
    pgcenter_0.7.0_linux_amd64.tar.gz(5.85 MB)
  • v0.6.6(Oct 31, 2020)

  • v0.6.5(May 17, 2020)

    Changelog

    7ee17a8 Merge branch 'dev' 7fd386c Merge branch 'issue-73' into dev 107801a Merge pull request #68 from lesovsky/dev 043994d Merge pull request #69 from lesovsky/dev 8904129 Merge pull request #70 from lesovsky/dev 59c9394 avoid passing zeroes to column widthes when do aligning 89be232 fix LDFLAGS in goreleaser config 8b71426 fix goreleaser changes - it breaks travis builds 7bd2d79 fix report query (G hothkey) 12127bc prepare 0.6.5 - update Changelog 152fb71 simplify Makefile, make cmd-related variables unexported 638491b tidy go modules

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.6.5_checksums.txt(297 bytes)
    pgcenter_0.6.5_Linux_x86_64.deb(4.91 MB)
    pgcenter_0.6.5_Linux_x86_64.rpm(4.90 MB)
    pgcenter_0.6.5_Linux_x86_64.tar.gz(4.92 MB)
  • v0.6.4(Oct 3, 2019)

  • v0.6.3(Oct 3, 2019)

    Changelog

    6340c1f Accept /proc/diskstat metrics with extra fields. e555ab8 Merge branch 'dev' c333d5a Merge pull request #64 from alexeyklyukin/diskstat_newer_kernels ac9aedc added help description about pg_stat_progress_create_index view 7eb887f added menu for switching between progress stats in top utility 40c0f46 added pg_stat_progress_cluster stats to top/record/report utils b669964 added pg_stat_progress_create_index stats 6923412 added stats context related to pg_stat_progress_cluster view ea40b86 added support for pg_stat_database.checksum_failures d170322 adjust header's styles of iostat/nicstat tabs in top utility 77db2dd another try of aligning refactoring - skip aligning if no rows in result set - don't truncate long values, such as names 6f040cf avoid rude disconnection from postgres at top-program exit e7d9a77 describe "pgcenter config" doc more verbosely 73c4701 fix crashes when postgres is not running 477538e fix units 4c84af6 implemented switching between two progress stats e5480d9 improve input args for progress stats in report utility e41c3c8 inject version info at build time 20c8ef7 moved psql hotkey from 'p' to '~' 8bef0e0 readme/changelog changes 5276228 report: print header at the beginning of the output 4a36439 rethinking pg_stat_progress_vacuum query: - wait events merged into single column - changed order of columns - move 'wait events' after 'state' - changed totals to percents for scanned and vacuumed numbers changed reports' buitin docs

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.6.3_checksums.txt(297 bytes)
    pgcenter_0.6.3_Linux_x86_64.deb(2.51 MB)
    pgcenter_0.6.3_Linux_x86_64.rpm(2.46 MB)
    pgcenter_0.6.3_Linux_x86_64.tar.gz(2.53 MB)
  • v0.6.2(Jun 8, 2019)

    Changelog

    91d51a1 Cursor handling improvements 4f61f75 Hide cursor when canceling operation 2250063 Merge pull request #60 from kjoe/dev 0738f4a Merge pull request #61 from kjoe/dev b854b03 Merge pull request #63 from kjoe/feature/cursor 07db7eb Quitting from help and main screens with 'q' key b363876 fix code formatting, misspeling, etc. bd9690e fixed acidentally used case-sensitive pattern matching when accounting number of user-started vacuums 450bc6c record/report: extend "--help" messages 388b682 record/report: improve aligning and truncation of pg_stat_statements.query f9b1499 reworked pg_stat_statements queries e71ec38 rewrite PQconnectdb using connection setup in a loop 59e4bd9 top-like UI highlighting improvements c1293cf top: do polling pg_stat_statements only if it's available (issue #59) 8f1f0a8 top: fixed handling of libpq errors during connection establishment 0079bfd top: printLogtail() tiny refactoring, removed unnecessary retval ef35a4e top: read remote stats only if pgcenter schema exists 5e5565e top: removed notes about deprecated hotkeys; issue #57 a5aa203 v0.6.2

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.6.2_checksums.txt(297 bytes)
    pgcenter_0.6.2_Linux_x86_64.deb(2.51 MB)
    pgcenter_0.6.2_Linux_x86_64.rpm(2.46 MB)
    pgcenter_0.6.2_Linux_x86_64.tar.gz(2.52 MB)
  • v0.6.1(Feb 11, 2019)

  • v0.6.0(Feb 9, 2019)

    Changelog

    680d081 Added dependencies downloading before building c3aed31 Changelog file is returned bf8c8d2 Merge branch 'dev' 0978622 Merge pull request #46 from andyone/master a2ab4d0 added CGO_ENABLED=0 68fb4a8 added goreleaser support 549d54b added wait events profiling fc8dd3b cast all numeric to the same precision 201a688 command management refactoring: config: moved parameters check from main program code to command management code config: emit error if neither '-i' nor '-u' specified profile: emit error if '-P' is not specified d9a5906 doc improvements and fixes bb1eeaa fix division by zero in query to pg_stat_user_functions 4cf170a fix travis config 088705e fix travis config, try 2 f6de7d4 fixed GoReport recommendations top: fix wrong masks handling when cancel/terminate group of backends fixed cyclomatic complexity in functions added proper comments for variables and methods done code formatting 3d5a44a lib/stat: fix wrong calculation of hits values c303834 lib/utils/postgres: remove explicit sslmode from connectin string 90cad1e output aligning rewritten: - fixed aligning for 'top' command - dynamic aligning for 'report' command - two new hotkeys in 'top', have been introduced which allow to change width of active columns (up/down arrows) - column width map moved from PGresult level to Context - aligning is performed once when first stats displayed - stat.Print() marked as deprecated - fixed couple IDE's warnings (unused variables) 3e1ba7a pg_stat_database query fixes: - strict cast of blk_read_time and blk_write_time to numeric helps to avoid some kind of errors in diff/sort operations - show blks_read in kilobytes - clarify builtin help add error check into PGresult.New() 4c91221 profile: added docs and examples b63da12 release 0.6.0 87b64c3 remove tabs from queries (looks ugly when log_destination=syslog) b7d6c3e removed old commented and unused code 6282caf report: extend built-in help b43be09 report: show last processed stats file on error\ when something goes wrong and pgcenter is failed to read stats, it shows name of\ last processes stats file within tar file. It helps to debug what was happened. 49a419e some refactoring in connection handling module: added error handling of pq (go driver) related errors added extra error handling in replaceEmptySettings() rewriten PGhost(), use advanced query for getting 'host' value fixed error when attepmting to connect to non-SSL postgres: 'pq: SSL is not enabled on the server'

    Source code(tar.gz)
    Source code(zip)
    pgcenter_0.6.0_checksums.txt(297 bytes)
    pgcenter_0.6.0_Linux_x86_64.deb(2.51 MB)
    pgcenter_0.6.0_Linux_x86_64.rpm(2.45 MB)
    pgcenter_0.6.0_Linux_x86_64.tar.gz(2.52 MB)
  • 0.4.0(Nov 13, 2017)

    • PostgreSQL 10 support:
      • xlog -> wal changes are implemented.
      • add lag fields into pg_stat_replication.
    • Extended general overview:
      • add max_connections.
      • add info about prepared transactions.
    • Add xact_age and time_age fields into pg_stat_replications.
    • Add backend_type into pg_stat_activity.
    • Add stats_age into pg_stat_database.
    • Some bug fixes and code optimizations.
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Oct 1, 2016)

    Major features:

    • use qsort_r() instead of hand-made sorting - sort is now available for all columns;
    • add filtration feature - it's possible to filter out unnecessary tables/indexes/queries/etc;
    • add pg_stat_progress_vacuum (since 9.6);
    • add compatibility with pg-9.6 (pg_stat_activity) - added wait_event and wait_event_type fields;
    • added autovacuum info: print number of user vacuum and autovac max worker limit;
    • exclude (auto)vacuum tasks accounting in xact_maxtime field;
    • pg_stat_replication rewritten and now works on standbys too;
    • change long queries min age from 500ms to 0ms - now all queries are shown in activity stats;
    • allow to use connection settings from libpq env vars;
    • pg_stat_statements: add local IO information context;
    • pg_stat_statements: use menu and switching; c, v, V hotkeys are removed and X is used instead;
    • remove unnecessary WHERE from pg_stat_statements queries;
    • show details and hint if query has failed;
    • and many many fixes and internal refactoring.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Dec 19, 2015)

  • v0.1.3(Oct 20, 2015)

    add pg_stat_statements improvements. add query detailed report based on pg_stat_statements. add memory system statistics. add support for 9.1.

    Source code(tar.gz)
    Source code(zip)
Owner
Lesovsky Alexey
PostgreSQL DBA at Data Egret
Lesovsky Alexey
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

null 0 Nov 22, 2021
Command-line utility for Postgres-compatible SCRAM-SHA-256 passwords

scram-password -- Command-line utility for Postgres-compatible SCRAM-SHA-256 passwords SCRAM-SHA-256 (see RFC-7677, Salted Challenge Response Authenti

Tv 1 Jan 21, 2022
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Clement Sam 2.1k Dec 4, 2022
A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Venky 0 Dec 22, 2021
git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Gruntwork 690 Nov 30, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command. You give git-xargs:

Maxar Infrastructure 1 Feb 5, 2022
A command line tool for simplified docker volume command built with go

dockervol A command line tool for simplified docker volume command built with go. Features: Remove anonymous volume (beta) Remove volume by matching n

Moh Achun Armando 0 Dec 18, 2021
fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofaX 0x00 Introduction fofax is a fofa query tool written in go, positioned as

null 503 Dec 1, 2022
Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

Geet Sethi 1 Mar 27, 2022
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Rohit Gupta 2.1k Dec 7, 2022
Package command provide simple API to create modern command-line interface

Package command Package command provide simple API to create modern command-line interface, mainly for lightweight usage, inspired by cobra Usage pack

chenen 0 Jan 16, 2022
Command-line tool to load csv and excel (xlsx) files and run sql commands

csv-sql supports loading and saving results as CSV and XLSX files with data processing with SQLite compatible sql commands including joins.

Dhamith Hewamullage 24 Nov 2, 2022
F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely. Written in Go!

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely.

Ayooluwa 578 Dec 6, 2022
textnote is a command line tool for quickly creating and managing daily plain text notes.

textnote is a command line tool for quickly creating and managing daily plain text notes. It is designed for ease of use to encourage the practice of daily, organized note taking. textnote intentionally facilitates only the management (creation, opening, organizing, and consolidated archiving) of notes, following the philosophy that notes are best written in a text editor and not via a CLI.

Daniel Kaslovsky 161 Nov 16, 2022
A command-line tool and library for generating regular expressions from user-provided test cases

Table of Contents What does this tool do? Do I still need to learn to write regexes then? Current features How to install? 4.1 The command-line tool 4

Peter M. Stahl 5.8k Dec 7, 2022
cross platform command line tool to list, notify and book vaccine using cowin API

Command line tool to List and Book Vaccine cowin-cli is a simple cli tool to book vaccines and list centers using the COWIN API. It also supports auto

Anoop S 35 Mar 7, 2022
A command line http test tool. Maintain the case via git and pure text

httptest A command line http test tool Maintain the api test cases via git and pure text We want to test the APIs via http requests and assert the res

wklken 12 Aug 4, 2022
A twitch focused command line tool for producing, archiving and managing live stream content. Built for Linux.

twinx is a live-streaming command line tool for Linux. It connects streaming services (like Twitch, OBS and YouTube) together via a common title and description.

Kris Nóva 26 Oct 17, 2022
A Go library and a command-line tool to manage Docker Swarm clusters

go-swarm go-swarm is a Go library and command-line tool for managing the creation and maintenance of Docker Swarm cluster. Features: Creates new Swarm

AUCloud 3 Jul 26, 2022