Giter VIP home page Giter VIP logo

pgcenter's Introduction

Web site GitHub release Github Actions 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. The 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 seeing what wait events occur during queries execution. See details here.

Quick start

Pull Docker image from DockerHub; run pgcenter and connect to the database.

docker pull lesovsky/pgcenter:latest
docker run -it --rm lesovsky/pgcenter:latest pgcenter top -h 1.2.3.4 -U user -d dbname

Supported statistics

PostgreSQL statistics
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.
  • mounted filesystems' usage statistics: total size, amount of free/used/reserved space and inodes.

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

Install notes

Packages for DEB, RPM, APK are available on releases page.

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 using it on alternative systems because it will not operate properly.

pgCenter supports a wide range of PostgreSQL versions, despite the 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 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, testing and contribution

To help development you are encouraged to:

  • provide suggestion/feedback or issue (follow the provided issue template carefully).
  • pull requests for bug fixes of improvements; this docs might be helpful.
  • star the project

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.

pgcenter's People

Contributors

andyone avatar dmfay avatar dmgk avatar kjoe avatar lesovsky avatar montaguethomas avatar seamusabshere avatar wd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pgcenter's Issues

ERROR: numeric field overflow (STATEMENT: SELECT (sum(total_time) / sum(calls))::numeric(6,3) AS avg_query, sum(calls) AS total_calls FROM pg_stat_statements)

PostgreSQL version:
9.4.4

postgresql.conf:
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.max = 10000
pg_stat_statements.track = 'all'
pg_stat_statements.save = off

track_io_timing = on
log_lock_waits = on
log_temp_files = 0
track_activities = on
track_counts = on
track_functions = all

Operating system/version:
Debian GNU/Linux 8
3.16.0-4-amd64

pgcenter-0.4.0 installed from source.

PostgreSQL log:
ERROR: numeric field overflow
DETAIL: A field with precision 6, scale 3 must round to an absolute value less than 10^3.
STATEMENT: SELECT (sum(total_time) / sum(calls))::numeric(6,3) AS avg_query, sum(calls) AS total_calls FROM pg_stat_statements

segfault when switching to activity mode

As you've already warned in readme, segfauls might appear.
Most of the time, I want to switch to 'a' activity mode, I'm getting a segfault.

Which information do you need to fix the problem?

My system:´´´Linux tobwen 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) x86_64 GNU/Linux´´´

My PostgreSQL: 9.4.5-0+deb8u1

Error Can't locate Linux/Ethtool/Settings.pm

Regards

when I try to configure it gives me the following error:

ERROR: Can't locate Linux/Ethtool/Settings.pm in @inc (you may need to install the Linux::Ethtool::Settings module) (@inc contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl .) at line 2.
BEGIN failed--compilation aborted at line 2.
DETAIL:
HINT:
STATEMENT: CREATE FUNCTION pgcenter.get_netdev_link_settings(INOUT iface CHARACTER VARYING, OUT speed BIGINT, OUT duplex INTEGER) RETURNS RECORD
LANGUAGE plperlu
AS $$
use Linux::Ethtool::Settings;
if (my $settings = Linux::Ethtool::Settings->new($[0])) {
my $if_speed = $settings->speed();
my $if_duplex = $settings->duplex() ? 1 : 0;
return {iface => $
[0], speed => $if_speed, duplex => $if_duplex};
} else {
return {iface => $_[0], speed => 0, duplex => -1};
}
$$;
captura de pantalla de 2018-10-03 23-32-45

./pgcenter: cannot execute binary file

git clone https://github.com/lesovsky/pgcenter.git --single-branch --depth=1

$ make
go mod download
CGO_ENABLED=0 GOOS=linux GOARCH= go build -ldflags "-X main.COMMIT=9b148b446e53d558191fa63e86843bb0ae79cd86 -X main.BRANCH=master" -o pgcenter pgcenter.go

$ ./pgcenter
-bash: ./pgcenter: cannot execute binary file

$ ls -la pgcenter
-rwxr-xr-x 1 olleg staff 9053984 11 фев 15:06 pgcenter

MacOs 10.14.2,
$ go version
go version go1.11.5 darwin/amd64

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.

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

Is there any document for how to use pgcenter

I want to test record and report feature and do like this.

pgcenter -h 127.0.0.01 -U postgres  record -f zabbix.tar -d zabbix
INFO: recording to zabbix.tar
 pgcenter -h 127.0.0.01 -U postgres  report -f zabbix.tar 
'pgcenter report' reads statistics from file and prints reports.

Usage:
  pgcenter report [OPTIONS]...

Options:
  -f, --file			read stats from file (default: pgcenter.stat.tar)
  -s, --start			starting time of the report (format: [YYYYMMDD-]HHMMSS)
  -e, --end			ending time of the report (format: [YYYYMMDD-]HHMMSS)
  -o, --order			order values by column (default descending, use '+' sign before a column name for ascending order)
  -g, --grep			filter values in specfied column (format: colname:filtertext)
  -l, --limit			print only limited number of rows per sample (default: unlimited)
  -t, --truncate		maximum string size to print (default: 32)
  -i, --interval		delta interval (default: 1s)

