This file contains hidden or 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
| [root@etcd01 ~]# cd /etc/ssl/ | |
| [root@etcd01 ~]# mkdir etcd | |
| [root@etcd01 ~]# cd etcd | |
| [root@etcd01 ~]# cat csr_details.txt | |
| [ req ] | |
| default_bits = 2048 | |
| default_md = sha256 | |
| req_extensions = v3_req | |
| distinguished_name = dn | |
| prompt = no |
This file contains hidden or 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
| [root@etcd02 ~]# cat /etc/ssl/etcd/server.crt /etc/ssl/etcd/server.key >> /etc/ssl/etcd/haproxy_combined.crt | |
| [root@etcd02 ~]# vi /etc/haproxy/haproxy.cfg | |
| global | |
| maxconn 4096 | |
| defaults | |
| log global | |
| mode tcp | |
| timeout client 30m |
This file contains hidden or 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
| [postgres@posvt01 ~]$ vi /etc/patroni.yml | |
| ... | |
| postgresql | |
| ... | |
| connect_address: posvt01.localdomain:3535 | |
| ... | |
| parameters: | |
| unix_socket_directories: '/var/run/postgresql' | |
| archive_command: "pgbackrest --stanza=pg-cluster1 archive-push %p" | |
| restore_command: "pgbackrest --stanza=pg-cluster1 archive-get %f %p" |
This file contains hidden or 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
| #-- Some security related parameters -- set on all postgresql servers | |
| [postgres@posvt01 ~]$ vi /etc/patroni.yml | |
| ... | |
| restapi: | |
| listen: posvt01.localdomain:3308 | |
| connect_address: posvt01.localdomain:3308 | |
| certfile: /etc/ssl/postgres/server.crt | |
| keyfile: /etc/ssl/postgres/server.key | |
| cafile: /etc/ssl/postgres/root.crt | |
| authentication: |
This file contains hidden or 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
| [postgres@posvt01 ~]# vi csr_details.txt | |
| [ req ] | |
| default_bits = 2048 | |
| default_md = sha256 | |
| req_extensions = v3_req | |
| distinguished_name = dn | |
| prompt = no | |
| [ dn ] | |
| C = TR |
This file contains hidden or 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
| SQL> ALTER SYSTEM SET SPATIAL_VECTOR_ACCELERATION = TRUE; |
This file contains hidden or 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
| SQL> WITH queries_to_measure AS ( | |
| SELECT DISTINCT | |
| sql_id | |
| FROM | |
| gv$sql | |
| WHERE | |
| parsing_schema_name = :app_user | |
| AND upper(sql_fulltext) LIKE '%SDO\_%' ESCAPE '\' | |
| ), before_performance AS ( | |
| SELECT |
This file contains hidden or 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
| [postgres@posvt01 ~]$ patronictl -c /etc/patroni.yml remove pgcluster | |
| + Cluster: pgcluster (7099446795009447890) -----+ | |
| | Member | Host | Role | State | TL | Lag in MB | | |
| +--------+------+------+-------+----+-----------+ | |
| +--------+------+------+-------+----+-----------+ | |
| Please confirm the cluster name to remove: pgcluster | |
| You are about to remove all information in DCS for pgcluster, please type: "Yes I am aware": Yes I am aware | |
| #-- Environment variables provided below are updated |
This file contains hidden or 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
| [postgres@posvt01 pg_cron-main]# mkdir -p /mnt/postgres/pgdata/16 | |
| [postgres@posvt01 pg_cron-main]# mkdir -p /mnt/postgres/pg_wal/16 | |
| [root@posvt01 ~]# systemctl stop patroni | |
| [postgres@posvt01 ~]$ /usr/pgsql-16/bin/initdb -U postgres --data-checksums -E 'UTF8' -W --wal-segsize='32' \ | |
| --waldir='/mnt/postgres/pg_wal/16' --lc-ctype='tr_TR.UTF-8' --lc-collate='tr_TR.UTF-8' --pgdata='/mnt/postgres/pgdata/16' | |
| The files belonging to this database system will be owned by user "postgres". | |
| This user must also own the server process. |
This file contains hidden or 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
| [root@posvt01 pg_cron]# unzip pg_cron-main.zip | |
| [root@posvt01 pg_cron]# cd pg_cron-main/ | |
| [root@posvt01 pg_cron-main]# make | |
| [root@posvt01 pg_cron-main]# make install | |
| /usr/bin/mkdir -p '/usr/pgsql-16/lib' | |
| /usr/bin/mkdir -p '/usr/pgsql-16/share/extension' | |
| /usr/bin/mkdir -p '/usr/pgsql-16/share/extension' | |
| /usr/bin/install -c -m 755 pg_cron.so '/usr/pgsql-16/lib/pg_cron.so' | |
| /usr/bin/install -c -m 644 .//pg_cron.control '/usr/pgsql-16/share/extension/' | |
| /usr/bin/install -c -m 644 .//pg_cron--1.4-1--1.5.sql .//pg_cron--1.3--1.4.sql .//pg_cron--1.5--1.6.sql .//pg_cron--1.2--1.3.sql .//pg_cron--1.0--1.1.sql .//pg_cron--1.4--1.4-1.sql .//pg_cron--1.1--1.2.sql pg_cron--1.0.sql '/usr/pgsql-16/share/extension/' |