Hello community, here is the log from the commit of package check_postgres for openSUSE:Factory checked in at 2019-04-04 12:08:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/check_postgres (Old) and /work/SRC/openSUSE:Factory/.check_postgres.new.3908 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "check_postgres" Thu Apr 4 12:08:22 2019 rev:2 rq:691308 version:2.24.0 Changes: -------- --- /work/SRC/openSUSE:Factory/check_postgres/check_postgres.changes 2018-03-22 12:11:48.127296824 +0100 +++ /work/SRC/openSUSE:Factory/.check_postgres.new.3908/check_postgres.changes 2019-04-04 12:08:26.593381471 +0200 @@ -1,0 +2,11 @@ +Thu Mar 28 20:54:59 UTC 2019 - Martin Hauke <mardnh@gmx.de> + +- Update to version 2.24.0 + * Support new_version_pg for PG10 + * Option to skip CYCLE sequences in action sequence + * Output per-database perfdata for pgbouncer pool checks + * German message translations + * Consider only client backends in query_time and friends +- Use github Source URL + +------------------------------------------------------------------- Old: ---- check_postgres-2.23.0.tar.gz New: ---- check_postgres-2.24.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ check_postgres.spec ++++++ --- /var/tmp/diff_new_pack.NqvcPV/_old 2019-04-04 12:08:27.989380147 +0200 +++ /var/tmp/diff_new_pack.NqvcPV/_new 2019-04-04 12:08:27.989380147 +0200 @@ -1,7 +1,7 @@ # # spec file for package check_postgres # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,19 +12,18 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: check_postgres -Version: 2.23.0 +Version: 2.24.0 Release: 0 Summary: Postgres monitoring script -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring -Url: http://bucardo.org/wiki/Check_postgres -# https://github.com/bucardo/check_postgres/releases -Source0: %{name}-%{version}.tar.gz +URL: http://bucardo.org/wiki/Check_postgres +Source: https://github.com/bucardo/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: nagios-commands-postgres.cfg Source2: create_manpage.pl BuildRequires: nagios-rpm-macros @@ -61,8 +60,8 @@ %package -n monitoring-plugins-postgres Summary: Postgres monitoring script using check_postgres.pl -Group: System/Monitoring # FIXME: use proper Requires(pre/post/preun/...) +Group: System/Monitoring PreReq: %{name} = %{version} Provides: nagios-plugins-postgres = %{version}-%{release} Obsoletes: nagios-plugins-postgres < %{version}-%{release} @@ -103,17 +102,15 @@ perl %{SOURCE2} "%{version}" "1" check_postgres.pl > %{buildroot}/%{_mandir}/man1/check_postgres.pl.1 %files -f %{name}.files -%defattr(-,root,root) %doc MANIFEST README* TODO nagios-commands-postgres.cfg check_postgres.pl.html %if 0%{?suse_version} > 1315 %license LICENSE %else %doc LICENSE %endif -%{_mandir}/man1/check_postgres.pl.1* +%{_mandir}/man1/check_postgres.pl.1%{?ext_man} %files -n monitoring-plugins-postgres -%defattr(-,root,root) # avoid build dependecy of nagios - own the dirs %dir %{nagios_libdir} %dir %{nagios_plugindir} ++++++ check_postgres-2.23.0.tar.gz -> check_postgres-2.24.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/.gitignore new/check_postgres-2.24.0/.gitignore --- old/check_postgres-2.23.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/check_postgres-2.24.0/.gitignore 2018-05-30 13:56:08.000000000 +0200 @@ -0,0 +1,18 @@ +tmp/* +email/* +*.patch +*.diff +*~ +*.orig +Makefile +Makefile.old +pm_to_blib +blib/* +*.tar.gz +test_database_check_postgres* +*.tmp +cover_db/ +check_postgres- +MYMETA.* +/Vagrantfile +.vagrant diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/.perlcriticrc new/check_postgres-2.24.0/.perlcriticrc --- old/check_postgres-2.23.0/.perlcriticrc 1970-01-01 01:00:00.000000000 +0100 +++ new/check_postgres-2.24.0/.perlcriticrc 2019-04-04 12:08:28.057380083 +0200 @@ -0,0 +1 @@ +symbolic link to perlcriticrc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/.travis.yml new/check_postgres-2.24.0/.travis.yml --- old/check_postgres-2.23.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/check_postgres-2.24.0/.travis.yml 2018-05-30 13:56:08.000000000 +0200 @@ -0,0 +1,45 @@ +# run the check_postgres testsuite on travis-ci.com +--- +# versions to run on +env: + - PGVERSION=10 + - PGVERSION=9.6 + - PGVERSION=9.5 + - PGVERSION=9.4 + - PGVERSION=9.3 + - PGVERSION=9.2 + - PGVERSION=9.1 + - PGVERSION=9.0 + - PGVERSION=8.4 + +dist: trusty +sudo: required +language: perl +perl: + - '5.8' # 5.8.8 is shipped with RHEL 5, also oldest version supported by Travis + - '5.24' + +before_install: + - sudo apt-get -qq update + +install: + # install PostgreSQL $PGVERSION if not there yet + - | + if [ ! -x /usr/lib/postgresql/$PGVERSION/bin/postgres ]; then + sudo apt-get install postgresql-common + sudo /etc/init.d/postgresql stop # travis wants only one version running + sudo apt-get install postgresql-contrib-$PGVERSION + fi + - sudo /etc/init.d/postgresql stop + - pg_lsclusters + - dpkg -l postgresql* | cat + - printenv | sort + +script: + - rm -rf test_database_check_postgres* + - perl Makefile.PL + - cpanm --quiet --installdeps --notest . + - PGBINDIR=/usr/lib/postgresql/$PGVERSION/bin make test TEST_VERBOSE=1 + +after_script: + - tail -n 200 test_database_check_postgres*/pg.log diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/META.yml new/check_postgres-2.24.0/META.yml --- old/check_postgres-2.23.0/META.yml 2017-10-29 18:49:53.000000000 +0100 +++ new/check_postgres-2.24.0/META.yml 2018-05-30 13:56:08.000000000 +0200 @@ -1,6 +1,6 @@ --- #YAML:1.0 name : check_postgres.pl -version : 2.23.0 +version : 2.24.0 abstract : Postgres monitoring script author: - Greg Sabino Mullane <greg@endpoint.com> @@ -30,7 +30,7 @@ provides: check_postgres: file : check_postgres.pl - version : 2.23.0 + version : 2.24.0 keywords: - Postgres diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/MYMETA.json new/check_postgres-2.24.0/MYMETA.json --- old/check_postgres-2.23.0/MYMETA.json 2017-10-31 14:29:55.000000000 +0100 +++ new/check_postgres-2.24.0/MYMETA.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,84 +0,0 @@ -{ - "abstract" : "Postgres monitoring script", - "author" : [ - "Greg Sabino Mullane <greg@endpoint.com>" - ], - "dynamic_config" : 0, - "generated_by" : "emacs, CPAN::Meta::Converter version 2.150010", - "keywords" : [ - "Postgres", - "PostgreSQL", - "Nagios", - "monitoring", - "MRTG", - "bloat" - ], - "license" : [ - "bsd" - ], - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" - }, - "name" : "check_postgres.pl", - "prereqs" : { - "build" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "configure" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "runtime" : { - "recommends" : { - "Cwd" : "0", - "File::Comments" : "0", - "File::Temp" : "0", - "Module::Signature" : "0.50", - "Perl::Critic" : "0", - "Pod::Spell" : "0", - "Test::Pod" : "0.95", - "Test::Pod::Coverage" : "0", - "Test::Warn" : "0.08", - "Test::YAML::Meta" : "0.03", - "Text::SpellChecker" : "0", - "Time::HiRes" : "0" - }, - "requires" : { - "ExtUtils::MakeMaker" : "6.64", - "Test::More" : "0.61", - "version" : "0" - } - }, - "test" : { - "requires" : { - "DBD::Pg" : "2.0", - "DBI" : "1.51", - "Date::Parse" : "0" - } - } - }, - "provides" : { - "check_postgres" : { - "file" : "check_postgres.pl", - "version" : "v2.23.0" - } - }, - "release_status" : "stable", - "resources" : { - "bugtracker" : { - "web" : "https://github.com/bucardo/check_postgres/issues" - }, - "homepage" : "http://bucardo.org/check_postgres/", - "license" : [ - "http://bucardo.org/check_postgres/" - ], - "x_MailingList" : "https://mail.endcrypt.com/mailman/listinfo/check_postgres", - "x_Repository" : "git://bucardo.org/check_postgres.git" - }, - "version" : "2.23.0", - "x_serialization_backend" : "JSON::PP version 2.27400_02" -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/MYMETA.yml new/check_postgres-2.24.0/MYMETA.yml --- old/check_postgres-2.23.0/MYMETA.yml 2017-10-31 14:29:55.000000000 +0100 +++ new/check_postgres-2.24.0/MYMETA.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ ---- -abstract: 'Postgres monitoring script' -author: - - 'Greg Sabino Mullane <greg@endpoint.com>' -build_requires: - DBD::Pg: '2.0' - DBI: '1.51' - Date::Parse: '0' - ExtUtils::MakeMaker: '0' -configure_requires: - ExtUtils::MakeMaker: '0' -dynamic_config: 0 -generated_by: 'emacs, CPAN::Meta::Converter version 2.150010' -keywords: - - Postgres - - PostgreSQL - - Nagios - - monitoring - - MRTG - - bloat -license: bsd -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: '1.4' -name: check_postgres.pl -provides: - check_postgres: - file: check_postgres.pl - version: v2.23.0 -recommends: - Cwd: '0' - File::Comments: '0' - File::Temp: '0' - Module::Signature: '0.50' - Perl::Critic: '0' - Pod::Spell: '0' - Test::Pod: '0.95' - Test::Pod::Coverage: '0' - Test::Warn: '0.08' - Test::YAML::Meta: '0.03' - Text::SpellChecker: '0' - Time::HiRes: '0' -requires: - ExtUtils::MakeMaker: '6.64' - Test::More: '0.61' - version: '0' -resources: - MailingList: https://mail.endcrypt.com/mailman/listinfo/check_postgres - Repository: git://bucardo.org/check_postgres.git - bugtracker: https://github.com/bucardo/check_postgres/issues - homepage: http://bucardo.org/check_postgres/ - license: http://bucardo.org/check_postgres/ -version: 2.23.0 -x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/Makefile.PL new/check_postgres-2.24.0/Makefile.PL --- old/check_postgres-2.23.0/Makefile.PL 2017-10-29 18:49:53.000000000 +0100 +++ new/check_postgres-2.24.0/Makefile.PL 2018-05-30 13:56:08.000000000 +0200 @@ -6,7 +6,7 @@ use warnings; use 5.006001; -my $VERSION = '2.23.0'; +my $VERSION = '2.24.0'; if ($VERSION =~ /_/) { print "WARNING! This is a test version ($VERSION) and should not be used in production!\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/README.dev new/check_postgres-2.24.0/README.dev --- old/check_postgres-2.23.0/README.dev 1970-01-01 01:00:00.000000000 +0100 +++ new/check_postgres-2.24.0/README.dev 2018-05-30 13:56:08.000000000 +0200 @@ -0,0 +1,66 @@ + +This file is to help developers of the check_postgres program. +Additions are welcome! + +** TESTSUITE ** + +For testing PostgreSQL 9.2 and later, DBD::Pg 2.19.3 is required. + +Running the testsuite: + +* env -i make test +* LC_ALL=C make test +* initdb and friends not in $PATH: LC_ALL=C make test PGBINDIR=/usr/lib/postgresql/9.2/bin +* Run a single test: LC_ALL=C make test TEST_FILES=t/02_database_size.t +* Skip network tests: LC_ALL=C make test SKIP_NETWORK_TESTS=1 + +The testsuite is sensitive to locale and PG environment variables such as LANG +and PGDATABASE. Using `env -i` will unset all variables from the user +environment for running the tests. + +** RELEASE PROCESS ** + +Quick notes on the current release process: + +* Make sure all changes are recorded in the relevant POD section. +* Add a release date next to the new version number +* Change the version number everywhere (use `RELEASE_TESTING=1 prove -v t/00_release.t` to verify) +* git commit as needed +* Run: perl Makefile.PL; make html +* Run: make signature_asc +* Run: make signature +* Run: git commit -a +* Add a new tag: git tag -u 14964ac8 1.2.3 -m "Version 1.2.3, released August 3, 2009" <commit> +* Run: export TEST_SIGNATURE=1 TEST_CRITIC=1 TEST_SPELL=1 TEST_POD=1 TEST_AUTHOR=1 +* Run: make distclean; perl Makefile.PL; make disttest +* git commit as needed +* Run: make dist +* git push +* git push --tags + +Login to the bucardo.org box, and then: + +* cd code/check_postgres +* git pull +* make distclean; perl Makefile.PL; make disttest; make dist +* prove -v t/00_release.t +* cd ~/www/downloads +* cp -i ~/code/check_postgres/check_postgres* . +* ln -sf <latest tarball> check_postgres.tar.gz +* cd ~/www/check_postgres +* ln -s ../downloads/<latest tarball> . +* edit latest_version.txt +* edit index.html + +* Edit the bucardo.org page and bump the version: http://bucardo.org/check_postgres + +* Email to check_postgres-announce with summary of changes + +* Email the Postgres Weekly News + +* Email pgsql-announce if this is a major version + +Once the new version is out there: + +* Go through and make sure all bugs solved in this release are marked as resolved. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/README.md new/check_postgres-2.24.0/README.md --- old/check_postgres-2.23.0/README.md 2017-10-31 12:12:12.000000000 +0100 +++ new/check_postgres-2.24.0/README.md 2018-05-30 13:56:08.000000000 +0200 @@ -7,10 +7,7 @@ The most complete and up to date information about this script can be found at: -https://bucardo.org/Check_postgres/ - -You should go check there right now to make sure you are installing -the latest version! +https://bucardo.org/check_postgres/ This document will cover how to install the script. @@ -76,10 +73,6 @@ https://github.com/bucardo/check_postgres git clone https://github.com/bucardo/check_postgres.git -All changes are sent to the commit list: - -https://mail.endcrypt.com/mailman/listinfo/check_postgres-commit - COPYRIGHT --------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/check_postgres.pl new/check_postgres-2.24.0/check_postgres.pl --- old/check_postgres-2.23.0/check_postgres.pl 2017-10-31 14:26:28.000000000 +0100 +++ new/check_postgres-2.24.0/check_postgres.pl 2018-05-30 13:56:08.000000000 +0200 @@ -9,7 +9,7 @@ ## End Point Corporation http://www.endpoint.com/ ## BSD licensed, see complete license at bottom of this script ## The latest version can be found at: -## https://bucardo.org/Check_postgres/ +## https://bucardo.org/check_postgres/ ## ## See the HISTORY section for other contributors @@ -33,7 +33,7 @@ binmode STDOUT, ':encoding(UTF-8)'; -our $VERSION = '2.23.0'; +our $VERSION = '2.24.0'; use vars qw/ %opt $PGBINDIR $PSQL $res $COM $SQL $db /; @@ -767,7 +767,7 @@ 'relsize-msg-reli' => q{la plus grosse relation est l'index « $1 » : $2}, 'relsize-msg-relt' => q{la plus grosse relation est la table « $1 » : $2}, 'relsize-msg-tab' => q{la plus grosse table est « $1 » : $2}, - 'relsize-msg-indexes' => q{la table avec les plus grosses indices est « $1 » : $2}, + 'relsize-msg-indexes' => q{la table avec les index les plus volumineux est « $1 » : $2}, 'rep-badarg' => q{Argument repinfo invalide : 6 valeurs séparées par des virgules attendues}, 'rep-duh' => q{Aucun sens à tester la réplication avec les mêmes valeurs}, 'rep-fail' => q{Ligne non répliquée sur l'esclave $1}, @@ -873,8 +873,264 @@ 'checkpoint-po' => q{�as posledn�ho kontroln�ho bodu:}, }, 'de' => { - 'backends-po' => q{tut mir leid, schon zu viele Verbindungen}, - 'checkpoint-po' => q{Zeit des letzten Checkpoints:}, + 'address' => q{Adresse}, + 'age' => q{Alter}, + 'backends-fatal' => q{Kann nicht verbinden: zu viele Verbindungen}, + 'backends-mrtg' => q{DB=$1 Max. Anzahl Verbindungen (max_connections)=$2}, + 'backends-msg' => q{$1 of $2 Verbindungen ($3%)}, + 'backends-nomax' => q{Kann Wert für max_connections nicht bestimmen}, + 'backends-oknone' => q{Keine Verbindungen}, + 'backends-po' => q{Tut mir leid, schon zu viele Clients}, + 'backends-users' => q{$1 als Anzahl Benutzer muss eine Zahl oder ein Prozentwert sein}, + 'bloat-index' => q{(db $1) Index $2 Zeilen:$3 Seiten:$4 sollte sein:$5 ($6X) verschwendete Bytes:$7 ($8)}, + 'bloat-nomin' => q{Keine Relation entsprichten den Kriterien für minimalen Bloat}, + 'bloat-table' => q{(db $1) Tabelle $2.$3 Zeilen:$4 Seiten:$5 sollte sein:$6 ($7X) verschwendete Größe:$8 ($9)}, + 'bug-report' => q{Bitte berichte über diese Details an check_postgres@bucardo.org:}, + 'checkcluster-id' => q{Datenbank-Systembezeichner:}, + 'checkcluster-msg' => q{cluster_id: $1}, + 'checkcluster-nomrtg'=> q{Es muss eine Zahl per Option --mrtg mitgegeben werden}, + 'checkmode-prod' => q{in Produktion}, + 'checkmode-recovery' => q{in der Wiederherstellung aus dem Archiv}, + 'checkmode-state' => q{Zustand des Datenbank-Clusters:}, + 'checkpoint-baddir' => q{Ungültiges Datenverzeichnis (data_directory): "$1"}, + 'checkpoint-baddir2' => q{pg_controldata konnte das angebene Verzeichnis lesen: "$1"}, + 'checkpoint-badver' => q{Kann pg_controldata nicht starten - vielleicht die falsche Version ($1)}, + 'checkpoint-badver2' => q{Fehler beim Start von pg_controldata - ist es die richtige Version?}, + 'checkpoint-nodir' => q{Entweder muss die Option --datadir als Argument angegebn werden, oder die Umgebungsvariable PGDATA muss gesetzt sein}, + 'checkpoint-nodp' => q{Das Perl-Modul Date::Parse muss installiert sein für die Verwendung der checkpoint-Aktion}, + 'checkpoint-noparse' => q{Kann die Ausgabe von pg_controldata nicht lesen: "$1"}, + 'checkpoint-noregex' => q{Kann den regulären Ausdruck für diese Prüfung nicht finden}, + 'checkpoint-nosys' => q{Konnte pg_controldata nicht aufrufen: $1}, + 'checkpoint-ok' => q{Letzter Checkpoint war vor 1 Sekunde}, + 'checkpoint-ok2' => q{Letzter Checkpoint war von $1 Sekunden}, + 'checkpoint-po' => q{Zeit des letzten Checkpoints:}, + 'checksum-msg' => q{Prüfsumme: $1}, + 'checksum-nomd' => q{Das Perl-Modul Digest::MD5 muss installiert sein für die Verwendung der checksum-Aktion}, + 'checksum-nomrtg' => q{Es muss eine Prüfsummer per Option --mrtg mitgegeben werden}, + 'custom-invalid' => q{Ungültiges Format von der benutzerdefinierten Abfrage zurückgeliefert}, + 'custom-norows' => q{Keine Zeilen erhalten}, + 'custom-nostring' => q{Es muss eine Abfrage (Query) mitgegeben werde}, + 'database' => q{Datenbank}, + 'dbsize-version' => q{Die Zieldatenbank muss Version 8.1 oder höher sein für die Verwendung der database_size-Aktion}, + 'depr-pgcontroldata' => q{PGCONTROLDATA ist missbilligt (veraltet), verwende PGBINDIR statt dessen.}, + 'die-action-version' => q{Kann "$1" nicht starten: Die Serverversion muss >= $2 sein, ist aber $3}, + 'die-badtime' => q{Wert für '$1' muss eine gültige Zeit sein. Beispiele: -$2 1s -$2 "10 minutes"}, + 'die-badversion' => q{Ungültiger Versionsstring: $1}, + 'die-noset' => q{Kann "$1" nicht starten, denn $2 ist nicht eingeschaltet (on)}, + 'die-nosetting' => q{Kann die Einstellung '$1' nicht lesen}, + 'diskspace-fail' => q{Ungültiges Ergebnis des Kommandos "$1": $2}, + 'diskspace-msg' => q{Dateisystem $1 gemountet auf $2 verwendet $3 von $4 ($5%)}, + 'diskspace-nodata' => q{Kann das Datenverzeichnis (data_directory) nicht bestimmen: Bist du als superuser verbunden?}, + 'diskspace-nodf' => q{Kann die nötige ausführbare Datei nicht finden /bin/df}, + 'diskspace-nodir' => q{Kann das Datenverzeichnis "$1" nicht finden}, + 'file-noclose' => q{Kann $1 nicht schließen $1: $2}, + 'files' => q{Dateien}, + 'fsm-page-highver' => q{Kann fsm_pages auf Servern mit Version 8.4 oder höher nicht prüfen}, + 'fsm-page-msg' => q{Anzahl benutzter fsm-Seiten: $1 von $2 ($3%)}, + 'fsm-rel-highver' => q{Kann fsm_relations auf Servern mit Version 8.4 oder höher nicht prüfen}, + 'fsm-rel-msg' => q{Anzahl benutzter fsm-Relationen: $1 von $2 ($3%)}, + 'hs-future-replica' => q{Der Slave-Server berichtet, dass die Uhr des Masters vorgeht, Zeitsynchronisation prüfen}, + 'hs-no-role' => q{Dies ist kein Master/Slave-Paar}, + 'hs-no-location' => q{Kann die aktuelle xlog-Position (WAL) auf $1 nicht bestimmen}, + 'hs-receive-delay' => q{Empfangsverzögerung}, + 'hs-replay-delay' => q{Wiederherstellungsverzögerung}, + 'hs-time-delay' => q{Zeitverzug}, + 'hs-time-version' => q{Datenbank muss Version 9.1 oder höher sein um die Verzögerung des Slaves in Zeit anzugeben}, + 'index' => q{Index}, + 'invalid-option' => q{Ungültige Option}, + 'invalid-query' => q{Ungültige Abfrage geliefert: $1}, + 'language' => q{Sprache}, + 'listener-msg' => q{Gefundene Lauscher: $1}, + 'listening' => q{lausche}, + 'locks-msg' => q{Insgesamt "$1" Sperren: $2}, + 'locks-msg2' => q{Sperren insgesamt: $1}, + 'logfile-bad' => q{Ungültige Log-Datei "$1"}, + 'logfile-debug' => q{Letzte Log-Datei: $1}, + 'logfile-dne' => q{Log-Datei $1 existiert nicht!}, + 'logfile-fail' => q{Kann nicht nach $1 loggen}, + 'logfile-ok' => q{logge nach: $1}, + 'logfile-openfail' => q{Kann Log-Datei "$1" nicht öffnen: $2}, + 'logfile-opt-bad' => q{Ungültige Log-Datei-Option}, + 'logfile-seekfail' => q{Positionieren in Datei $1 fehlgeschlagen: $2}, + 'logfile-stderr' => q{Log-Ausgabe wurde umgelenkt auf stderr: bitte einen Dateinamen angeben}, + 'logfile-syslog' => q{Datenbank verwendet syslog, bitte einen Pfad angeben mit der Option --logfile (fac=$1)}, + 'mode-standby' => q{Server im Standby-Modus}, + 'mode' => q{Modus}, + 'mrtg-fail' => q{Aktion $1 fehlgeschlagen: $2}, + 'new-ver-nocver' => q{Konnte die Versionsangabe für $1 nicht downloaden}, + 'new-ver-badver' => q{Konnte die Versionsangabe für $1 nicht verstehen}, + 'new-ver-dev' => q{Kann auf Entwicklungsversionen keinen Versionsvergleich durchführen: Du hast $1 Version $2}, + 'new-ver-nolver' => q{Konnte die lokale Versionsangabe für $1 nicht bestimmen}, + 'new-ver-ok' => q{Version $1 ist die letzte für $2}, + 'new-ver-warn' => q{Bitte aktualisieren auf $1 von $2. Derzeit läuft $3}, + 'new-ver-tt' => q{Deine Datenbank der Version $1 ($2) scheint der aktuellen Version vorauszugehen! ($3)}, + 'no-db' => q{Keine Datenbanken}, + 'no-match-db' => q{Keine passende Datenbank gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-fs' => q{Keine passenden Dateisysteme gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-rel' => q{Keine passenden Relationen gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-set' => q{Keine passenden Einstellungen gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-table' => q{Keine passenden Tabellen gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-user' => q{Keine passenden Einträge gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-slot' => q{Keine passenden Replikationen gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-match-slotok' => q{Keine passenden Replikations-Slots gefunden gemäß den Ausschluss-/Einschluss-Optionen}, + 'no-parse-psql' => q{Konnte die Ausgabe von psql nicht verstehen!}, + 'no-time-hires' => q{Kann Time::HiRes nicht finden, ist aber nötig wenn 'showtime' auf 'wahr' gesetzt ist (true)}, + 'opt-output-invalid' => q{Ungültige Ausgabe: Muss eines sein von 'nagios' oder 'mrtg' oder 'simple' oder 'cacti'}, + 'opt-psql-badpath' => q{Ungültiges Argument für psql: Muss ein vollständiger Pfad zu einer Datei namens psql}, + 'opt-psql-noexec' => q{Die Datei "$1" scheint nicht ausführbar zu sein}, + 'opt-psql-noexist' => q{Kann angegebene ausführbare Datei psql nicht finden: $1}, + 'opt-psql-nofind' => q{Konnte keine geeignete ausführbare Datei psql finden}, + 'opt-psql-nover' => q{Konnte die Version von psql nicht bestimmen}, + 'opt-psql-restrict' => q{Kann die Optionen --PGBINDIR und --PSQL nicht verwenden, wenn NO_PSQL_OPTION eingeschaltet ist (on)}, + 'pgagent-jobs-ok' => q{Keine fehlgeschlagenen Jobs}, + 'pgbouncer-pool' => q{Pool=$1 $2=$3}, + 'pgb-backends-mrtg' => q{DB=$1 max. Anzahl Verbindungen=$2}, + 'pgb-backends-msg' => q{$1 von $2 Verbindungen ($3%)}, + 'pgb-backends-none' => q{Keine Verbindungen}, + 'pgb-backends-users' => q{$1 für die Anzahl Benutzer muss eine Zahl oder ein Prozentwert sein}, + 'PID' => q{PID}, + 'port' => q{Port}, + 'preptxn-none' => q{Keine prepared Transactions gefunden}, + 'psa-disabled' => q{Keine Anfragen - ist stats_command_string oder track_activities ausgeschaltet?}, + 'psa-noexact' => q{Unbekannter Fehler}, + 'psa-nosuper' => q{Keine Treffer - Bitte als superuser ausführen}, + 'qtime-count-msg' => q{Gesamtanzahl Abfragen: $1}, + 'qtime-count-none' => q{Nicht mehr als $1 Abfragen}, + 'qtime-for-msg' => q{$1 Abfragen länger als $2s, längste: $3s$4 $5}, + 'qtime-msg' => q{längste Abfrage: $1s$2 $3}, + 'qtime-none' => q{Keine Abfragen}, + 'query' => q{Abfrage}, + 'queries' => q{Abfragen}, + 'query-time' => q{Abfragezeit (query_time)}, + 'range-badcs' => q{Ungültige Option '$1': Es muss eine Prüfsumme sein}, + 'range-badlock' => q{Ungültige Option '$1': Es muss eine Anzahl Sperren oder "type1=#:type2=#" sein}, + 'range-badpercent' => q{Ungültige Option '$1': Es muss ein Prozentwert sein}, + 'range-badpercsize' => q{Ungültige Option '$1': Es muss eine Größe oder ein Prozentwert sein}, + 'range-badsize' => q{Ungültige Größe für die Option '$1'}, + 'range-badtype' => q{validate_range wurde mit unbekanntem Typen '$1' aufgerufen}, + 'range-badversion' => q{Ungültige Zeichenkette '$2' für die Option '$1'}, + 'range-cactionly' => q{Diese Aktion ist nur für die Benutzung mit cacti und kennt keine warning oder critical Argumente}, + 'range-int' => q{Ungültiges Argument für die Option '$1': Muss eine Ganzzahl sein}, + 'range-int-pos' => q{Ungültiges Argument für die Option '$1': Muss eine natürliche Zahl sein}, + 'range-neg-percent' => q{Negativer Prozentwert ist nicht zulässig!}, + 'range-none' => q{Es werden keine Optionen für warning oder critical benötigt}, + 'range-noopt-both' => q{Sowohl die Option 'warning' als auch 'critical' ist nötig}, + 'range-noopt-one' => q{Es muss eine Option 'warning' oder 'critical' angegeben werden}, + 'range-noopt-only' => q{Es darf nur eine Option 'warning' ODER 'critical' angegeben werden}, + 'range-noopt-orboth' => q{Es muss eine Option 'warning', 'critical' oder beide angegeben werden}, + 'range-noopt-size' => q{Es muss eine Größe für warning und/oder critical angegeben werden}, + 'range-nosize' => q{Es muss eine Größe für warning und/oder critical angegeben werden}, + 'range-notime' => q{Es muss eine Zeit für warning und/oder critical angegeben werden}, + 'range-seconds' => q{Ungültiges Argument für die Option '$1': Es muss eine Sekundenanzahl sein}, + 'range-version' => q{Muss im Format X.Y oder X.Y.Z sein, wobei X die Hauptversionsnummer ist, }, + 'range-warnbig' => q{Der Wert für die Option 'warning' kann nicht größer sein als der für 'critical'}, + 'range-warnbigsize' => q{Der Wert für die Option 'warning' ($1 Bytes) kann nicht größer sein als der für 'critical' ($2 Bytes)}, + 'range-warnbigtime' => q{Der Wert für die Option 'warning' ($1 s) kann nicht größer sein als der für 'critical' ($2 s)}, + 'range-warnsmall' => q{Der Wert für die Option 'warning' darf nicht kleiner sein als der für 'critical'}, + 'range-nointfortime' => q{Ungültiges Argument für die Option '$1': Es muss eine ganze Zahl, eine Zeit oder eine Sekundenanzahl sein}, + 'relsize-msg-ind' => q{Größter Index ist "$1": $2}, + 'relsize-msg-reli' => q{Größte Relation ist der Index "$1": $2}, + 'relsize-msg-relt' => q{Größte Relation ist die Tabelle "$1": $2}, + 'relsize-msg-tab' => q{Größte Tabelle ist "$1": $2}, + 'relsize-msg-indexes' => q{Tabelle mit den größten Indexen ist "$1": $2}, + 'rep-badarg' => q{Ungültiges Argument für repinfo: Es werden 6 durch Komma getrennte Werte erwartet}, + 'rep-duh' => q{Es hat keinen Sinn, die Replikation mit denselben Werten zu testen}, + 'rep-fail' => q{Zeile nicht auf Slave $1 repliziert}, + 'rep-noarg' => q{Benötige ein Argument für repinfo}, + 'rep-norow' => q{Zeile für die Replikation nicht gefunden: $1}, + 'rep-noslaves' => q{Keine Slaves gefunden}, + 'rep-notsame' => q{Kann Replikation nicht testen: Werte stimmen nicht überein}, + 'rep-ok' => q{Zeile wurde repliziert}, + 'rep-sourcefail' => q{Aktualisierung der Quelle fehlgeschlagen}, + 'rep-timeout' => q{Zeile wurde nicht repliziet. Zeitüberschreitung: $1}, + 'rep-unknown' => q{Überprüfung der Replikation fehlgeschlagen}, + 'rep-wrongvals' => q{Kann Replikation nicht testen: Werte stimmen nicht ('$1' weder '$2' noch '$3')}, + 'repslot-version' => q{Datenbank muss in Version 9.4 oder höher vorliegen für die Prüfung von Replikationsslots}, + 'runcommand-err' => q{Unbekannte Fehler innerhalb der Funktion "run_command"}, + 'runcommand-nodb' => q{Keine Zieldatenbanken gefunden}, + 'runcommand-nodupe' => q{Konnte STDERR nicht duplizieren}, + 'runcommand-noerr' => q{Konnte STDERR nicht öffnen?!}, + 'runcommand-nosys' => q{Systemaufruf fehlgeschlagen mit $1}, + 'runcommand-pgpass' => q{Temporäre pgpass-Datei $1 erzeugt}, + 'runcommand-timeout' => q{Zeitüberschreitung bei Kommand! Vielleicht sollte --timeout höher als $1 eingestellt werden}, + 'runtime-badmrtg' => q{Ungültiger Abfragename?}, + 'runtime-badname' => q{Ungültige Option queryname: Es muss ein einfacher Name einer Sicht (View) sein}, + 'runtime-msg' => q{Laufzeit der Abfrage: $1 Sekunden}, + 'schema' => q{Schema}, + 'ss-createfile' => q{Habe Datei $1 erzeugt}, + 'ss-different' => q{"$1" unterscheidet sich:}, + 'ss-existson' => q{Existiert auf:}, + 'ss-failed' => q{Datenbanken waren verschiden. Nicht übereinstimmend: $1}, + 'ss-matched' => q{Alle Datenbanken enthalten dasselbe}, + 'ss-missingon' => q{Fehlt in:}, + 'ss-noexist' => q{$1 "$2" existiert nicht in allen Datenbanken:}, + 'ss-notset' => q{"$1" ist nicht auf allen Datenbanken eingestellt:}, + 'ss-suffix' => q{Fehler: Kann das Suffix nicht verwenden, sofern keine zeitbasierten Schemas verwendet werden}, + 'seq-die' => q{Kann keine Information über die Sequenz $1 finden}, + 'seq-msg' => q{$1=$2% (Aufrufe übrig=$3)}, + 'seq-none' => q{Keine Sequenzen gefunden}, + 'size' => q{Größe}, + 'slony-noschema' => q{Konnte das Schema für Slony nicht finden}, + 'slony-nonumber' => q{Aufruf von sl_status hat keine Zahl zurückgeliefert}, + 'slony-lagtime' => q{Verzögerung von Slony: $1}, + 'symlink-create' => q{Habve "$1" erzeugt}, + 'symlink-done' => q{Erzeuge "$1" nicht: $2 ist bereits verlinkt mit "$3"}, + 'symlink-exists' => q{Erzeuge "$1" nicht: Datei $2 existiert bereits}, + 'symlink-fail1' => q{Kann Verlinkung nicht lösen (unlink) "$1": $2}, + 'symlink-fail2' => q{Kann symbolischen Link $1 auf $2 nicht erzeugen: $3}, + 'symlink-name' => q{Dieses Kommando wird nicht funktionieren, sofern das Wort "postgres" nicht im Namen enthalten ist}, + 'symlink-unlink' => q{Löse Verlinkung "$1":$2 }, + 'table' => q{Tabelle}, + 'testmode-end' => q{ENDE DES TEST-MODUS}, + 'testmode-fail' => q{Verbindung fehlgeschlagen: $1 $2}, + 'testmode-norun' => q{Kann "$1" nicht auf $2 laufen lassen: Version muss >= $3 sein, ist aber $4}, + 'testmode-noset' => q{Kann "$1" nicht auf $2 laufen lassen: $3 ist nicht eingeschaltet (on)}, + 'testmode-nover' => q{Kann Versionsinformation für $1 nicht finden}, + 'testmode-ok' => q{Verbindung OK: $1}, + 'testmode-start' => q{BEGINN DES TEST-MODUS}, + 'time-day' => q{Tag}, + 'time-days' => q{Tage}, + 'time-hour' => q{Stunde}, + 'time-hours' => q{Stunden}, + 'time-minute' => q{Minute}, + 'time-minutes' => q{Minuten}, + 'time-month' => q{Monat}, + 'time-months' => q{Monate}, + 'time-second' => q{Sekunde}, + 'time-seconds' => q{Sekunden}, + 'time-week' => q{Woche}, + 'time-weeks' => q{Wochen}, + 'time-year' => q{Jahr}, + 'time-years' => q{Jahre}, + 'timesync-diff' => q{Differenz}, + 'timesync-msg' => q{Zeitdifferenz=$1 DB=$2 lokal=$3}, + 'transactions' => q{Transactionen}, + 'trigger-msg' => q{Deaktivierte Trigger: $1}, + 'txn-time' => q{Tranaktionszeit (transaktion_time)}, + 'txnidle-count-msg' => q{Insgesamt untätig (idle) in Transaktion: $1}, + 'txnidle-count-none' => q{Nicht mehr als $1 untätig (idle) in Transaktion}, + 'txnidle-for-msg' => q{$1 untätige (idle) Transactionen länger als $2s, längste: $3s$4 $5}, + 'txnidle-msg' => q{Längste untätige Transaktion (idle): $1s$2 $3}, + 'txnidle-none' => q{Keine Transaktionen untätig (idle)}, + 'txntime-count-msg' => q{Transaktionen insgesamt: $1}, + 'txntime-count-none' => q{Nicht mehr als $1 Transaktionen}, + 'txntime-for-msg' => q{$1 Transaktionen länger als $2s, längste: $3s$4 $5}, + 'txntime-msg' => q{Längste Transaktion: $1s$2 $3}, + 'txntime-none' => q{Keine Transaktionen}, + 'txnwrap-cbig' => q{Der Wert für 'critical' muss unter 2 Billionen liegen}, + 'txnwrap-wbig' => q{Der Wert für 'warning' muss unter 2 Billionen liegen}, + 'unknown-error' => q{Unbekannter Fehler}, + 'usage' => qq{\nAnwendung: $1 <Optionen>\n Versuche "$1 --help" für eine komplette Liste der Optionen\n Versuche "$1 --man" für ein komplettes Handbuch\n}, + 'user' => q{Benutzer}, + 'username' => q{Benutzernname}, + 'vac-nomatch-a' => q{Keine passenden Tabellen wurden jemals analyisiert}, + 'vac-nomatch-v' => q{Keine passenden Tabellen wurden jemals vakuumiert}, + 'version' => q{Version $1}, + 'version-badmrtg' => q{Ungültiges Argument für die mrtg Version}, + 'version-fail' => q{Version $1, aber es wurde $2 erwartet}, + 'version-ok' => q{Version $1}, + 'wal-numfound' => q{WAL-Dateien gefunden: $1}, + 'wal-numfound2' => q{WAL "$2" Dateien gefunden: $1}, }, 'fa' => { 'checkpoint-po' => q{زمان آخرین وارسی:}, @@ -1271,6 +1527,7 @@ 'suffix=s', ## used by same_schema only 'replace', ## used by same_schema only 'lsfunc=s', ## used by wal_files and archive_ready + 'skipcycled', ## used by sequence only ); die $USAGE if ! keys %opt and ! @ARGV; @@ -1531,7 +1788,7 @@ $ME --man -Or visit: https://bucardo.org/Check_postgres/ +Or visit: https://bucardo.org/check_postgres/ }; @@ -1742,7 +1999,7 @@ $dbport; $header =~ s/\s+$//; $header =~ s/^ //; - my $perf = ($opt{showtime} and $db->{totaltime} and $action ne 'bloat') ? "time=$db->{totaltime}s" : ''; + my $perf = ($opt{showtime} and $db->{totaltime} and $action ne 'bloat' and $action !~ /^pgb_pool_/ ) ? "time=$db->{totaltime}s" : ''; if ($db->{perf}) { $db->{perf} =~ s/^ +//; if (length $same_schema_header) { @@ -2605,7 +2862,7 @@ else { $string = $arg->{oldstring} || $arg->{string}; for my $row (@{$arg->{version}}) { - if ($row !~ s/^([<>]?)(\d+.?\d+)\s+//) { + if ($row !~ s/^([<>]?)(\d+.?\d+|1\d+)\s+//) { ndie msg('die-badversion', $row); } my ($mod,$ver) = ($1||'',$2); @@ -2728,7 +2985,7 @@ if ($db->{error}) { ndie $db->{error}; } - if ($db->{slurp} !~ /(\d+.?\d+)/) { + if ($db->{slurp} !~ /([789].\d+|1\d+)/) { ndie msg('die-badversion', $db->{slurp}); } $db->{version} = $1; @@ -2979,8 +3236,7 @@ my $limit = $testaction{lc $action} || ''; my $versiononly = shift || 0; - - return if ! $limit and ! $versiononly; + return if ! $limit and ! $versiononly and !defined wantarray; ## We almost always need the version, so just grab it for any limitation $SQL = q{SELECT setting FROM pg_settings WHERE name = 'server_version'}; @@ -2998,8 +3254,11 @@ } my ($sver,$smaj,$smin); + if ( + $info->{db}[0]{slurp}[0]{setting} !~ /^(([2-9]).(\d+))/ && + $info->{db}[0]{slurp}[0]{setting} !~ /^((1\d+)())/ + ){ - if ($info->{db}[0]{slurp}[0]{setting} !~ /^((\d+)(.(:?\d+))?)/) { ndie msg('die-badversion', $SQL); } else { @@ -4356,7 +4615,7 @@ return; } - my $ver = ($db->{slurp}[0]{v} =~ /(\d+.\d+\S+)/) ? $1 : ''; + my $ver = ($db->{slurp}[0]{v} =~ /((?:\b1\d\S+)|(?:\d+.\d+\S+))/) ? $1 : ''; $MRTG and do_mrtg({one => $ver ? 1 : 0}); @@ -5776,8 +6035,10 @@ my $url = shift or die; ## The format is X.Y.Z [optional message] - my $versionre = qr{((\d+).(\d+).(\d+))\s*(.*)}; + my $versionre = qr{((\d+).(\d+)(?:.(\d+))?)(?:\s+(.*))?}; + my ($cversion,$cmajor,$cminor,$crevision,$cmessage) = ('','','','',''); + my $found = 0; ## Try to fetch the current version from the web @@ -5789,16 +6050,21 @@ ## Postgres is slightly different if ($program eq 'Postgres') { $cmajor = {}; - while ($info =~ /<title>(\d+).(\d+).(\d+)/g) { + while ($info =~ /<title>(\d+).(\d+)(?:.(\d+))?/g) { $found = 1; - $cmajor->{"$1.$2"} = $3; + if (defined $3) { + $cmajor->{"$1.$2"} = $3; + } + else { + $cmajor->{$1} = $2; + } } } elsif ($info =~ $versionre) { $found = 1; ($cversion,$cmajor,$cminor,$crevision,$cmessage) = ($1, int $2, int $3, int $4, $5); + $info =~ s/\s+$//s; if ($VERBOSE >= 1) { - $info =~ s/\s+$//s; warn "Remote version string: $info\n"; warn "Remote version: $cversion\n"; } @@ -5835,16 +6101,22 @@ add_unknown msg('new-ver-nolver', $program); return; } - my ($lversion,$lmajor,$lminor,$lrevision) = ($1, int $2, int $3, int $4); + my ($lversion,$lmajor,$lminor,$lrevision) = ('',0,0,0); + if ($2 >= 10 && $program eq 'Postgres') { + ($lversion,$lmajor,$lrevision) = ($1, int $2, int $3); + } else { + ($lversion,$lmajor,$lminor,$lrevision) = ($1, int $2, int $3, int $4); + } + + $output =~ s/\s+$//s; if ($VERBOSE >= 1) { - $output =~ s/\s+$//s; warn "Local version string: $output\n"; warn "Local version: $lversion\n"; } ## Postgres is a special case if ($program eq 'Postgres') { - my $lver = "$lmajor.$lminor"; + my $lver = $lmajor >= 10 ? $lmajor : "$lmajor.$lminor"; if (! exists $cmajor->{$lver}) { add_unknown msg('new-ver-nocver', $program); return; @@ -5852,7 +6124,11 @@ $crevision = $cmajor->{$lver}; $cmajor = $lmajor; $cminor = $lminor; - $cversion = "$cmajor.$cminor.$crevision"; + if ($lmajor >= 10) { + $cversion = "$cmajor.$crevision"; + } else { + $cversion = "$cmajor.$cminor.$crevision"; + } } ## Most common case: everything matches @@ -5926,7 +6202,7 @@ my $info = run_command('SELECT version() AS version'); my $lversion = $info->{db}[0]{slurp}[0]{version}; ## Make sure it is parseable and check for development versions - if ($lversion !~ /\d+.\d+.\d+/) { + if ($lversion !~ /1\d+.\d+|\d+.\d+.\d+/) { if ($lversion =~ /(\d+.\d+\S+)/) { add_ok msg('new-ver-dev', 'Postgres', $1); return; @@ -6260,6 +6536,7 @@ $statsmsg{$i->{database}} = msg('pgbouncer-pool', $i->{database}, $stat, $i->{$stat}); next; } + $db->{perf} = sprintf ' %s=%s;%s;%s', $i->{database}, $i->{$stat}, $warning, $critical; if ($critical and $i->{$stat} >= $critical) { add_critical $msg; @@ -7643,6 +7920,12 @@ ## Warning and critical are percentages ## Can exclude and include sequences + my $skipcycled = $opt{'skipcycled'} || 0; + my $percsql = 'ROUND(used/slots*100)'; + if($skipcycled) { + $percsql = 'CASE WHEN cycle THEN 0 ELSE ' . $percsql . ' END'; + } + my ($warning, $critical) = validate_range ({ type => 'percent', @@ -7697,13 +7980,14 @@ WHERE nspname !~ '^pg_temp.*' ORDER BY nspname, seqname, typname }; - my $SQL10 = q{ -SELECT seqname, last_value, slots, used, ROUND(used/slots*100) AS percent, + my $SQL10 = qq{ +SELECT seqname, last_value, slots, used, $percsql AS percent, CASE WHEN slots < used THEN 0 ELSE slots - used END AS numleft FROM ( SELECT quote_ident(schemaname)||'.'||quote_ident(sequencename) AS seqname, COALESCE(last_value,min_value) AS last_value, - CEIL((max_value-min_value::numeric+1)/increment_by::NUMERIC) AS slots, - CEIL((COALESCE(last_value,min_value)-min_value::numeric+1)/increment_by::NUMERIC) AS used + cycle, + CEIL((max_value-min_value::NUMERIC+1)/increment_by::NUMERIC) AS slots, + CEIL((COALESCE(last_value,min_value)-min_value::NUMERIC+1)/increment_by::NUMERIC) AS used FROM pg_sequences) foo}; ## use critic @@ -7730,12 +8014,13 @@ my $seqname_l = $seqname; $seqname_l =~ s/'/''/g; # SQL literal quoting (name is already identifier-quoted) push @seq_sql, qq{ -SELECT '$seqname_l' AS seqname, last_value, slots, used, ROUND(used/slots*100) AS percent, +SELECT '$seqname_l' AS seqname, last_value, slots, used, $percsql AS percent, CASE WHEN slots < used THEN 0 ELSE slots - used END AS numleft FROM ( SELECT last_value, - CEIL((LEAST(max_value, $maxValue)-min_value::numeric+1)/increment_by::NUMERIC) AS slots, - CEIL((last_value-min_value::numeric+1)/increment_by::NUMERIC) AS used + is_cycled AS cycle, + CEIL((LEAST(max_value, $maxValue)-min_value::NUMERIC+1)/increment_by::NUMERIC) AS slots, + CEIL((last_value-min_value::NUMERIC+1)/increment_by::NUMERIC) AS used FROM $seqname) foo }; } @@ -8041,7 +8326,7 @@ ## We don't GROUP BY because we want details on every connection ## Someday we may even break things down by database - my ($SQL2, $SQL3); + my ($SQL2, $SQL3, $SQL4); if ($type ne 'qtime') { $SQL = q{SELECT datname, datid, procpid AS pid, usename, client_addr, xact_start, current_query AS current_query, '' AS state, }. q{CASE WHEN client_port < 0 THEN 0 ELSE client_port END AS client_port, }. @@ -8073,7 +8358,10 @@ $SQL3 =~ s/'' AS state/state AS state/; $SQL3 =~ s/query_start/state_change/g; - my $info = run_command($SQL, { emptyok => 1 , version => [ "<8.3 $SQL2", ">9.1 $SQL3" ] } ); + ## For Pg 10 and above, consider only client backends + ($SQL4 = $SQL3) =~ s/ WHERE / WHERE backend_type = 'client backend' AND /; + + my $info = run_command($SQL, { emptyok => 1 , version => [ "<8.3 $SQL2", ">9.1 $SQL3", ">10 $SQL4" ] } ); ## Extract the first entry $db = $info->{db}[0]; @@ -8101,8 +8389,8 @@ next if skip_item($r->{datname}); ## We do a lot of filtering based on the current_query or state in 9.2+ - my $cq = $r->{query} // $r->{current_query}; - my $st = $r->{state} // ''; + my $cq = defined($r->{query}) ? $r->{query} : $r->{current_query}; + my $st = defined($r->{state}) ? $r->{state} : ''; ## Return unknown if we cannot see because we are a non-superuser if ($cq =~ /insufficient/) { @@ -8323,7 +8611,7 @@ my ($warning, $critical) = validate_range({type => 'version', forcemrtg => 1}); - my ($warnfull, $critfull) = (($warning =~ /^\d+.?\d+$/ ? 0 : 1),($critical =~ /^\d+.?\d+$/ ? 0 : 1)); + my ($warnfull, $critfull) = (($warning =~ /^(?:1\d+|[789].\d+)$/ ? 0 : 1),($critical =~ /^(?:1\d+|[789].\d+)$/ ? 0 : 1)); my $info = run_command('SELECT version() AS version'); @@ -8433,7 +8721,7 @@ B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.23.0 +This documents describes check_postgres.pl version 2.24.0 =head1 SYNOPSIS @@ -8455,7 +8743,7 @@ ## There are many other actions and options, please keep reading. The latest news and documentation can always be found at: - https://bucardo.org/Check_postgres/ + https://bucardo.org/check_postgres/ =head1 DESCRIPTION @@ -9469,7 +9757,7 @@ Example 2: Same as above, but skip tables belonging to the users 'eve' or 'mallory' - check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d' --excludeusers=eve,mallory + check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d' --excludeuser=eve,mallory For MRTG output, returns (on the first line) the LEAST amount of time in seconds since a table was last vacuumed or analyzed. The fourth line returns the name of the database and name of the table. @@ -9945,7 +10233,8 @@ The I<--warning> and I<--critical> options should be expressed as percentages. The default values are B<85%> for the warning and B<95%> for the critical. You may use --include and --exclude to control which sequences are to be checked. Note that this check does account for unusual B<minvalue> -and B<increment by> values, but does not care if the sequence is set to cycle or not. +and B<increment by> values. By default it does not care if the sequence is set to cycle or not, +and by passing I<--skipcycled> sequenced set to cycle are reported with 0% usage. The output for Nagios gives the name of the sequence, the percentage used, and the number of 'calls' left, indicating how many more times nextval can be called on that sequence before running into @@ -10372,6 +10661,23 @@ =over 4 +=item B<Version 2.24.0> Released May 30, 2018 + + Support new_version_pg for PG10 + (Michael Pirogov) + + Option to skip CYCLE sequences in action sequence + (Christoph Moench-Tegeder) + + Output per-database perfdata for pgbouncer pool checks + (George Hansper) + + German message translations + (Holger Jacobs) + + Consider only client backends in query_time and friends + (David Christensen) + =item B<Version 2.23.0> Released October 31, 2017 Support PostgreSQL 10. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/check_postgres.pl.asc new/check_postgres-2.24.0/check_postgres.pl.asc --- old/check_postgres-2.23.0/check_postgres.pl.asc 2017-10-31 13:26:43.000000000 +0100 +++ new/check_postgres-2.24.0/check_postgres.pl.asc 2018-05-30 13:56:08.000000000 +0200 @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIzBAABCAAdFiEEXEj+YVf0kXlZcIfGTFprqxLSp64FAln4bAIACgkQTFprqxLS -p64SXw//VGONL9FCd0TjqCbEmQ7bA578wG1qpser3sZfHzCWD/83H36MMSfMuubf -O0/ey6iHM9MCwZgklWQulNgJfMeFsiX52x+caJ9auGmHCp7ffCsXfVO8dswBCNPk -DqjhtA2ce+HRc2ABJfSOwx86ehOHR1ZZNN85OAVHUyUt5uoz1uZMql7Tn3py6Pvv -tyDLLZrZWx0wkw5r2/sDojN0N2/9K8uPOEJZorityDj2+s/EBLAMtMSFKel65iR/ -OggaN64+xGKo8mLNSuq7XcrHoTCKR9eAxxDkv+29kUwQ8QYCYioRzFC4/cKSXB62 -Zvp+JVqb9desdYy8LErMrjSz0F1VTWoY8xlXRShmmTskj+aC+RjQP/ETtwkvMA7i -TvJDBd4Xbmz6mTocPVZkNzvou/jC0mA5p17yaZUFR1imyo459xkcLKzuMdkiRHeW -ZAAnKFKIQQByRRx465Y1RJcR6Hfc6G9Cw/rMQRK/wKkZ/VYOHqUPjga1fW13HUMW -PlCShvpwcy6dP27ND1j7pStMc+Y1I2erwZ0pwGiSMysBwRm/F4o8PsvbM1DGdF32 -LJaadklKOiOD+2T9BYSAQwMKc64Anh0f7RWPNdL9Q+tREz/JKIrpypaQi7MOG9HV -Gz0PwJXpanLcS5ky1Fn5WvMMS+C+iimSHtdrjVu1MOIDIp0B5gg= -=CJfx +iQIzBAABCAAdFiEEXEj+YVf0kXlZcIfGTFprqxLSp64FAlsOkQYACgkQTFprqxLS +p64JBw//VCdacZWQ56GJIhkjh2nGnH5rV9PkURQm7NgodE80Yx19EDBBfUiLYTSI +0zNz2V0YwDLQOLFafcD8ZLREpqgnc1KOznShwY1IAE0WrY5ujefRcE5NZLxpimbj +OBONOcXd3n7m2mhyGd2qAlm5WlNDI6WLomq3kXwZReMmx43Z8SLkMnZXl+KSx/Nb +O5zmR4hD07EAZtDzA/t+YToDhGgB38qbbsK4jYtQsVNCt5K8JWhU0MGT0AfVeE7d +r4caCWBYY3v/qrFk/2Zoz9uytVTRMWVXjvPHe2aWPvOY299TG0jLLH10ZaCBcKhZ +XilUN3UAuz7CAr98ZocKamzmURNR/v1b37/yaOj7gAXrx1pRDLn1pKzug62Gncov +jEJaHsLarAxNPCdeeVZKUIGucpoxzxdyYQp7Hb0LA37nuFua5G1evW6cLBCkRhHN +XiMGoPUT1fN0gPcpcAAV995m2/lKywtFNjL0PUU58Gb55rxHNxeksuqSTKdhs1lR +OvtbokDsbeO5rKuKIPlblMa1E8sxluuiqVXBdXsnJApCJYpAxkLWTQPZz79M+bMK +mEBDvQqDci4OgJiLvZ9Ie6Xa1N4bYGoUTBo5xhal6wrawHyIi3iPGcwXQhOnY2f1 +FzfQ1U0JP4emlWGVVA5P63wXWGvbSDuoVdpExa6WOnvjGwNS6Us= +=4I7U -----END PGP SIGNATURE----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/check_postgres.pl.html new/check_postgres-2.24.0/check_postgres.pl.html --- old/check_postgres-2.23.0/check_postgres.pl.html 2017-10-31 13:35:44.000000000 +0100 +++ new/check_postgres-2.24.0/check_postgres.pl.html 2018-05-30 13:56:08.000000000 +0200 @@ -114,7 +114,7 @@ <p><b>check_postgres.pl</b> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others</p> -<p>This documents describes check_postgres.pl version 2.23.0</p> +<p>This documents describes check_postgres.pl version 2.24.0</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> @@ -136,7 +136,7 @@ ## There are many other actions and options, please keep reading. The latest news and documentation can always be found at: - https://bucardo.org/Check_postgres/</code></pre> + https://bucardo.org/check_postgres/</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> @@ -926,7 +926,7 @@ <p>Example 2: Same as above, but skip tables belonging to the users 'eve' or 'mallory'</p> -<pre><code> check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d' --excludeusers=eve,mallory</code></pre> +<pre><code> check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d' --excludeuser=eve,mallory</code></pre> <p>For MRTG output, returns (on the first line) the LEAST amount of time in seconds since a table was last vacuumed or analyzed. The fourth line returns the name of the database and name of the table.</p> @@ -1242,7 +1242,7 @@ <h2 id="sequence1"><b>sequence</b></h2> -<p>(<code>symlink: check_postgres_sequence</code>) Checks how much room is left on all sequences in the database. This is measured as the percent of total possible values that have been used for each sequence. The <i>--warning</i> and <i>--critical</i> options should be expressed as percentages. The default values are <b>85%</b> for the warning and <b>95%</b> for the critical. You may use --include and --exclude to control which sequences are to be checked. Note that this check does account for unusual <b>minvalue</b> and <b>increment by</b> values, but does not care if the sequence is set to cycle or not.</p> +<p>(<code>symlink: check_postgres_sequence</code>) Checks how much room is left on all sequences in the database. This is measured as the percent of total possible values that have been used for each sequence. The <i>--warning</i> and <i>--critical</i> options should be expressed as percentages. The default values are <b>85%</b> for the warning and <b>95%</b> for the critical. You may use --include and --exclude to control which sequences are to be checked. Note that this check does account for unusual <b>minvalue</b> and <b>increment by</b> values. By default it does not care if the sequence is set to cycle or not, and by passing <i>--skipcycled</i> sequenced set to cycle are reported with 0% usage.</p> <p>The output for Nagios gives the name of the sequence, the percentage used, and the number of 'calls' left, indicating how many more times nextval can be called on that sequence before running into the maximum value.</p> @@ -1581,6 +1581,25 @@ <dl> +<dt id="Version-2.24.0-Released-May-30-2018"><b>Version 2.24.0</b> Released May 30, 2018</dt> +<dd> + +<pre><code> Support new_version_pg for PG10 + (Michael Pirogov) + + Option to skip CYCLE sequences in action sequence + (Christoph Moench-Tegeder) + + Output per-database perfdata for pgbouncer pool checks + (George Hansper) + + German message translations + (Holger Jacobs) + + Consider only client backends in query_time and friends + (David Christensen)</code></pre> + +</dd> <dt id="Version-2.23.0-Released-October-31-2017"><b>Version 2.23.0</b> Released October 31, 2017</dt> <dd> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/set_translations.pl new/check_postgres-2.24.0/set_translations.pl --- old/check_postgres-2.23.0/set_translations.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/check_postgres-2.24.0/set_translations.pl 2018-05-30 13:56:08.000000000 +0200 @@ -0,0 +1,201 @@ +#!/usr/bin/perl -- -*-cperl-*- + +## Set and update selected translation strings from the Postgres source +## This only needs to be run by developers of check_postgres, and only rarely +## Usage: $0 --pgsrc=path to top of Postgres source tree +## +## Greg Sabino Mullane <greg@endpoint.com> +## End Point Corporation http://www.endpoint.com/ +## BSD licensed + +use 5.006001; +use strict; +use warnings; +use utf8; +use Getopt::Long qw/GetOptions/; +use Data::Dumper qw/Dumper/; + +use vars qw/ %opt %po /; + +my $USAGE = "$0 --pgsrc=path"; + +die $USAGE unless + GetOptions( + %opt, + 'pgsrc=s', + 'verbose|v+', + ) + and $opt{pgsrc} + and ! @ARGV; + +our $VERBOSE = $opt{verbose} || 0; + +my $basedir = $opt{pgsrc}; + +-d $basedir or die qq{Could not find directory "$basedir"\n}; + +## There is no "en.po", so we force an entry here +%po = ('en' => {}); + +process_po_files($basedir, 'backend/po', %po); + +process_po_files($basedir, 'bin/pg_controldata/po', %po); + +my $file = 'check_postgres.pl'; +open my $fh, '+<', $file or die qq{Could not open "$file": $!\n}; +my ($start,$lang,$quote,$comment,%msg,@lines) = (0,''); +while (<$fh>) { + push @lines, $_; +} + +## List of translatable messages +my %trans; + +for my $line (@lines) { + + ## Do nothing until we are at the start of the translations + if (!$start) { + if ($line =~ /^our %msg/) { + $start = 1; + } + next; + } + + ## Start of a language section + if ($line =~ /^'(\w+)' => {/) { + $lang = $1; + $msg{$lang} = {}; + next; + } + + ## A message + if ($line =~ /^(\s*)'([\w-]+)'\s*=> (qq?){(.+?)}[,.](.*)/) { + my ($space,$msg,$quote,$value,$comment) = (length $1 ? 1 : 0, $2, $3, $4, $5); + $msg{$lang}{$msg} = [$space,$value,$quote,$comment]; + if ($lang eq 'en' and $msg =~ /-po\d*$/) { + $trans{$msg} = $value; + } + next; + } + + ## End of the language section + last if $line =~ /^);/o; +} + +## Plug in any translatable strings we find +for my $ll (sort keys %po) { + next if $ll eq 'en'; + for my $mm (sort keys %{$po{$ll}}) { + my $nn = $po{$ll}{$mm}; + for my $tr (sort keys %trans) { + my $val = $trans{$tr}; + if ($mm =~ /^$val/) { + $nn =~ s/(.+?)\s*%.*/$1/; # remove everything from % on + print "$tr/$ll: $val -> $nn\n"; + length $nn and $msg{$ll}{$tr} = [1,$nn,'q','']; + } + } + } +} + +seek $fh, 0, 0; +$start = 0; + +## Add in all lines up until the translation section: +for my $line (@lines) { + print {$fh} $line; + last if $line =~ /^our %msg/; +} + +my %all_langs = map { $_ => 1} (keys %msg, keys %po); + +## Add in the translated sections, with new info as needed +for my $m (sort { + ## English goes first, as the base class + return -1 if $a eq 'en'; return 1 if $b eq 'en'; + ## Then the fully translated languages + return -1 if $a eq 'es'; return 1 if $b eq 'es'; + return -1 if $a eq 'fr'; return 1 if $b eq 'fr'; + ## Everything else is alphabetical + return $a cmp $b +} keys %all_langs) { + print {$fh} qq!'$m' => {\n!; + my $size = 14; # length of "checkpoint-po" + 1 + for my $msg (keys %{$msg{$m}}) { + $size = length($msg) if length($msg) > $size; + } + + for my $mm (sort keys %{$msg{$m}}) { + printf {$fh} "%s%-*s=> %s{%s},%s\n", + $msg{$m}{$mm}->[0] ? " " : '', + 2+$size, + qq{'$mm'}, + $msg{$m}{$mm}->[2], + $msg{$m}{$mm}->[1], + $msg{$m}{$mm}->[3]; + } + print {$fh} "},\n"; +} + +## Add everything after the translations +$start = 0; +for my $line (@lines) { + if (!$start) { + if ($line =~ /^our %msg/) { + $start = 1; + } + next; + } + if ($start == 1) { + next if $line !~ /^);/o; + $start = 2; + } + print {$fh} $line; +} + + +truncate $fh, tell $fh; +close $fh or warn qq{Could not close "$file": $!\n}; + +exit; + +sub process_po_files { + + my ($dir, $path, $panda) = @_; + + my $podir = ($dir =~ /^src/) ? "$dir/$path" : "$basedir/src/$path"; + + opendir my $dh, $podir or die qq{Could not find directory "$podir"\n}; + my @files = grep { /po$/ } readdir $dh; + closedir $dh or warn qq{Could not closedir $podir\n}; + + for my $file (sort @files) { + (my $lang = $file) =~ s/.po//; + my $pofile = "$podir/$file"; + print "Processing $pofile\n"; + open my $fh, '<', $pofile or die qq{Could not open "$pofile": $!\n}; + 1 while <$fh> !~ /^#,/o; + my $id = ''; + my $isid = 1; + while (<$fh>) { + if (/^msgid "(.*)"/) { + $id = $1; + $isid = 1; + } + elsif (/^msgstr "(.*)"/) { + $panda->{$lang}{$id} = $1; + $isid = 0; + } + elsif (/^"(.*)"/) { + $isid ? ($id .= $1) : ($panda->{$lang}{$id} .= $1); + } + } + close $fh or warn qq{Could not close "$pofile" $!\n}; + } + + return; + +} ## end of process_po_files + + +exit; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/t/02_replicate_row.t new/check_postgres-2.24.0/t/02_replicate_row.t --- old/check_postgres-2.23.0/t/02_replicate_row.t 2017-10-29 18:49:49.000000000 +0100 +++ new/check_postgres-2.24.0/t/02_replicate_row.t 2018-05-30 13:56:08.000000000 +0200 @@ -128,10 +128,10 @@ like ($result, qr{^$label OK:.+Row was replicated}, $t); $result =~ /time=(\d+)/ or die 'No time?'; my $time = $1; - cmp_ok ($time, '>=', 3, $t); + cmp_ok ($time, '>=', 1, $t); } else { - sleep 3; + sleep 2; $SQL = q{UPDATE reptest SET foo = 'yang' WHERE id = 1}; $dbh2->do($SQL); $dbh2->commit(); @@ -160,10 +160,10 @@ $result = $cp->run('DB2replicate-row', '-c 20 --output=simple -repinfo=reptest,id,1,foo,yin,yang'); $result =~ /^(\d+)/ or die 'No time?'; my $time = $1; - cmp_ok ($time, '>=', 3, $t); + cmp_ok ($time, '>=', 1, $t); } else { - sleep 3; + sleep 2; $SQL = q{UPDATE reptest SET foo = 'yang' WHERE id = 1}; $dbh2->do($SQL); $dbh2->commit(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/t/02_same_schema.t new/check_postgres-2.24.0/t/02_same_schema.t --- old/check_postgres-2.23.0/t/02_same_schema.t 2017-07-25 16:05:29.000000000 +0200 +++ new/check_postgres-2.24.0/t/02_same_schema.t 2018-05-30 13:56:08.000000000 +0200 @@ -79,7 +79,6 @@ } ## end of drop_language - #goto TRIGGER; ## ZZZ #/////////// Languages @@ -622,8 +621,8 @@ qr{^$label CRITICAL.*Items not matched: 1 .* \s*Index "public.valen": \s*"indexdef" is different: -\s*Database 1: CREATE INDEX valen ON gkar USING btree (garibaldi) -\s*Database 2: CREATE UNIQUE INDEX valen ON gkar USING btree (garibaldi) +\s*Database 1: CREATE INDEX valen ON (?:public.)?gkar USING btree (garibaldi) +\s*Database 2: CREATE UNIQUE INDEX valen ON (?:public.)?gkar USING btree (garibaldi) \s*"indisunique" is different: \s*Database 1: f \s*Database 2: t\s*$}s, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_postgres-2.23.0/t/02_sequence.t new/check_postgres-2.24.0/t/02_sequence.t --- old/check_postgres-2.23.0/t/02_sequence.t 2017-07-25 16:05:29.000000000 +0200 +++ new/check_postgres-2.24.0/t/02_sequence.t 2018-05-30 13:56:08.000000000 +0200 @@ -6,7 +6,7 @@ use strict; use warnings; use Data::Dumper; -use Test::More tests => 14; +use Test::More tests => 16; use lib 't','.'; use CP_Testing; @@ -47,6 +47,7 @@ $cp->drop_sequence_if_exists($seqname); $cp->drop_sequence_if_exists("${seqname}2"); $cp->drop_sequence_if_exists("${seqname}'"evil"); +$cp->drop_sequence_if_exists("${seqname}_cycle"); $cp->drop_table_if_exists("$testtbl"); $t=qq{$S works when no sequences exist}; @@ -100,8 +101,16 @@ $t=qq{$S handles SQL quoting}; like ($cp->run(''), qr{OK:.+'public."${seqname}''""evil"'}, $t); # extra " and ' because name is both identifier+literal quoted +# test CYCLE sequence skipping +$dbh->do(qq{CREATE SEQUENCE ${seqname}_cycle MAXVALUE 5 CYCLE}); +$dbh->commit(); +$dbh->do("SELECT setval('${seqname}_cycle',5)"); +like ($cp->run('--skipcycled'), qr{OK:.+public.cp_test_sequence_cycle=0%;85%;95% }, $t); +like ($cp->run(''), qr{CRITICAL:.+public.cp_test_sequence_cycle=100% (calls left=0) }, $t); + $dbh->do("DROP SEQUENCE ${seqname}"); $dbh->do("DROP SEQUENCE ${seqname}2"); +$dbh->do("DROP SEQUENCE ${seqname}_cycle"); $dbh->do(qq{DROP SEQUENCE "${seqname}'""evil"}); # test integer column where the datatype range is smaller than the serial range