Report options:
  -A, --activity		show pg_stat_activity statistics
  -S, --sizes			show statistics about tables sizes
  -D, --databases		show pg_stat_database statistics
  -F, --functions		show pg_stat_user_functions statistics
  -R, --replication		show pg_stat_replication statistics
  -T, --tables			show pg_stat_user_tables statistics
  -I, --indexes			show pg_stat_user_indexes and pg_statio_user_indexes statistics
  -V, --vacuum			show pg_stat_progress_vacuum statistics
  -X, --statements [X]		show pg_stat_statements statistics, use additional selector to choose stats.
				'm' - timings; 'g' - general; 'i' - io; 't' - temp files io; 'l' - local files io. 

  -d, --describe		show statistics description, combined with one of the report options

General options:
  -?, --help		show this help and exit
      --version		show version information and exit

Report bugs to https://github.com/lesovsky/pgcenter/issues

Should I create pgcenter database?

When I run pgcenter,something is wrong.
I check pglog,found some error such as :

ERROR: relation "pgcenter.sys_proc_diskstats" does not exist
Statement: SELECT count(1) FROM pgcenter.sys_proc_diskstats
AND
Statement: SELECT count(1) FROM pgcenter.sys_proc_netdev,etc.

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.

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.

SIGSEGV when trying to start iostat.

pgCenter crashes when trying to start iostat (B hotkey).
gdb output

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000407bfe in print_iostat (window=0x11b3380, w_cmd=0x11ac260, c_ios=0x7ffcb2b95100, p_ios=0x7ffcb2b94ff0, bdev=32, repaint=0x7ffcb2b9528f) at pgcenter.c:1689
1689            c_ios[i]->major = major;

Catched on systems with too many lines in /proc/diskstats.

Installation issues

nikolay@dev:~/github$ cd pgcenter/
nikolay@dev:~/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
nikolay@dev:~/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

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 postgres@postgres failed.

When the pgcenter is started, temporary files are generated.

Hi!
On some databases, when the pgcenter is started, temporary files are generated.

LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp112190.57", size 26511854
2018-09-06 15:49:14 MSK 5b912212.1b63e [112190-116] [local] postgres@mydb STATEMENT: SELECT (sum(total_time) / sum(calls))::numeric(20,2) AS avg_query, sum(calls) AS total_calls FROM pg_stat_statements


work_mem = 512MB
PostgreSQL 9.4

relation "pg_stat_statements" does not exist at character 98

relation "pg_stat_statements" does not exist at character 98

2017-09-22 16:12:14 CST [32277-46833] postgres@postgres ERROR: relation "pg_stat_statements" does not exist at character 98
2017-09-22 16:12:14 CST [32277-46834] postgres@postgres STATEMENT: SELECT (sum(total_time) / sum(calls))::numeric(6,3) AS avg_query, sum(calls) AS total_calls FROM pg_stat_statements

Can not install stats schema and functions into the database.

------------>command:
pgcenter -h localhost -p 5432 -U xdb -d testdb -i

------------>Message return:
INFO: installing stats schema into xdb@localhost:5432/testdb
ERROR: install stats schema into xdb@localhost:5432/testdb failed:
ERROR: Can't locate Linux/Ethtool/Settings.pm in @inc (@inc contains: /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/s

Compile problem on Debian 6

I am on Debian 6/Squeeze, and I get this error on the compile:

cc -g -std=gnu99 -Wall -pedantic -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -o pgcenter pgcenter.c -L/usr/lib -lncurses -lmenu -lpq
pgcenter.c: In function ‘get_speed_duplex’:
pgcenter.c:1701: error: ‘DUPLEX_UNKNOWN’ undeclared (first use in this function)
---------------------------

PostgreSQL 10 support: ERROR: function pg_current_xlog_location() does not exist

Hi,
first of all -- thank you for the great tool, we have successfully used it with PostgreSQL 9.6. After upgrade to version 10.0, click on 'r' replication returns an error:
ERROR: function pg_current_xlog_location() does not exist

I assume, the reason for it is -- function pg_current_xlog_location is renamed to pg_current_wal_lsn. More about new function names -- https://wiki.postgresql.org/wiki/New_in_postgres_10#Renaming_of_.22xlog.22_to_.22wal.22_Globally_.28and_location.2Flsn.29

Can you please look into it? Thanks in advance.

Need screenshots

pgcenter sounds like it has a lot of awesome features. Even so, the UI could make or break it for me... It would be great to see a few screenshots of the tool in action to avoid having to install and configure it.

question on repository

Hi,

is it possible to push release 0.5 to community repository (download.postgresql.org) please ?

Thank you.

Best Regards

ERROR: auth failed

pgcenter top -h localhost -U postgres -d mydb

