pgrepup icon indicating copy to clipboard operation
pgrepup copied to clipboard

Handle exceptions on pg_dumpall check failure

Open rtshome opened this issue 8 years ago • 2 comments

rtshome avatar Dec 03 '16 14:12 rtshome

I was successfully replicating, when HD space gone short. I couldn't execute pgrepup stop (no space left on drive)

So i had to exec killall pgrepup

Now each time, i'm trying to run pgrepup check, i'm receiving this.

# pgrepup check
Pgrepup 0.3.7
Global checkings...
 >  Folder /tmp exists and is writable ...........................................OK
Checking Source...
 >  Connection PostgreSQL connection to 10.240.0.2:5432 with user postgres .......OK
 >  pglogical installation .......................................................OK
 >  Needed wal_level setting .....................................................OK
 >  Needed max_worker_processes setting ..........................................OK
 >  Needed max_replication_slots setting .........................................OK
 >  Needed max_wal_senders setting ...............................................OK
 >  pg_hba.conf settings .........................................................OK
 >  Local pg_dumpall version Traceback (most recent call last):
  File "/usr/local/bin/pgrepup", line 25, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/pgrepup/cli.py", line 65, in main
    dispatch(__doc__)
  File "/usr/local/lib/python2.7/dist-packages/pgrepup/helpers/docopt_dispatch.py", line 39, in __call__
    function(**self._kwargify(arguments))
  File "/usr/local/lib/python2.7/dist-packages/pgrepup/commands/check.py", line 108, in check
    c = checks(t, 'pg_dumpall', db_conn=conn)
  File "/usr/local/lib/python2.7/dist-packages/pgrepup/commands/check.py", line 263, in checks
    other_db_version = get_postgresql_version(other_target_conn)
  File "/usr/local/lib/python2.7/dist-packages/pgrepup/helpers/database.py", line 169, in get_postgresql_version
    return get_setting_value(conn, 'server_version')
  File "/usr/local/lib/python2.7/dist-packages/pgrepup/helpers/database.py", line 128, in get_setting_value
    cur = conn.cursor()
AttributeError: 'NoneType' object has no attribute 'cursor'

noizo avatar Apr 05 '17 08:04 noizo

Issue was caused by stopped postgresql service (my fault).

noizo avatar Apr 06 '17 09:04 noizo