Useful PostgreSQL utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Alexey Ermakov 2942fd3042 check_replication_lag.pl improvements: show correct lag when replica is restoring WALs from archive 5 years ago
..
README.md Improve README. 5 years ago
check_replication_lag.pl check_replication_lag.pl improvements: show correct lag when replica is restoring WALs from archive 5 years ago
generate_pgbouncer_userlist.sh add bin/generate_pgbouncer_userlist.sh 11 years ago
log_check.sh Added sueqntial pareser for standard postgresql logs. just for internal using. 7 years ago
makecron.sh replace envsubst with cat in makecron.sh 7 years ago
offlag.sh Introduce offline lag checking script. 5 years ago
postgresql-audit.sh add bin/postgresql-audit.sh 8 years ago
server-audit.sh fix getting pgbouncer version 6 years ago
server-checklist.sh add bin/server-checklist.sh 9 years ago
slony_extract_schema_to_file.sh add bin/ from svn repo 12 years ago
stuff-update.sh stuff-update.sh - added checking of difference betwean downloaded and current version of stuff 8 years ago

README.md

Simple scripts for routine actions

check_replication_lag.pl

Check replication lag of the specified list of replicas. By default, script will list all replicas and their current lag. There is also cron-mode, that will be silent unless specified lag threshold is reached.

Check help output of the script for more details.

generate_pgbouncer_userlist.sh

Straightforward script to dump role into userlist.txt file of pgbouncer.

slony_extract_schema_to_file.sh

Get schema dump without all the Slony-specific stuff. Temporary database will be created to clean up Slony belongings.

stuff-update.sh

This script updates your copy of pg_utils to the actual state. There are two ways for cloning the repository:

  • git pull - just pulls new changes into the local directory
  • wget/curl - downloads repository as the zip archive and unpacks it into the local directory.

offlag.sh

Script to check lag of the local running but offline (not available for queries) database against the provided source:

  • master_host, should be reachable for postgres@postgres
  • WAL segment name as found in the pg_wal directory
  • LSN, as reported by the pg_current_wal_lsn/pg_last_wal_replay_lsn functions.