pgcenter: 2018-12-15 14:59:21, load average: 0.00, 0.00, 0.00                                                         state [failed]: localhost:5432 postgres@iodb (ver: , up , recovery: )
    %cpu:  0.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st                                        activity:  0/0 conns,  0/0 prepared,  0 idle,  0 idle_xact,  0 active,  0 waiting,  0 others
 MiB mem:      0 total,      0 free,      0 used,        0 buff/cached                                                autovacuum:  0/0 workers/max,  0 manual,  0 wraparound, --:--:-- vac_maxtime
MiB swap:      0 total,      0 free,      0 used,      0/0 dirty/writeback                                            statements:   0 stmt/s, 0.000 stmt_avgtime, --:--:-- xact_maxtime, --:--:-- prep_maxtime

ERROR: auth failed
DETAIL:
HINT:

I even have a pgcenterrc file like this:
localhost:5432:mydb:postgres:mypassword

I can do psql like this:
psql -h localhost -U postgres mydb -p 5432

Historical data

Hi,

Can i get historical data using this tool ? If yes, How? Please send document link if available.

Regards,
Sachin

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

Error when calling make

Ubuntu 12.04 LTS, Postgres 9.2 running on the latest vagrant:

vagrant@precise64:$ git clone https://github.com/lesovsky/pgcenter
Cloning into 'pgcenter'...
remote: Counting objects: 861, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 861 (delta 1), reused 0 (delta 0), pack-reused 853
Receiving objects: 100% (861/861), 344.22 KiB | 292 KiB/s, done.
Resolving deltas: 100% (438/438), done.
vagrant@precise64:
$ cd pgcenter
vagrant@precise64:/pgcenter$ make
cc -g -std=gnu99 -Wall -pedantic -I/usr/include/postgresql -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -o pgcenter pgcenter.c -lpq -lncurses -ltinfo -lmenu
pgcenter.c:15:18: fatal error: menu.h: No such file or directory
compilation terminated.
make: *** [pgcenter] Error 1
vagrant@precise64:
/pgcenter$

Improve const-correctness

I suggest to add the key word "const" to the type specifiers for parameters like the following.

Would you like to apply the advices from an article to more places in your source files?

pgcenter crashes when no running postgres

no running postgres

$ ps aux|grep postgres
lesovsky  8716  0.0  0.0  15652  1080 pts/5    S+   19:30   0:00 grep --colour=auto postgres

trying to run pgcenter and oops.

$ pgcenter top
panic: interface conversion: error is *net.OpError, not *pq.Error

goroutine 1 [running]:
github.com/lesovsky/pgcenter/lib/utils.PQconnectdb(0xb02f60, 0xc00001a240, 0x25, 0x6b19d0, 0x7919a0, 0x0)
        /home/lesovsky/Git/pgcenter/lib/utils/postgres.go:87 +0x4fc
github.com/lesovsky/pgcenter/lib/utils.CreateConn(0xb02f60, 0x0, 0x0, 0xb02f60)
        /home/lesovsky/Git/pgcenter/lib/utils/postgres.go:44 +0x3d
github.com/lesovsky/pgcenter/top.RunMain(0xb1ff08, 0x0, 0x0, 0x0, 0x0, 0x1538, 0x0, 0x0, 0x0, 0x0, ...)
        /home/lesovsky/Git/pgcenter/top/top.go:29 +0xbf
github.com/lesovsky/pgcenter/cmd/top.glob..func1(0xafea60, 0xb1ff08, 0x0, 0x0)
        /home/lesovsky/Git/pgcenter/cmd/top/top.go:23 +0x72
github.com/spf13/cobra.(*Command).execute(0xafea60, 0xb1ff08, 0x0, 0x0, 0xafea60, 0xb1ff08)
        /home/lesovsky/Git/go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xafde80, 0x73f498, 0xc000057f88, 0xc00001c1d8)
        /home/lesovsky/Git/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2c0
github.com/spf13/cobra.(*Command).Execute(...)
        /home/lesovsky/Git/go/pkg/mod/github.com/spf13/[email protected]/command.go:800
main.main()
        /home/lesovsky/Git/pgcenter/pgcenter.go:8 +0x2e

Small problem when runing pgcenter with AmazonRDS.

Hello! I don't now it's an issue or smth else, but this can be useful.

When I try to run pgcenter with AmazonRDS and touch "x" for switching to pg_stat_statements, I catched error: "ERROR: permission denied for relation pg_authid".

Trouble is that the "pg_authid" system table is not accessible even for the RDS master user because it stores information (passwords) that needs to be protected to maintain service security and stability.
But subset of "pg_authid" information is available in "pg_roles" but the latter table doesn't contain user passwords.

So I had to change some files from you source code.

sed -i 's/pg_authid/pg_roles/g' ./share/doc/pgcenter.1
sed -i 's/pg_authid/pg_roles/g' ./src/include/qstats.h
sed -i 's/pg_authid/pg_roles/g' ./src/include/queries.h

After make && make install and pg_stat_statements working fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.