This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name, current_setting(name), source, sourcefile, sourceline FROM pg_settings WHERE (source <> 'default' OR name = 'server_version') AND name NOT IN ('config_file', 'data_directory', 'hba_file', 'ident_file'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SERVER pgbouncer FOREIGN DATA WRAPPER dblink_fdw OPTIONS(host 'localhost', port '6432', dbname 'pgbouncer'); | |
CREATE USER MAPPING FOR PUBLIC SERVER pgbouncer OPTIONS(user 'postgres'); | |
CREATE SCHEMA IF NOT EXISTS pgbouncer; | |
CREATE VIEW pgbouncer.active_sockets AS | |
SELECT a.type, | |
a."user", | |
a.database, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- CentOS | |
-- | |
sudo yum update -y | |
sudo yum groupinstall "Development Tools" | |
sudo yum install -y cmake | |
-- | |
-- go to https://yum.postgresql.org/repopackages.php | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# pgquarrel source | |
PGQPATH=$HOME/pgquarrel | |
# Ubuntu 18.04 (bionic) | |
#ORIGPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin | |
# Ubuntu 16.04 (xenial) | |
#ORIGPATH=/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin | |
# Debian (stretch) |