How a MySQL DBA see Postgresql (and why their company should worry about)
Marco Tusa Percona
How a MySQL DBA see Postgresql (and why their company should worry - - PowerPoint PPT Presentation
How a MySQL DBA see Postgresql (and why their company should worry about) Marco Tusa Percona About me Marco The Grinch Former UN, MySQL AB, Pyt hian, Percona 2 kids, 1 wife History of Religions; Ski; Snowboard; Scuba
Marco Tusa Percona
2
3
4
6
7
8
[root@pg1h1p81 data]# cat postmaster.pid 30452 <------------- PID /var/lib/pgsql/10/data <------------- data dir 1539681530 <--------------Start timestamp 5432 <-------------- tcp/ip Port /tmp <-------------- temp dir * <--------------IP address bound 5432001 196608 <-------------- second is shmid Ready <-------------- Server status
9
# IPv4 local connections: # TYPE DATABASE USER ADDRESS METHOD host all all 127.0.0.1/32 md5 host all all 192.168.1.1/24 md5 host replication all 192.168.1.1/24 md5
10
11
CREATE ROLE "user_write"; GRANT USAGE, SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA windmills TO "user_write"; CREATE USER marco WITH ENCRYPTED PASSWORD ‘xxxx'; GRANT "user_write" TO marco;
12
Privileges:
column(s) of the table. (See the CREATE TABLE statement.)
startup (in addition to checking any restrictions imposed by pg_hba.conf).
that language. This is the only type of privilege that is applicable to procedural languages.
13
14
15
16
what is needed Basic to set async/sync stream replication: ALTER SYSTEM SET wal_level TO 'replica'; (v10) ALTER SYSTEM SET archive_mode TO 'ON'; ALTER SYSTEM SET max_wal_senders TO '20'; ALTER SYSTEM SET wal_keep_segments TO '100'; <--- calculate on the base u prefer ALTER SYSTEM SET listen_addresses TO '*'; ALTER SYSTEM SET hot_standby TO 'ON'; ALTER SYSTEM SET archive_command TO 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'; ALTER SYSTEM SET wal_log_hints TO 'ON'; ALTER SYSTEM SET log_connections TO 'ON'; ALTER SYSTEM SET synchronous_standby_names = 'node3,node2'; <--- if SYNC Add an entry to pg_hba.conf of Master to allow Replication connections from Slave. local replication all md5 host replication all 127.0.0.1/32 md5 host replication all 192.168.1.1/24 md5
17
18
19
20
21
22
23
24
25