Table of Contents

Postgresql

 
psql -h 192.168.1.100 -p 5432 -U u1 mydatabase
 
 
import psycopg2
conn = psycopg2.connect("host='10.59.1.50' dbname='DB' user='perm' password='perm'")

Interesting sites

PostgreSQL

Draw Db diagram

Kubernetes - postgres VIEW

Postgres.Cmd

Postgres.System commands

Star stop init db create databases

Postgres.PSQL

psql - cheatsheet

Postgres.Sql

Sql.interesting sql

Sql.system

SQL check version/size

Find objects and fields

Sql.check

SQL check database data

SQL List index

SQL check database index - amcheck verify tbl b-tree Indexes

Sql.Generate Data

SQL generate database data

Sql.JSONB

SQL json examples

Postgres.DATA

Загрузка управления и обработка

SQL.COPY load from DB

SQL.COPY load data to DB

Postgres.DBA

Describe of admin tasks

Bloat - MVCC - transaction - Get current xmin - PageInspector

Get ddl dump for table

Situation with Invalid page header encountered: blockNo 0, path .... base/16384/923678

Postgres.DBA locale collation LC_COLLATE setlocale

localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.utf8
export LANG=ru_RU.utf8

Postgres.DBA users privileges grant

Users manipulation

Postgres.DBA dependencies

dependencies - pg_depend get info

dependencies - pg_depend Hierarchies

dependencies - pg_depend Recursive Hierarchies - объекты ссылающиеся на объект исследования

PG_rewrite / PG_constraint details

Postgres.DBA extensions / function

extensions / function - get list of function

Postgres.DBA partition

Partition - get info

Partition - Example creation

Partition - Auto create partition

Postgres.Backup

Резервное копирование pg_dump и pg_restore

SQL pg_dump/pg_restore

Postgres.Backup.Wal-g wal-g

Wal-g.Backup статьи

Wal-g.Backup резервного копирования

Backup Порядок действий и инструкции

WAL-G.restore восстановление

Walg restore восстановление

PostgresPro

Postgres Cluster

https://github.com/vitabaks/postgresql_cluster

Postgres Information , monitoring , performance , tools

Postgres.Monitoring

Postgres.performance

Usefull tools

Postgresql Partition

Postgres Install

Postgres Additional info