SlideShare a Scribd company logo
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
DIG THE WAL
WAL INSIDE-OUT
PGCONF.EU - 2018-10-23
Stéphane Schildknecht & Jean-Christophe Arnu
©2018-LOXODATA
1 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HEY, WHAT'S THE WIFI CODE
ESSID : Marriott-GUEST
At Portal login, choose the WIFI-Code link at the bottom of the login box.
Portal password : PGCONFEU
2 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
BEFORE WE START
Do you have  ?
@pgconfeu ← follow
#pgconfeu ← to tweet
3 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com 4 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHO
Jean-Christophe Arnu
 PostgreSQL since 1998
 Founder of PostgreSQLFr and PGDay.fr
 PostgreSQL Consultant
  @jcarnu
5 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHO
Stéphane Schildknecht
 PostgreSQL lover for more than 15 years
 Founder of PostgreSQLFr (chairman 2005-2010)
 Founder of Loxodata
  @saschild
6 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
LOXODATA
Company built on 3 essential pillars
PostgreSQL DevOps Cloud
7 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
LOXODATA
A comprehensive service offer
Architecture Consulting Teaching
Administration Audit Support
8 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
PURPOSE OF THAT TRAINING
Understanding what's a WAL and what is it made of
Using tools to
Display WAL contents and relevant informations
Recover to a certain point in time
Solve splitbrain situations
Recover from disasters (and no backup)
9 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK
INSIGHTS
10 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
11 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
12 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
13 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
14 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
15 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
16 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
POSTGRESQL ENGINE QUICK INSIGHTS
17 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
WAL is a way to insure consistency in case of
crash sudden/unexpected stop
Crash "never" happens with PostgreSQL
18 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
WHERE ARE MY WAL FILES?
In cluster's ${PGDATA}/pg_wal directory
Where your archive_command stored the les
19 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
HOW IS A WAL FILE NAMED?
00000002 00000008 000000BB
It's made of 3 parts, 8 digits each.
TimeLine ID
starts at 1
Logical le ID
starts at 0
Physical le ID
from 00 to FF
First of all WAL:
000000010000000000000001
Nickname : 8/BB
20 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
WHAT IS THE WAL PURPOSE?
crash recovery
since 7.1
record "events"
data changes
replication events
checkpoints
PITR
Streaming replication
21 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
WAL: UNDERCOVER
A WAL segment :
16MB
Contains several 8KB pages
Each page contains blocks of data
Page
8KB
Page
8KB
WAL segment (~16MB)
. . . . . . . . . ... Page
8KB
22 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
WAL : A MESSAGING "BUS" ?
WAL Message 2Message 1
Resource Manager
A
Resource Manager
B
Each resource manager writes inside it. Each message is a block. Each
message may be "consumed".
Easy isn't it ?
This may (should) be a DBA view...
Want to see more ?
23 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
WAL : A MESSAGING "BUS"?
XLogLongPageHeaderData
XLogDataXLogRecordHeader
XLogDataXLogRecordHeader
XLogDataXLogRecordHeader
XLogDataXLogRecordHeader
XLogDataXLogRecordHeader
8192bytes
Page 0
XLogRecordHeader
xl_rmid
xl_info
RM_XLOG
RM_XACT
RM_SMGR
RM_CLOG
RM_DBASE
RM_TBLSPC
RM_MULTIXACT
RM_RELMAP
RM_STANDBY
RM_HEAP
RM_HEAP2
RM_BTREE
Resource Managers
Identifiers
RM_HASH RM_GIN
RM_GIST
RM_SEQ
RM_SPGIST
RM_BRIN
RM_COMMIT
RM_REPLORIGIN
RM_GENERIC
RM_LOGICALMSG
xl_rmid identi es Resource manager (rmgr)
xl_info identi es rmgr operation (lots)
XLogData contains also meta-data depending on rmgr and nally data
24 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
RESOURCE MANAGERS
Lots of them :
Heap and Heap2 are operations on tables
INSERT, UPDATE, DELETE
BTree are operations on BTrees
XLOG : internal WAL operation such as Full Page Image
Transaction : all events on transaction (start/commit/rollback)
Storage : TRUNCATE
25 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
SO WHAT'S INSIDE THE WAL?
Heap rmgr :
XLOG rmgr FPI + Btree rmgr:
rmgr: Heap len (rec/tot): 54/ 54, tx: 374055296, lsn: 11A/FF00BEE0,
prev 11A/FF00A1E0, desc: LOCK off 45: xid 374055296:
flags 0 LOCK_ONLY EXCL_LOCK KEYS_UPDATED
blkref #0: rel 1663/16400/19027 fork main blk 2603
rmgr: Heap len (rec/tot): 159/ 159, tx: 374055296, lsn: 11A/FF00BF18,
prev 11A/FF00BEE0, desc: UPDATE off 27 xmax 374055296
KEYS_UPDATED ; new off 143 xmax 374055296
blkref #0: rel 1663/16400/19027 fork main blk 2603
rmgr: XLOG len (rec/tot): 49/ 8209, tx: 374055296, lsn: 11A/FF00DD40,
prev 11A/FF00BFB8, desc: FPI_FOR_HINT
blkref #0: rel 1663/16400/77307 fork main blk 1004 (FPW); hole: offset: 1648, length:
rmgr: Btree len (rec/tot): 64/ 64, tx: 374055296, lsn: 11A/FF00FD70,
prev 11A/FF00DD40, desc: INSERT_LEAF off 116
blkref #0: rel 1663/16400/77307 fork main blk 1004
rmgr: Btree len (rec/tot): 53/ 6393, tx: 374055296, lsn: 11A/FF00FDB0,
prev 11A/FF00FD70, desc: INSERT_LEAF off 41
blkref #0: rel 1663/16400/78446 fork main blk 215 (FPW); hole: offset: 1284, length:
26 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
SO WHAT'S INSIDE THE WAL?
Transaction rmgr:
Storage rmgr:
And so on with different Resource Managers
rmgr: Transaction len (rec/tot): 34/ 34, tx: 374055303, lsn: 11A/FF069A70,
prev 11A/FF069A30, desc: COMMIT 2018-10-18 13:42:07.922413 UTC
rmgr: Storage len (rec/tot): 46/ 46, tx: 374061428, lsn: 11B/009E9058,
prev 11B/009E7008, desc: TRUNCATE base/16400/279532 to 9 blocks flags 7
27 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
YOU SAID TX? LSN?
Each block contains at least :
a tx : identi es a Transaction ID
a lsn : Logical Sequence Number : block address inside the wal
Given this LSN : 11A/FF069A70, it is read like this:
11A identi es the Logical le ID
FF identi es the Physical le ID (or segment)
069A70 identi es the byte offset inside WAL segment
a rmgr : describing the resource manager
a desc : describing the rmgr operation
rmgr: Transaction len (rec/tot): 34/ 34, tx: 374055303, lsn: 11A/FF069A70,
prev 11A/FF069A30, desc: COMMIT 2018-10-18 13:42:07.922413 UTC
28 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
Time
WAL buffer
(memory)
WAL file
Shared buffer
Database files
Operations CHECKPOINT;
BEGIN;
INSERT INTO TABLE t1
VALUES('dtw1');
COMMIT;
t1 Table
Page
LSN0 LSN1 LSN3
LSN2 LSN4
CHECKPOINT;
t1 Table
BEGIN;
INSERT INTO TABLE t1
VALUES('dtw2');
COMMIT;
REDO
=
LSN4
CKPT
pg_control
29 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
SCHEMATIC WAL LIFE
After a CHECKPOINT is nished :
Each new "Cluster le" page needed is loaded into shared buffers
Once changed if Full page write → Full page images into WAL buffer
Page changes are written into WAL buffer
Too much pages to t ? → bg_writer to ush pages to cluster les
WAL pending blocks are written at each COMMIT (if
synchronous_commit)
When CHECKPOINT happens
Get last WAL LSN as REDO point
Flush pages in shared memory to disk
Updates pg_control
30 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
FUNCTIONS AND TOOLS
31 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
FUNCTIONS : GETTING INFORMATIONS ON WAL
pg_current_wal_lsn() : Current Write LSN
pg_current_wal_insert_lsn() : Current Insert LSN (position to be
written)
pg_current_wal_flush_lsn() : Current LSN ushed to disk
pg_walfile_name(lsn a_lsn) : Returns the WAL le name for a_lsn
pg_walfile_name_offset(lsn a_lsn) : Returns the WAL le name
for a_lsn LSN + decimal byte le location
pg_wal_lsn_diff(lsn a_lsn1, a_lsn2) : Returns the difference (in
bytes) between a_lsn1/2
32 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
FUNCTIONS : WAL OPERATIONS CONTROL
Recovery:
pg_last_wal_receive_lsn() : last received LSN from primary
pg_last_wal_replay_lsn() : last replayed LSN
pg_is_wal_replay_paused() : check if WAL replay is paused
pg_wal_replay_pause() : pause WAL replay on standby host
pg_wal_replay_resume() : resume WAL replay on standby host
Backup and WAL le control :
pg_{start,stop}_backup() : starts/stops online backup
pg_switch_wal() : switches to next WAL le
Misc:
pg_ls_waldir() : lists WAL les
33 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
WHAT IS A WAL ?
TOOLS : POSTGRESQL WAL TOOLS
pg_waldump : decodes blocks and prints information
pg_resetwal : nds last consistant state, strips following WAL
pg_rewind : resyncs two clusters
pg_controldata : displays global/pg_control data
pg_archivecleanup : removes unnecessary (archived) WAL
pg_receivewal : daemon to receive WAL through streaming replication
pg_recvlogical: daemon to receive logical data from protocol
34 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
35 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
BASIC OPTIONS
wal_level (minimal, replica , logical)
fsync (on)
synchronous_commit (on, remote_apply, remote_write, local,
off)
wal_sync_method (fdatasync)
full_page_writes (on)
wal_compression (off)
wal_log_hints (off)
wal_buffers (-1, <= 16MB)
36 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
ADJUSTING WRITES
wal_writer_delay (200ms)
wal_writer_flush_after (1MB)
commit_delay (0)
commit_siblings (5)
37 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
COMMUNICATION
max_wal_senders (10)
wal_keep_segments (0)
wal_sender_timeout (60s)
max_replication_slots (10)
track_commit_timestamp (off)
synchronous_standby_names ('')
vacuum_defer_cleanup_age (0)
38 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
REPLICATION STANDBY
hot_standby (on)
max_standby_archive_delay (30s)
max_standby_streaming_delay (30s)
wal_receiver_status_interval (10s)
hot_standby_feedback (off)
wal_receiver_timeout (60s)
wal_retrieve_retry_interval (5s)
max_logical_replication_workers (4)
max_sync_workers_per_subscription (2)
39 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
WHAT ABOUT CHECKPOINTING ?
checkpoint_timeout (5min)
checkpoint_completion_target (0.5)
checkpoint_flush_after (256kB)
checkpoint_warning (30s)
max_wal_size (1GB)
min_wal_size (80MB)
log_checkpoints (off)
40 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
CONFIGURING WAL
ARCHIVING
archive_mode (off)
archive_command ('')
archive_timeout (0)
41 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
IT'S PLAY TIME!
42 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
SOME WORDS ON YOUR VM
Virtualbox box created with Vagrant
Debian Stretch with PGDG apt source, uses pg_wrapper
PostgreSQL 11
43 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
VM IMPORT AND NETWORK INSTALLATION
import_dtw.sh works on MacOS and Linux with VirtualBox 5.1 and 5.2
import_dtw.ps1 is the Windows PowerShell script tested against 5.2
(should work on 5.1 as well)
You can also do the job manually (import VM, con gure hostonly network)
44 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
VIRTUALBOX CONFIGURATION
Add vboxnet0 with static IP 10.0.0.1
Virtualbox 5.1
45 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
VM INSTALLATION
Add vboxnet0 with static IP 10.0.0.1
Virtualbox 5.2
46 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
SOME WORDS (AGAIN)
VM were already initialized with
/var/lib/postgresql/digthewal/scripts/00_create_world.sh
Con guration les in /etc/postgresql/11/
Exercises : /var/lib/postgresql/digthewal/scripts
User : digthewal@10.0.0.20 password digit!
digthewal is sudoer so you can use sudo -i -u postgres (and type
digit! again as password to become postgres user)
All exercises should be run as postgres user
DON'T USE FOR PRODUCTION !
DON'T !
47 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT'S INSIDE A WAL FILE (LEVEL)
48 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT'S INSIDE A WAL FILE (LEVEL)
Some guidelines (Exercise_1)
Approximate duration: 15 minutes
Target: Discover pg_waldump and WAL les content
Directory:
/var/lib/postgresql/digthewal/scripts/Exercise_1/
Files: 01_test_script.sql
Operations
Study the simple SQL script
Run the script on each cluster (different wal level), one at a time
Look at pg_waldump output
Play with pg_waldump options
49 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT'S INSIDE A WAL FILE (LEVEL)
Keep in mind we are not developers but DBA:
we only need to know roughly what kind of operations are stored and
what object it involves.
Exemple :
rmgr: Heap len (rec/tot): 96/ 96,
tx: 570,
lsn: 0/0188AC58,
prev 0/0188AC20,
desc: INSERT+INIT off 1
blkref #0: rel 1663/16384/16387 fork main blk 0
50 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT'S INSIDE A WAL FILE (LEVEL)
Resource manager Heap
Transaction 570
LSN (previous) 0/0188AC58 (0/0188AC20)
Operation INSERT+INIT
Relation Database 16384
Table (or object) 16387
Using the following process will give you the object pointed:
psql --cluster 11/minimal testdb -c 'select relfilenode, relname
from pg_class where relfilenode=16387'
relfilenode | relname
-------------+---------
16387 | t1
(1 row)
51 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT ABOUT LOGICAL REPLICATION?
52 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT ABOUT LOGICAL REPLICATION?
Approximate duration : 15 minutes
Target : Logical replication is not “shown” in WAL les, WAL resources
manager for logical replication are not used for that. We can also explore
PostgreSQL logical directory tree for logical replication.
Files :
01_create_world.sh connects to the logical primary to create a
database, a table and a publication on that table.
02_create_logical_repl.sql are run on logical "primary"
03_create_logical_subs.sql will be run on "secondary"
53 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT ABOUT LOGICAL REPLICATION?
How it works (Exercise_2 done by 01_create_world.sh):
02_create_logical_repl.sql must be run on
logicalprimary
Create a database on primary publishdb
Create a table in that database pub_table
Create a PUBLICATION on pub_table
Create a replication user with REPLICATION role and grant him
SELECT on pub_table
03_create_logical_subs.sql must be run on
logicalsecondary
Create a subdb database
Create a table pub_table in subdb
Create a SUBSCRIPTION for pub_table
54 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
WHAT ABOUT LOGICAL REPLICATION?
Try to stop the subscriber and create insert traf c on publisher. Look at WAL
directory growing in size.
Another fun stuff to do:
Restart subscriber rst
Insert data on subscriber table
Insert the same data on publisher
Check out log les, and pg_wal directory
Remove the con icting data on subscriber
Check out the wal directory and subscriber keeping up
55 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
56 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
Approximate duration : 30 minutes
Target : First PITR + archive recovery until an identi ed event before a
disaster.
Files :
03_0_createimportantdb.sh creates both primary and standby
servers + streaming replication. Launches
03_1_createimportabtdb.sql at the end
03_1_createimportantdb.sql creates database, tables, launches
backup, lls with data and creates disasters.
03_2_digress.sh a simple digression on wal replay control, launches
03_1_createimportabtdb.sql again against primary and
03_2_digress.sql on standby
57 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
WHAT TO DO : (EXERCISE_3)
This rst part is already done by 03_0_create_importantdb.sh :
Create a primary cluster
Create a recovery cluster
On primary
Create 2 tables
Add data to both tables
Create a cluster backup with pg_basebackup
Add data to onetable (with random quantity)
Get the current_wal_lsn and wal le
Delete data on the table ← disaster #1
Get current_wal_lsn and wal le
Drop the second table ← disaster #2
58 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
Just take a minute ( les 03_2_digress.sh and 03_2_digress.sql):
On secondary on importantdb as postgres user :
launch select pg_wal_replay_pause();
select * from importantlog order by id limit 1 for
memory
On primary relaunch 03_1_create_importantdb.sql
59 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
Connect secondary on importantdb as postgres user:
select pg_is_wal_replay_paused()
select * from importantlog order by id limit 1 for
memory (no changes)
select pg_last_wal_receive_lsn(); will give the last
received wal from primary
select pg_last_wal_replay_lsn(); will give the last
replayed wal on secondary
select pg_wal_replay_resume(); will replay wal on
secondary
select * from importantlog order by id limit 1 to
compare
We can see here that we can have control on WAL replay on standby
servers as well as have the ability so see which data are correctly
transferred from primary to standby servers.
60 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
BACK TO WAL EXERCISE:
Analyze WAL les and identify both DELETE and DROP Xacts (notice DROP
is not explicit). pg_waldump is your friend.
Stop secondary
Restore backup and WAL to the transaction on a new cluster
(replica_recovery) to a point just before rst disaster :
Create a new cluster (stopped) and remove cluster $PGDATA les
Copy backuped les from ~/backup/11/replica_primary →
replica_recovery $PGDATA
Create/change recovery.conf le to
De ne restore_command to copy WAL les from
~/wal_archives/... → ${PGDATA}/pg_wal
De ne the recovery_target_{xid,inclusive}.
De ne the recovery_target_action if needed.
61 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
PRECISE PITR
BACK TO WAL EXERCISE:
Restore up to before the second disaster.
Change recovery mode to production mode.
62 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
DEALING WITH SPLITBRAIN SITUATION
63 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
DEALING WITH SPLITBRAIN SITUATION
Approximate duration: 15 minutes
Target: pg_rewind use exploration
Files:
04_0_create_instances.sh
04_1_create_db_and_tables.sql
04_2_feed_db.sql
64 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
DEALING WITH SPLITBRAIN SITUATION
WHAT TO DO :(EXERCISE_4)
Handled by 04_0_create_instances.sh
Create two clusters in Streaming replication with archiving (one primary
one standby)
On primary create a database with some tables and add some “good
data”
Promote the standby cluster
Insert data into promoted cluster
Insert data into former primary
You are now in a splitbrain con guration
65 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
DEALING WITH SPLITBRAIN SITUATION
WHAT TO DO :
Stop primary
Use pg_rewind using dry-run to identify the split point in time (look at the
–source-server argument)
Use pg_rewind to resync the former primary with promoted server
Create a recovery.conf le to change the former primary into promoted
standby's standby using streaming replication (eventually use
restore_command in order to point wal archive path)
Restart former primary and check its (standby) state using the log le and
psql
66 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
HOW TO DEAL WITH DISASTERS?
67 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
HOW TO DEAL WITH DISASTERS?
Approximate duration: 15 minutes
Target: pg_resetwal simple use to recover after a disaster
Files: 00_create_crashable.sh
68 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
HOW TO DEAL WITH DISASTERS?
WHAT TO DO (EXERCISE_5)
Handled by 00_create_crashable.sh
Create a simple cluster, a database and a table
Insert some elements
Force CHECKPOINT and get lsn
Sleep 2 seconds and get lsn
Insert some other elements and get lsn
Insert other elements and get current lsn and WAL le
Crash (pg_ctl -m immediate stop)
Corrupt the current WAL le (using shell commands)
Try to restart the cluster
69 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
HOW TO DEAL WITH DISASTERS?
STOP THE CLUSTER
DO NOT WORK ON PRODUCTION SERVER, ALWAYS ON A COPY!
Create another cluster stopped
Copy crashable cluster to that new cluster crashable_recover (i.e.
remove les from PGDATA and copy les from crashable PGDATA)
On crashable_recover
Use pg_resetwal to recover
Restart crashable_recover cluster and look at the data
Use pg_dump to get a copy then restore it to a new cluster and check
inconsistencies
70 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
HANDS-ON!
HOW TO DEAL WITH DISASTERS?
Use pg_resetwal only in last resort if you have no other solution with
corrupted wal
Once the cluster is restarted, do not attempt to make write
operations on data: dump the database, restore it on another
cluster, and check it for inconsistencies.
Demo of kill -9 side effects on PostgreSQL.
Sum up: Try to avoid kill -9
kill -9 => keeps resources (ipcs), pid les, sockets...
71 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
SO!
72 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
SO!
WRAP UP
WHAT DID WE LEARN ?
PostgreSQL WAL contains lots of events/activity
We can use those events to
Search operations on a given event
Recover to a Point In Time
Resynchronize from splitbrain situations
We know how to overcome WAL corruptions
Tools, functions and settings around WAL
73 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
SO!
SLIDES AND SOURCES
Slides will be available on the pgconf.eu website by the end of the
conference.
Sources are available at : https://gitlab.com/loxo-trainings/dig-the-wal
74 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
SO!
DON'T FORGET
Feedbacks (training+conference) :
https://2018.pgconf.eu/f
75 / 76
 LOXODATA
Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com
SO!
THANK YOU!
For any further question :
   or   jc.arnu@loxodata.com s.schildknecht@loxodata.com
76 / 76

More Related Content

Recently uploaded

原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
a9qfiubqu
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
wyddcwye1
 
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCAModule 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
yuvarajkumar334
 
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
z6osjkqvd
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens""Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
sameer shah
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
taqyea
 
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
bmucuha
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
Márton Kodok
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
writing report business partner b1+ .pdf
writing report business partner b1+ .pdfwriting report business partner b1+ .pdf
writing report business partner b1+ .pdf
VyNguyen709676
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理
一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理
一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理
y3i0qsdzb
 

Recently uploaded (20)

原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
 
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCAModule 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
 
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens""Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
 
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
writing report business partner b1+ .pdf
writing report business partner b1+ .pdfwriting report business partner b1+ .pdf
writing report business partner b1+ .pdf
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理
一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理
一比一原版巴斯大学毕业证(Bath毕业证书)学历如何办理
 

Featured

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Dig the-wal pgconfeu2018

  • 1.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com DIG THE WAL WAL INSIDE-OUT PGCONF.EU - 2018-10-23 Stéphane Schildknecht & Jean-Christophe Arnu ©2018-LOXODATA 1 / 76
  • 2.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HEY, WHAT'S THE WIFI CODE ESSID : Marriott-GUEST At Portal login, choose the WIFI-Code link at the bottom of the login box. Portal password : PGCONFEU 2 / 76
  • 3.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com BEFORE WE START Do you have  ? @pgconfeu ← follow #pgconfeu ← to tweet 3 / 76
  • 4.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com 4 / 76
  • 5.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHO Jean-Christophe Arnu  PostgreSQL since 1998  Founder of PostgreSQLFr and PGDay.fr  PostgreSQL Consultant   @jcarnu 5 / 76
  • 6.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHO Stéphane Schildknecht  PostgreSQL lover for more than 15 years  Founder of PostgreSQLFr (chairman 2005-2010)  Founder of Loxodata   @saschild 6 / 76
  • 7.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com LOXODATA Company built on 3 essential pillars PostgreSQL DevOps Cloud 7 / 76
  • 8.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com LOXODATA A comprehensive service offer Architecture Consulting Teaching Administration Audit Support 8 / 76
  • 9.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com PURPOSE OF THAT TRAINING Understanding what's a WAL and what is it made of Using tools to Display WAL contents and relevant informations Recover to a certain point in time Solve splitbrain situations Recover from disasters (and no backup) 9 / 76
  • 10.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 10 / 76
  • 11.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 11 / 76
  • 12.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 12 / 76
  • 13.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 13 / 76
  • 14.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 14 / 76
  • 15.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 15 / 76
  • 16.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 16 / 76
  • 17.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com POSTGRESQL ENGINE QUICK INSIGHTS 17 / 76
  • 18.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? WAL is a way to insure consistency in case of crash sudden/unexpected stop Crash "never" happens with PostgreSQL 18 / 76
  • 19.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? WHERE ARE MY WAL FILES? In cluster's ${PGDATA}/pg_wal directory Where your archive_command stored the les 19 / 76
  • 20.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? HOW IS A WAL FILE NAMED? 00000002 00000008 000000BB It's made of 3 parts, 8 digits each. TimeLine ID starts at 1 Logical le ID starts at 0 Physical le ID from 00 to FF First of all WAL: 000000010000000000000001 Nickname : 8/BB 20 / 76
  • 21.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? WHAT IS THE WAL PURPOSE? crash recovery since 7.1 record "events" data changes replication events checkpoints PITR Streaming replication 21 / 76
  • 22.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? WAL: UNDERCOVER A WAL segment : 16MB Contains several 8KB pages Each page contains blocks of data Page 8KB Page 8KB WAL segment (~16MB) . . . . . . . . . ... Page 8KB 22 / 76
  • 23.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? WAL : A MESSAGING "BUS" ? WAL Message 2Message 1 Resource Manager A Resource Manager B Each resource manager writes inside it. Each message is a block. Each message may be "consumed". Easy isn't it ? This may (should) be a DBA view... Want to see more ? 23 / 76
  • 24.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? WAL : A MESSAGING "BUS"? XLogLongPageHeaderData XLogDataXLogRecordHeader XLogDataXLogRecordHeader XLogDataXLogRecordHeader XLogDataXLogRecordHeader XLogDataXLogRecordHeader 8192bytes Page 0 XLogRecordHeader xl_rmid xl_info RM_XLOG RM_XACT RM_SMGR RM_CLOG RM_DBASE RM_TBLSPC RM_MULTIXACT RM_RELMAP RM_STANDBY RM_HEAP RM_HEAP2 RM_BTREE Resource Managers Identifiers RM_HASH RM_GIN RM_GIST RM_SEQ RM_SPGIST RM_BRIN RM_COMMIT RM_REPLORIGIN RM_GENERIC RM_LOGICALMSG xl_rmid identi es Resource manager (rmgr) xl_info identi es rmgr operation (lots) XLogData contains also meta-data depending on rmgr and nally data 24 / 76
  • 25.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? RESOURCE MANAGERS Lots of them : Heap and Heap2 are operations on tables INSERT, UPDATE, DELETE BTree are operations on BTrees XLOG : internal WAL operation such as Full Page Image Transaction : all events on transaction (start/commit/rollback) Storage : TRUNCATE 25 / 76
  • 26.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? SO WHAT'S INSIDE THE WAL? Heap rmgr : XLOG rmgr FPI + Btree rmgr: rmgr: Heap len (rec/tot): 54/ 54, tx: 374055296, lsn: 11A/FF00BEE0, prev 11A/FF00A1E0, desc: LOCK off 45: xid 374055296: flags 0 LOCK_ONLY EXCL_LOCK KEYS_UPDATED blkref #0: rel 1663/16400/19027 fork main blk 2603 rmgr: Heap len (rec/tot): 159/ 159, tx: 374055296, lsn: 11A/FF00BF18, prev 11A/FF00BEE0, desc: UPDATE off 27 xmax 374055296 KEYS_UPDATED ; new off 143 xmax 374055296 blkref #0: rel 1663/16400/19027 fork main blk 2603 rmgr: XLOG len (rec/tot): 49/ 8209, tx: 374055296, lsn: 11A/FF00DD40, prev 11A/FF00BFB8, desc: FPI_FOR_HINT blkref #0: rel 1663/16400/77307 fork main blk 1004 (FPW); hole: offset: 1648, length: rmgr: Btree len (rec/tot): 64/ 64, tx: 374055296, lsn: 11A/FF00FD70, prev 11A/FF00DD40, desc: INSERT_LEAF off 116 blkref #0: rel 1663/16400/77307 fork main blk 1004 rmgr: Btree len (rec/tot): 53/ 6393, tx: 374055296, lsn: 11A/FF00FDB0, prev 11A/FF00FD70, desc: INSERT_LEAF off 41 blkref #0: rel 1663/16400/78446 fork main blk 215 (FPW); hole: offset: 1284, length: 26 / 76
  • 27.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? SO WHAT'S INSIDE THE WAL? Transaction rmgr: Storage rmgr: And so on with different Resource Managers rmgr: Transaction len (rec/tot): 34/ 34, tx: 374055303, lsn: 11A/FF069A70, prev 11A/FF069A30, desc: COMMIT 2018-10-18 13:42:07.922413 UTC rmgr: Storage len (rec/tot): 46/ 46, tx: 374061428, lsn: 11B/009E9058, prev 11B/009E7008, desc: TRUNCATE base/16400/279532 to 9 blocks flags 7 27 / 76
  • 28.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? YOU SAID TX? LSN? Each block contains at least : a tx : identi es a Transaction ID a lsn : Logical Sequence Number : block address inside the wal Given this LSN : 11A/FF069A70, it is read like this: 11A identi es the Logical le ID FF identi es the Physical le ID (or segment) 069A70 identi es the byte offset inside WAL segment a rmgr : describing the resource manager a desc : describing the rmgr operation rmgr: Transaction len (rec/tot): 34/ 34, tx: 374055303, lsn: 11A/FF069A70, prev 11A/FF069A30, desc: COMMIT 2018-10-18 13:42:07.922413 UTC 28 / 76
  • 29.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? Time WAL buffer (memory) WAL file Shared buffer Database files Operations CHECKPOINT; BEGIN; INSERT INTO TABLE t1 VALUES('dtw1'); COMMIT; t1 Table Page LSN0 LSN1 LSN3 LSN2 LSN4 CHECKPOINT; t1 Table BEGIN; INSERT INTO TABLE t1 VALUES('dtw2'); COMMIT; REDO = LSN4 CKPT pg_control 29 / 76
  • 30.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? SCHEMATIC WAL LIFE After a CHECKPOINT is nished : Each new "Cluster le" page needed is loaded into shared buffers Once changed if Full page write → Full page images into WAL buffer Page changes are written into WAL buffer Too much pages to t ? → bg_writer to ush pages to cluster les WAL pending blocks are written at each COMMIT (if synchronous_commit) When CHECKPOINT happens Get last WAL LSN as REDO point Flush pages in shared memory to disk Updates pg_control 30 / 76
  • 31.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? FUNCTIONS AND TOOLS 31 / 76
  • 32.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? FUNCTIONS : GETTING INFORMATIONS ON WAL pg_current_wal_lsn() : Current Write LSN pg_current_wal_insert_lsn() : Current Insert LSN (position to be written) pg_current_wal_flush_lsn() : Current LSN ushed to disk pg_walfile_name(lsn a_lsn) : Returns the WAL le name for a_lsn pg_walfile_name_offset(lsn a_lsn) : Returns the WAL le name for a_lsn LSN + decimal byte le location pg_wal_lsn_diff(lsn a_lsn1, a_lsn2) : Returns the difference (in bytes) between a_lsn1/2 32 / 76
  • 33.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? FUNCTIONS : WAL OPERATIONS CONTROL Recovery: pg_last_wal_receive_lsn() : last received LSN from primary pg_last_wal_replay_lsn() : last replayed LSN pg_is_wal_replay_paused() : check if WAL replay is paused pg_wal_replay_pause() : pause WAL replay on standby host pg_wal_replay_resume() : resume WAL replay on standby host Backup and WAL le control : pg_{start,stop}_backup() : starts/stops online backup pg_switch_wal() : switches to next WAL le Misc: pg_ls_waldir() : lists WAL les 33 / 76
  • 34.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com WHAT IS A WAL ? TOOLS : POSTGRESQL WAL TOOLS pg_waldump : decodes blocks and prints information pg_resetwal : nds last consistant state, strips following WAL pg_rewind : resyncs two clusters pg_controldata : displays global/pg_control data pg_archivecleanup : removes unnecessary (archived) WAL pg_receivewal : daemon to receive WAL through streaming replication pg_recvlogical: daemon to receive logical data from protocol 34 / 76
  • 35.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL 35 / 76
  • 36.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL BASIC OPTIONS wal_level (minimal, replica , logical) fsync (on) synchronous_commit (on, remote_apply, remote_write, local, off) wal_sync_method (fdatasync) full_page_writes (on) wal_compression (off) wal_log_hints (off) wal_buffers (-1, <= 16MB) 36 / 76
  • 37.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL ADJUSTING WRITES wal_writer_delay (200ms) wal_writer_flush_after (1MB) commit_delay (0) commit_siblings (5) 37 / 76
  • 38.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL COMMUNICATION max_wal_senders (10) wal_keep_segments (0) wal_sender_timeout (60s) max_replication_slots (10) track_commit_timestamp (off) synchronous_standby_names ('') vacuum_defer_cleanup_age (0) 38 / 76
  • 39.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL REPLICATION STANDBY hot_standby (on) max_standby_archive_delay (30s) max_standby_streaming_delay (30s) wal_receiver_status_interval (10s) hot_standby_feedback (off) wal_receiver_timeout (60s) wal_retrieve_retry_interval (5s) max_logical_replication_workers (4) max_sync_workers_per_subscription (2) 39 / 76
  • 40.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL WHAT ABOUT CHECKPOINTING ? checkpoint_timeout (5min) checkpoint_completion_target (0.5) checkpoint_flush_after (256kB) checkpoint_warning (30s) max_wal_size (1GB) min_wal_size (80MB) log_checkpoints (off) 40 / 76
  • 41.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com CONFIGURING WAL ARCHIVING archive_mode (off) archive_command ('') archive_timeout (0) 41 / 76
  • 42.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! IT'S PLAY TIME! 42 / 76
  • 43.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! SOME WORDS ON YOUR VM Virtualbox box created with Vagrant Debian Stretch with PGDG apt source, uses pg_wrapper PostgreSQL 11 43 / 76
  • 44.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! VM IMPORT AND NETWORK INSTALLATION import_dtw.sh works on MacOS and Linux with VirtualBox 5.1 and 5.2 import_dtw.ps1 is the Windows PowerShell script tested against 5.2 (should work on 5.1 as well) You can also do the job manually (import VM, con gure hostonly network) 44 / 76
  • 45.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! VIRTUALBOX CONFIGURATION Add vboxnet0 with static IP 10.0.0.1 Virtualbox 5.1 45 / 76
  • 46.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! VM INSTALLATION Add vboxnet0 with static IP 10.0.0.1 Virtualbox 5.2 46 / 76
  • 47.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! SOME WORDS (AGAIN) VM were already initialized with /var/lib/postgresql/digthewal/scripts/00_create_world.sh Con guration les in /etc/postgresql/11/ Exercises : /var/lib/postgresql/digthewal/scripts User : digthewal@10.0.0.20 password digit! digthewal is sudoer so you can use sudo -i -u postgres (and type digit! again as password to become postgres user) All exercises should be run as postgres user DON'T USE FOR PRODUCTION ! DON'T ! 47 / 76
  • 48.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT'S INSIDE A WAL FILE (LEVEL) 48 / 76
  • 49.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT'S INSIDE A WAL FILE (LEVEL) Some guidelines (Exercise_1) Approximate duration: 15 minutes Target: Discover pg_waldump and WAL les content Directory: /var/lib/postgresql/digthewal/scripts/Exercise_1/ Files: 01_test_script.sql Operations Study the simple SQL script Run the script on each cluster (different wal level), one at a time Look at pg_waldump output Play with pg_waldump options 49 / 76
  • 50.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT'S INSIDE A WAL FILE (LEVEL) Keep in mind we are not developers but DBA: we only need to know roughly what kind of operations are stored and what object it involves. Exemple : rmgr: Heap len (rec/tot): 96/ 96, tx: 570, lsn: 0/0188AC58, prev 0/0188AC20, desc: INSERT+INIT off 1 blkref #0: rel 1663/16384/16387 fork main blk 0 50 / 76
  • 51.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT'S INSIDE A WAL FILE (LEVEL) Resource manager Heap Transaction 570 LSN (previous) 0/0188AC58 (0/0188AC20) Operation INSERT+INIT Relation Database 16384 Table (or object) 16387 Using the following process will give you the object pointed: psql --cluster 11/minimal testdb -c 'select relfilenode, relname from pg_class where relfilenode=16387' relfilenode | relname -------------+--------- 16387 | t1 (1 row) 51 / 76
  • 52.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT ABOUT LOGICAL REPLICATION? 52 / 76
  • 53.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT ABOUT LOGICAL REPLICATION? Approximate duration : 15 minutes Target : Logical replication is not “shown” in WAL les, WAL resources manager for logical replication are not used for that. We can also explore PostgreSQL logical directory tree for logical replication. Files : 01_create_world.sh connects to the logical primary to create a database, a table and a publication on that table. 02_create_logical_repl.sql are run on logical "primary" 03_create_logical_subs.sql will be run on "secondary" 53 / 76
  • 54.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT ABOUT LOGICAL REPLICATION? How it works (Exercise_2 done by 01_create_world.sh): 02_create_logical_repl.sql must be run on logicalprimary Create a database on primary publishdb Create a table in that database pub_table Create a PUBLICATION on pub_table Create a replication user with REPLICATION role and grant him SELECT on pub_table 03_create_logical_subs.sql must be run on logicalsecondary Create a subdb database Create a table pub_table in subdb Create a SUBSCRIPTION for pub_table 54 / 76
  • 55.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! WHAT ABOUT LOGICAL REPLICATION? Try to stop the subscriber and create insert traf c on publisher. Look at WAL directory growing in size. Another fun stuff to do: Restart subscriber rst Insert data on subscriber table Insert the same data on publisher Check out log les, and pg_wal directory Remove the con icting data on subscriber Check out the wal directory and subscriber keeping up 55 / 76
  • 56.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR 56 / 76
  • 57.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR Approximate duration : 30 minutes Target : First PITR + archive recovery until an identi ed event before a disaster. Files : 03_0_createimportantdb.sh creates both primary and standby servers + streaming replication. Launches 03_1_createimportabtdb.sql at the end 03_1_createimportantdb.sql creates database, tables, launches backup, lls with data and creates disasters. 03_2_digress.sh a simple digression on wal replay control, launches 03_1_createimportabtdb.sql again against primary and 03_2_digress.sql on standby 57 / 76
  • 58.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR WHAT TO DO : (EXERCISE_3) This rst part is already done by 03_0_create_importantdb.sh : Create a primary cluster Create a recovery cluster On primary Create 2 tables Add data to both tables Create a cluster backup with pg_basebackup Add data to onetable (with random quantity) Get the current_wal_lsn and wal le Delete data on the table ← disaster #1 Get current_wal_lsn and wal le Drop the second table ← disaster #2 58 / 76
  • 59.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR Just take a minute ( les 03_2_digress.sh and 03_2_digress.sql): On secondary on importantdb as postgres user : launch select pg_wal_replay_pause(); select * from importantlog order by id limit 1 for memory On primary relaunch 03_1_create_importantdb.sql 59 / 76
  • 60.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR Connect secondary on importantdb as postgres user: select pg_is_wal_replay_paused() select * from importantlog order by id limit 1 for memory (no changes) select pg_last_wal_receive_lsn(); will give the last received wal from primary select pg_last_wal_replay_lsn(); will give the last replayed wal on secondary select pg_wal_replay_resume(); will replay wal on secondary select * from importantlog order by id limit 1 to compare We can see here that we can have control on WAL replay on standby servers as well as have the ability so see which data are correctly transferred from primary to standby servers. 60 / 76
  • 61.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR BACK TO WAL EXERCISE: Analyze WAL les and identify both DELETE and DROP Xacts (notice DROP is not explicit). pg_waldump is your friend. Stop secondary Restore backup and WAL to the transaction on a new cluster (replica_recovery) to a point just before rst disaster : Create a new cluster (stopped) and remove cluster $PGDATA les Copy backuped les from ~/backup/11/replica_primary → replica_recovery $PGDATA Create/change recovery.conf le to De ne restore_command to copy WAL les from ~/wal_archives/... → ${PGDATA}/pg_wal De ne the recovery_target_{xid,inclusive}. De ne the recovery_target_action if needed. 61 / 76
  • 62.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! PRECISE PITR BACK TO WAL EXERCISE: Restore up to before the second disaster. Change recovery mode to production mode. 62 / 76
  • 63.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! DEALING WITH SPLITBRAIN SITUATION 63 / 76
  • 64.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! DEALING WITH SPLITBRAIN SITUATION Approximate duration: 15 minutes Target: pg_rewind use exploration Files: 04_0_create_instances.sh 04_1_create_db_and_tables.sql 04_2_feed_db.sql 64 / 76
  • 65.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! DEALING WITH SPLITBRAIN SITUATION WHAT TO DO :(EXERCISE_4) Handled by 04_0_create_instances.sh Create two clusters in Streaming replication with archiving (one primary one standby) On primary create a database with some tables and add some “good data” Promote the standby cluster Insert data into promoted cluster Insert data into former primary You are now in a splitbrain con guration 65 / 76
  • 66.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! DEALING WITH SPLITBRAIN SITUATION WHAT TO DO : Stop primary Use pg_rewind using dry-run to identify the split point in time (look at the –source-server argument) Use pg_rewind to resync the former primary with promoted server Create a recovery.conf le to change the former primary into promoted standby's standby using streaming replication (eventually use restore_command in order to point wal archive path) Restart former primary and check its (standby) state using the log le and psql 66 / 76
  • 67.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! HOW TO DEAL WITH DISASTERS? 67 / 76
  • 68.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! HOW TO DEAL WITH DISASTERS? Approximate duration: 15 minutes Target: pg_resetwal simple use to recover after a disaster Files: 00_create_crashable.sh 68 / 76
  • 69.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! HOW TO DEAL WITH DISASTERS? WHAT TO DO (EXERCISE_5) Handled by 00_create_crashable.sh Create a simple cluster, a database and a table Insert some elements Force CHECKPOINT and get lsn Sleep 2 seconds and get lsn Insert some other elements and get lsn Insert other elements and get current lsn and WAL le Crash (pg_ctl -m immediate stop) Corrupt the current WAL le (using shell commands) Try to restart the cluster 69 / 76
  • 70.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! HOW TO DEAL WITH DISASTERS? STOP THE CLUSTER DO NOT WORK ON PRODUCTION SERVER, ALWAYS ON A COPY! Create another cluster stopped Copy crashable cluster to that new cluster crashable_recover (i.e. remove les from PGDATA and copy les from crashable PGDATA) On crashable_recover Use pg_resetwal to recover Restart crashable_recover cluster and look at the data Use pg_dump to get a copy then restore it to a new cluster and check inconsistencies 70 / 76
  • 71.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com HANDS-ON! HOW TO DEAL WITH DISASTERS? Use pg_resetwal only in last resort if you have no other solution with corrupted wal Once the cluster is restarted, do not attempt to make write operations on data: dump the database, restore it on another cluster, and check it for inconsistencies. Demo of kill -9 side effects on PostgreSQL. Sum up: Try to avoid kill -9 kill -9 => keeps resources (ipcs), pid les, sockets... 71 / 76
  • 72.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com SO! 72 / 76
  • 73.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com SO! WRAP UP WHAT DID WE LEARN ? PostgreSQL WAL contains lots of events/activity We can use those events to Search operations on a given event Recover to a Point In Time Resynchronize from splitbrain situations We know how to overcome WAL corruptions Tools, functions and settings around WAL 73 / 76
  • 74.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com SO! SLIDES AND SOURCES Slides will be available on the pgconf.eu website by the end of the conference. Sources are available at : https://gitlab.com/loxo-trainings/dig-the-wal 74 / 76
  • 75.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com SO! DON'T FORGET Feedbacks (training+conference) : https://2018.pgconf.eu/f 75 / 76
  • 76.  LOXODATA Dig the WAL- PGConf.eu 2018 - Lisbon - 2018-10-23 -               -  cc-by-nc@saschild s.schildknecht@loxodata.com @jcarnu jc.arnu@loxodata.com SO! THANK YOU! For any further question :    or   jc.arnu@loxodata.com s.schildknecht@loxodata.com 76 / 76