Mvcc in postgreSQL 권건우

PgDay.Seoul
PgDay.SeoulPgDay.Seoul
PGDay Seoul 2016
2016.10.15
Multi Version Concurrency Control
In PostgreSQL (PostgreSQL 9.4)
권건우
Table of Agenda
Ⅰ. MVCC 정의 및 역사
Ⅱ. MVCC에 대한 두가지 접근법
Ⅲ. Deep Dive into MVCC in PostgreSQL
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅰ. MVCC 정의 및 역사
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅰ. MVCC 정의 및 역사
Writing transactions does not prevent reading and vice versa,
because each one sees its own version of the database.
출처 - https://en.wikipedia.org/wiki/Firebird_(database_server)#The_Multi-Generational_Architecture_.28MGA.29
MVCC (Multi Version Concurrency Control)
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅰ. MVCC 정의 및 역사
• The Data Independence
• Set Processing
• High level language
1970년 E. F. Codd 박사의 논문
Traditional approaches to the synchronization problems of shared data accessed by concurrently
running computations have relied on mutual exclusion – the ability of one computation to stop the
execution of other other computations that might access or change shared data accessed by that
computation. Our approach is quite different. We regard an object that is modifiable as a sequence of
immutable versions. each version is the state of the object after an update is made to the object.
1978년 David Patric Reed 박사학위논문 MIT
1981년 PHILIP A. BERNSTEIN AND NATHAN GOODMAN 논문
• Multiversion Reading and Writing
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
출처 - Bernstein, Philip A.; Goodman, Nathan (1981). "Concurrency Control in Distributed Database Systems". ACM Computing Surveys.
Ⅰ. MVCC 정의 및 역사
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
1984년 Jim Starkey
• The first shipping, commercial database software product featuring
MVCC was Digital's VAX Rdb/ELN. The second was InterBase, both of
which are still active, commercial products.
• Multi Generation Architecture
1986년 Bob Miner
• 1986년 Oracle version 6 에서 Rollback Segment 도입
출처 - https://en.wikipedia.org/wiki/Multiversion_concurrency_control
Ⅰ. MVCC 정의 및 역사
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
1999년 Mikheev, Vadim B.
Ⅰ. MVCC 정의 및 역사
• 1999년 Vadim 이 PostgreSQL 6.5 에 MVCC 아키텍쳐를 도입함
출처 - Bruce Momjian, “get to know PostgreSQL”
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅱ. MVCC에 대한 두가지 접근법
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법
• PostgreSQL, Firebird/Interbase, SQL Server 해당
• 데이터베이스에 다중 버전의 레코드를 저장
• 더 이상 필요하지 않을 때 모아둔 레코드를 버림
접근법 1
• Oracle, MySQL/InnoDB 해당
• 최신 버전의 데이터만 데이터베이스 내에 저장
• 언두를 이용하여 이전 버전의 데이터를 재구성
접근법 2
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법
2. Second Approach1. First Approach
10021
10021
10024
10008
10024
10011
10021
10021
10008
SELECT
(SCN 10023)
Data Blocks
Rollback Segment
레코드1
레코드2(v1)
레코드3
레코드4
「레코드 2(v1)」를
「레코드 2(v2)」로 갱신
파일 중에 4건의 레코드가
순서대로 나열됨
• 레코드 갱신처리 (UPDATE)
레코드1
레코드2(v1)
레코드3
레코드4
레코드2(v2)
레코드2(v1)에 삭제 표시가 생겨,
레코드2(v2)가 새롭게 추가되고
파일 사이즈도 증가됨
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법
Database PostgreSQL Oracle SQL Server
Storage for
Old Versions
In the main segment
(Heap/Index)
In the separate segment
(Rollback Segment/Undo)
In the separate database
(tempdb – known as version store)
Size of Tuple
Header (bytes)
24 3
Fixed – 4
Variable – 14
Clean up Vacuum System Monitor Process (SMON) Ghost Cleanup task
 PostgreSQL VS Oracle VS SQL Server
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
출처 - http://www.siue.edu/~dbock/cmis565/module10-undo_data.htm 출처 - https://riddle.ru/mirrors/oracledocs/server/scn73/ch1001.html
Ⅱ. MVCC에 대한 두 가지 접근법 - Oracle
Table
Undo Image
New Image from the
Update DML Command
UPDATE employee
SET emp_addr =
…
SELECT emp_addr
FROM employee
WHERE …
10021
10021
10024
10008
10024
10011
10021
10021
10008
SELECT
(SCN 10023)
Data Blocks
Rollback Segment
Read Consistency
CR Block 생성
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - Oracle
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - Oracle
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL
출처 - http://pgsqldeepdive.blogspot.kr/2012/12/postgresql_16.html
오라클처럼 replace되는 것이 아니라
레코드2(v1)에 삭제 표시(xmax)가 생겨,
레코드2(v2)가 새롭게 추가되고 파일 사이즈도 증가됨
파일 중에 4건의 레코드가 순서대로 나열됨
「레코드 2(v1)」를
「레코드 2(v2)」로 갱신
xmin 레코드1
xmax,
infomask2,
infomask
레코드2(v1)
xmin 레코드3
xmin 레코드4
xmin,
infomask2,
infomask
레코드2(v2)
xmin 레코드1
xmin 레코드2 (v1)
xmin 레코드3
xmin 레코드4
 레코드 갱신처리(UPDATE)
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1Tuple2Tuple3
Tuple Header
line pointer2000
801f
Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL
t_xmin t_xmax
t_field3
(cmin,cmax,t_xvac)
• t_xmin: insert 시의 XID
• t_xmax: delete 시의 XID
• t_field3: t_cid, t_xvac 로 구성
• t_cid: insert, delete command id (cmin, cmax)
• t_xvac: 이전 full vacuum의 트랜잭션 ID를 추적 가능
• t_ctid: 해당 튜플의 현재 버전을 가리키는 포인터
block id data(4bytes) + offset number (2bytes)
• t_infomask2: 앞의 2자리는 변경 커맨드 정보, 뒤의 2자리는 컬럼 수
• t_infomask: commit 여부
• t_hoff: 튜플 헤더의 길이, 유저 데이터의 시작 주소
• t_bits: null 값의 variable length bitmap
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
 레코드 갱신처리(UPDATE)
② update t2 set c2='B' where c1 = 'A1001' ;예)
pd_lower
(freespace 시작)
pd_upper
(freespace 끝)
items
t_xmin
t_xmax
t_infomask2
t_infomask
Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅲ. Deep Dive into MVCC in PostgreSQL
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1, A
line pointer
Ⅲ. Deep Dive into MVCC in PostgreSQL
• Insert (Tuple1, A)
001c
1d10
세션1 세션2 세션3
t_xmin 2a9
t_xmax 0
ctid (0,1)
Tuple 1, A
t_xmin 2a9
t_xmax 0
t_ctid (0,1)
세션0
Begin;
Insert (Tuple1, A)
Commit;
①
② Read Only 후, Select
ctid
(0,1)
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1, A
Ⅲ. Deep Dive into MVCC in PostgreSQL
• Update (Tuple1, B)
세션1 세션2 세션3
t_xmin 2a9
t_xmax 2aa
t_ctid (0,2)
Tuple1, B
line pointer0020
1a20
t_xmin 2aa
t_xmax 0
t_ctid (0,2)
Select② Read Only 후, Select③
t_xmin 2a9
t_xmax 2aa
ctid (0,1)
Tuple 1, A
t_xmin 2aa
t_xmax 0
ctid (0,2)
Tuple 1, B
ctid
(0,1)
ctid
(0,2)
세션0
Begin;
Update (Tuple1, B)
Commit;
①
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1, A
세션1 세션2 세션3
t_xmin 2a9
t_xmax 2aa
t_ctid (0,2)
Tuple1, B
0024
1730
t_xmin 2aa
t_xmax 2ab
t_ctid (0,3)
Select② Select③
ctid
(0,1)
t_xmin 2a9
t_xmax 2aa
ctid (0,1)
Tuple 1, A
t_xmin 2aa
t_xmax 2ab
ctid (0,2)
Tuple 1, B
Tuple1, C
line pointer
ctid
(0,2)
ctid
(0,3)
Read Only 후, Select④
t_xmin 2ab
t_xmax 0
ctid (0,3)
Tuple 1, C
• Update (Tuple1, C)
t_xmin 2ab
t_xmax 0
t_ctid (0,3)
세션0
Begin;
Update (Tuple1, C)
Commit;
①
Ⅲ. Deep Dive into MVCC in PostgreSQL
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1, A
Ⅲ. Deep Dive into MVCC in PostgreSQL
세션1 세션2 세션3
Tuple1, B
0028
1440
t_xmin 2aa
t_xmax 2ab
t_ctid (0,3)
Select② Select③
ctid
(0,1)
t_xmin 2a9
t_xmax 2aa
ctid (0,1)
Tuple 1, A
t_xmin 2aa
t_xmax 2ab
ctid (0,2)
Tuple 1, B
Tuple1, C
ctid
(0,2)
ctid
(0,3)
Select④
t_xmin 2ab
t_xmax 2ac
ctid (0,3)
Tuple 1, C
• Update (Tuple1, D) ctid
(0,4)
Tuple
1, D
line pointer
t_xmin 2ab
t_xmax 2ac
t_ctid (0,4)
t_xmin 2a9
t_xmax 2aa
t_ctid (0,2)
t_xmin 2ac
t_xmax 0
t_ctid (0,4)
세션0
Begin;
Update (Tuple1, D)
Commit;
①
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1, A
Ⅲ. Deep Dive into MVCC in PostgreSQL
• Update (Tuple1, B)
세션1 세션2
t_xmin 2a9
t_xmax 2aa
t_ctid (0,2)
Tuple1, B
line pointer0020
1a20
t_xmin 2aa
t_xmax 0
t_ctid (0,2)
t_xmin 2a9
t_xmax 2aa
ctid (0,1)
Tuple 1, A
Lock
ctid
(0,1)
ctid
(0,2)
세션0
Begin;
Update (Tuple1, B)
Commit은 안함
①
Select② Update (Tuple1, C)③
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅲ. Deep Dive into MVCC in PostgreSQL
 Oracle
• 시간 정보 “SCN”과 공간 정보 “XID”를 복합적으로 활용하여 트랜잭션을 처리함
• Commit SCN은 트랜잭션이 완료될 때 부여됨
 PostgreSQL, MySQL
• XID가 트랜잭션이 시작할 때 붙여지기 때문에 각각“Snapshot”과 “Readview”가 필요
• Snapshot structure
출처 - https://www.postgresql.org/files/developer/internalpics.pdf
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Ⅲ. Deep Dive into MVCC in PostgreSQL
• 시나리오
Transaction Counter at query start: 90, 106, 120
Open Transaction: 105
100
t_xmin t_xmax
SELECT (XID 90)
105101
110104
110
100
t_xmin t_xmax
SELECT (XID 106)
105101
110104
110
100
t_xmin t_xmax
SELECT (XID 120)
105101
110104
110
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Special
Page
Header
Tuple1Tuple2Tuple3
Tuple Header
line pointer
2000
801f
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
t_xmin t_xmax
t_field3
(cmin,cmax,t_xvac)
• t_xmin: insert 시의 XID
• t_xmax: delete 시의 XID
• t_field3: t_cid, t_xvac 로 구성
• t_cid: insert, delete command id (cmin, cmax)
• t_xvac: 이전 full vacuum의 트랜잭션 ID를 추적 가능
• t_ctid: 해당 튜플의 현재 버전을 가리키는 포인터
block id data(4bytes) + offset number (2bytes)
• t_infomask2: 앞의 2자리는 변경 커맨드 정보, 뒤의 2자리는 컬럼 수
• t_infomask: commit 여부
• t_hoff: 튜플 헤더의 길이, 유저 데이터의 시작 주소
• t_bits: null 값의 variable length bitmap
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
t_xmin t_xmax
t_field3
t_cid/t_xvac
t_ctid 중
block id data
4bytes 4bytes 4bytes 4bytes
t_ctid 중
offset
t_infoma
sk2
t_infomas
k
t_hoff 사용자
2 bytes 2 bytes 2 bytes 1 bytes 9bytes
001380 69 31 00 00 6b 31 00 00 00 00 00 00 00 00 00 00 >i1..k1..........<
001390 64 00 01 20 02 01 18 00 11 31 39 39 20 20 20 20 >d.. .....199 <
예)
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
 Dump 00 7c 9f 80
 SELECT * from heap_page_items(get_raw_page('t2', 0));
• heap_page_items : 테이블 내의 데이터
• get_raw_page : 페이지를 나타내는 byte array
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Name Body Description
HEAP_NATTS_MASK
0x07FF 11 bits for number of attributes
0x1800 bits 0x1800 are available
HEAP_KEYS_UPDATED 0x2000
tuple was updated and key cols modified, or tuple
deleted
HEAP_HOT_UPDATED 0x4000 tuple was HOT-updated
HEAP_ONLY_TUPLE 0x8000 this is heap-only tuple
HEAP2_XACT_MASK 0xE000 visibility-related bits
 t_infomask2
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
 t_infomask2
Command Dump Meaning
commit
insert 0003
delete 2003
rollback 0003
0003
0x0003
number of attributes (컬럼 수 3개)
0x000
2003
0x0003
number of attributes (컬럼 수 3개)
0x2000
tuple was updated and key cols
modified or tuple deleted
0003
0x0003
number of attributes (컬럼 수 3개)
0x000
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Name Body Description
HEAP_HASNULL 0x0001 has null attribute(s)
HEAP_HASVARWIDTH 0x0002 has variable-width attribute(s)
HEAP_HASEXTERNAL 0x0004 has external stored attribute(s)
HEAP_HASOID 0x0008 has an object-id field
HEAP_XMAX_KEYSHR_LOCK 0x0010 xmax is a key-shared locker
HEAP_COMBOCID 0x0020 t_cid is a combo cid
HEAP_XMAX_EXCL_LOCK 0x0040 xmax is exclusive locker
HEAP_XMAX_LOCK_ONLY 0x0080 xmax, if valid, is only a locker
 t_infomask
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
Name Body Description
HEAP_XMIN_COMMITTED 0x0100 t_xmin committed
HEAP_XMIN_INVALID 0x0200 t_xmin invalid/aborted
HEAP_XMIN_FROZEN 0X0300
(HEAP_XMIN_COMMITTED |
HEAP_XMIN_INVALID)
HEAP_XMAX_COMMITTED 0x0400 t_xmax committed
HEAP_XMAX_INVALID 0x0800 t_xmax invalid/aborted
HEAP_XMAX_IS_MULTI 0x1000 t_xmax is a MultiXactId
HEAP_UPDATED 0x2000 this is UPDATEd version of row
HEAP_MOVED_OFF 0x4000
• moved to another place by pre-9.0
• VACUUM FULL; kept for binary
• upgrade support
HEAP_MOVED_IN 0x8000
• moved from another place by pre-9.0
• VACUUM FULL; kept for binary
• upgrade support
HEAP_XACT_MASK 0xFFF0 visibility-related bits
 t_infomask
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
 t_infomask
Command Dump Meaning
commit
insert 0902
delete 0502
update
delete : 0502
insert : 2902
0902
0x0002
variable-width attributes
0x0900
( 0x0100 + 0x0800 )
xmin committed + xmax invalid
0502
0x0002
variable-width attributes
0x0500
( 0x0100 + 0x0400 )
xmin committed + xmax committed
2902
0x0002
variable-width attributes
0x2900
( 0x2000 + 0x0900 )
updated version of row + insert와 동일
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016
 t_infomask
Command Dump Meaning
rollback 0A02
cf) null이 있는 경우
insert : 0903
rollback : 0A03
0A02
0x0002
variable-width attributes
0x0A00
( 0x0200 + 0x0800 )
xmin invalid + xmax invalid
0A03
0x0003
( 0x0001 + 0x0002 )
has null attribute(s) + variable-width
0x0A00
( 0x0200 + 0x0800 )
xmin invalid + xmax invalid
attributes
[별첨] Tuple Header
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
PG_DAY 2016Reference
1.Bernstein, Philip A.; Goodman, Nathan (1981). "Concurrency Control in Distributed Database Systems". ACM Computing Surveys.
2.Reed, David P. (September 21, 1978). "Naming and Synchronization in a Decentralized Computer System". MIT dissertation.
3.https://en.wikipedia.org/wiki/Edgar_F._Codd
4.https://en.wikipedia.org/wiki/David_P._Reed
5.https://www.microsoft.com/en-us/research/people/philbe/
6.https://en.wikipedia.org/wiki/Jim_Starkey
7.https://www.linkedin.com/in/jistarkey
8.http://www.enterprisedb.com/postgres-plus-edb-blog/amit-kapila/well-known-databases-use-different-approaches-mvcc
9.https://riddle.ru/mirrors/oracledocs/server/scn73/ch1001.html
10.http://www.siue.edu/~dbock/cmis565/module10-undo_data.htm
11.https://en.wikipedia.org/wiki/PostgreSQL
12.https://pgconf.ru/media/2016/05/13/tuple-internals.pdf
13.Dibyendu Majumdar,(November 4, 2007). “A Quick Survery of MultiVersion Concurrency Algorithms”
14.Bruce Mamjian, “MVCC unmasked”
cafe.naver.com/playexem
Q & A
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
NAVER http://cafe.naver.com/playexem
ITPUB (中) http://blog.itpub.net/31135309/
Wordpress https://playexem.wordpress.com/
Slideshare http://www.slideshare.net/playexem
교육 문의: 연구컨텐츠팀 김숙진
edu@ex-em.com
• EXEM Research & Contents Team
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Youtube https://www.youtube.com/channel/UC5wK
R_-A0eL_Pn_EMzoauJg
Tudou (中) http://www.tudou.com/home/maxgauge/
Thank You
cafe.naver.com/playexem
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1 of 42

Recommended

[Pgday.Seoul 2020] SQL Tuning by
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL TuningPgDay.Seoul
1.2K views44 slides
PostgreSQL 튜닝워크샵 (2017년8월) by
PostgreSQL 튜닝워크샵 (2017년8월)PostgreSQL 튜닝워크샵 (2017년8월)
PostgreSQL 튜닝워크샵 (2017년8월)DBdemy
10.9K views207 slides
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL by
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQLPgDay.Seoul
420 views20 slides
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자 by
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자PgDay.Seoul
4.3K views14 slides
PostgreSQL 공간관리 살펴보기 이근오 by
PostgreSQL 공간관리 살펴보기 이근오PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오PgDay.Seoul
2.1K views45 slides
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정 by
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정PgDay.Seoul
188 views33 slides

More Related Content

What's hot

[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱 by
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱PgDay.Seoul
178 views30 slides
Introduction to PostgreSQL by
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQLJim Mlodgenski
6.5K views52 slides
mongodb와 mysql의 CRUD 연산의 성능 비교 by
mongodb와 mysql의 CRUD 연산의 성능 비교mongodb와 mysql의 CRUD 연산의 성능 비교
mongodb와 mysql의 CRUD 연산의 성능 비교Woo Yeong Choi
31.7K views69 slides
Pgday bdr 천정대 by
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대PgDay.Seoul
1.6K views28 slides
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱 by
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱PgDay.Seoul
931 views62 slides
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기 by
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기PgDay.Seoul
3.1K views20 slides

What's hot(20)

[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱 by PgDay.Seoul
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
PgDay.Seoul178 views
Introduction to PostgreSQL by Jim Mlodgenski
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Jim Mlodgenski6.5K views
mongodb와 mysql의 CRUD 연산의 성능 비교 by Woo Yeong Choi
mongodb와 mysql의 CRUD 연산의 성능 비교mongodb와 mysql의 CRUD 연산의 성능 비교
mongodb와 mysql의 CRUD 연산의 성능 비교
Woo Yeong Choi31.7K views
Pgday bdr 천정대 by PgDay.Seoul
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대
PgDay.Seoul1.6K views
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱 by PgDay.Seoul
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
PgDay.Seoul931 views
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기 by PgDay.Seoul
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
PgDay.Seoul3.1K views
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재 by PgDay.Seoul
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
PgDay.Seoul413 views
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization by PgDay.Seoul
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
PgDay.Seoul238 views
Mongo DB 성능최적화 전략 by Jin wook
Mongo DB 성능최적화 전략Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략
Jin wook17.6K views
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver] by MongoDB
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
MongoDB5.4K views
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우 by PgDay.Seoul
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
PgDay.Seoul4.5K views
MySQL8.0_performance_schema.pptx by NeoClova
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
NeoClova402 views
Introduction to Vacuum Freezing and XID by PGConf APAC
Introduction to Vacuum Freezing and XIDIntroduction to Vacuum Freezing and XID
Introduction to Vacuum Freezing and XID
PGConf APAC5.4K views
PostGreSQL Performance Tuning by Maven Logix
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance Tuning
Maven Logix 600 views
[2019] 200만 동접 게임을 위한 MySQL 샤딩 by NHN FORWARD
[2019] 200만 동접 게임을 위한 MySQL 샤딩[2019] 200만 동접 게임을 위한 MySQL 샤딩
[2019] 200만 동접 게임을 위한 MySQL 샤딩
NHN FORWARD545 views
MySQL_MariaDB-성능개선-202201.pptx by NeoClova
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
NeoClova624 views
Deep dive into PostgreSQL statistics. by Alexey Lesovsky
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
Alexey Lesovsky3.7K views
Postgresql Database Administration- Day3 by PoguttuezhiniVP
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3
PoguttuezhiniVP73 views

Similar to Mvcc in postgreSQL 권건우

PostgreSQL and JDBC: striving for high performance by
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performanceVladimir Sitnikov
7.1K views61 slides
Eclipse IoT Talk (Montreal JUG) by
Eclipse IoT Talk (Montreal JUG)Eclipse IoT Talk (Montreal JUG)
Eclipse IoT Talk (Montreal JUG)Mike Milinkovich
574 views83 slides
Microservices @ Work - A Practice Report of Developing Microservices by
Microservices @ Work - A Practice Report of Developing MicroservicesMicroservices @ Work - A Practice Report of Developing Microservices
Microservices @ Work - A Practice Report of Developing MicroservicesQAware GmbH
581 views28 slides
PeopleSoft Cloud Manager and Selective Adoption by
PeopleSoft Cloud Manager and Selective AdoptionPeopleSoft Cloud Manager and Selective Adoption
PeopleSoft Cloud Manager and Selective AdoptionGraham Smith
5.7K views45 slides
Squeak DBX by
Squeak DBXSqueak DBX
Squeak DBXESUG
2.2K views38 slides
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK) by
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)Jean-François Gagné
1.2K views55 slides

Similar to Mvcc in postgreSQL 권건우(20)

PostgreSQL and JDBC: striving for high performance by Vladimir Sitnikov
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performance
Vladimir Sitnikov7.1K views
Microservices @ Work - A Practice Report of Developing Microservices by QAware GmbH
Microservices @ Work - A Practice Report of Developing MicroservicesMicroservices @ Work - A Practice Report of Developing Microservices
Microservices @ Work - A Practice Report of Developing Microservices
QAware GmbH581 views
PeopleSoft Cloud Manager and Selective Adoption by Graham Smith
PeopleSoft Cloud Manager and Selective AdoptionPeopleSoft Cloud Manager and Selective Adoption
PeopleSoft Cloud Manager and Selective Adoption
Graham Smith5.7K views
Squeak DBX by ESUG
Squeak DBXSqueak DBX
Squeak DBX
ESUG2.2K views
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK) by Jean-François Gagné
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
Migration Steps from OWB 2 ODI by Gurcan Orhan
Migration Steps from OWB 2 ODIMigration Steps from OWB 2 ODI
Migration Steps from OWB 2 ODI
Gurcan Orhan4.5K views
Bandwidth: Use Cases for Elastic Cloud on Kubernetes by Elasticsearch
Bandwidth: Use Cases for Elastic Cloud on Kubernetes Bandwidth: Use Cases for Elastic Cloud on Kubernetes
Bandwidth: Use Cases for Elastic Cloud on Kubernetes
Elasticsearch1.8K views
Oracle Database Migration to Oracle Cloud Infrastructure by SinanPetrusToma
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud Infrastructure
SinanPetrusToma1.2K views
Tungsten University: Replicate Between MySQL And Oracle by Continuent
Tungsten University: Replicate Between MySQL And OracleTungsten University: Replicate Between MySQL And Oracle
Tungsten University: Replicate Between MySQL And Oracle
Continuent1.9K views
Migrating from oracle soa suite to microservices on kubernetes by Konveyor Community
Migrating from oracle soa suite to microservices on kubernetesMigrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetes
Konveyor Community830 views
O2 platform and ASP.NET MVC, by Michael Hidalgo by Dinis Cruz
O2 platform and ASP.NET MVC, by Michael HidalgoO2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael Hidalgo
Dinis Cruz3.6K views
Raising Abstraction in Timing Analysis for Vehicular Embedded Systems through... by Alessio Bucaioni
Raising Abstraction in Timing Analysis for Vehicular Embedded Systems through...Raising Abstraction in Timing Analysis for Vehicular Embedded Systems through...
Raising Abstraction in Timing Analysis for Vehicular Embedded Systems through...
Alessio Bucaioni101 views
Migration From Oracle to PostgreSQL by PGConf APAC
Migration From Oracle to PostgreSQLMigration From Oracle to PostgreSQL
Migration From Oracle to PostgreSQL
PGConf APAC8.9K views
Oracle Drivers configuration for High Availability by Ludovico Caldara
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High Availability
Ludovico Caldara590 views
GumGum: Multi-Region Cassandra in AWS by DataStax Academy
GumGum: Multi-Region Cassandra in AWSGumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWS
DataStax Academy6.6K views
DEFCON 23 - Etienne Martineau - inter vm data exfiltration by Felipe Prado
DEFCON 23 - Etienne Martineau - inter vm data exfiltrationDEFCON 23 - Etienne Martineau - inter vm data exfiltration
DEFCON 23 - Etienne Martineau - inter vm data exfiltration
Felipe Prado24 views

More from PgDay.Seoul

[pgday.Seoul 2022] PostgreSQL with Google Cloud by
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google CloudPgDay.Seoul
229 views49 slides
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기 by
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기PgDay.Seoul
498 views17 slides
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기 by
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기PgDay.Seoul
940 views40 slides
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스 by
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스PgDay.Seoul
1.5K views29 slides
[Pgday.Seoul 2019] Advanced FDW by
[Pgday.Seoul 2019] Advanced FDW[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDWPgDay.Seoul
412 views30 slides
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개 by
[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개PgDay.Seoul
3K views13 slides

More from PgDay.Seoul(18)

[pgday.Seoul 2022] PostgreSQL with Google Cloud by PgDay.Seoul
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud
PgDay.Seoul229 views
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기 by PgDay.Seoul
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
PgDay.Seoul498 views
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기 by PgDay.Seoul
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
PgDay.Seoul940 views
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스 by PgDay.Seoul
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
PgDay.Seoul1.5K views
[Pgday.Seoul 2019] Advanced FDW by PgDay.Seoul
[Pgday.Seoul 2019] Advanced FDW[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDW
PgDay.Seoul412 views
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개 by PgDay.Seoul
[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개
PgDay.Seoul3K views
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha by PgDay.Seoul
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
PgDay.Seoul1.1K views
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA by PgDay.Seoul
[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA
PgDay.Seoul786 views
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기 by PgDay.Seoul
[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기
PgDay.Seoul1.2K views
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계 by PgDay.Seoul
[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계
PgDay.Seoul1.6K views
[Pgday.Seoul 2018] replacing oracle with edb postgres by PgDay.Seoul
[Pgday.Seoul 2018] replacing oracle with edb postgres[Pgday.Seoul 2018] replacing oracle with edb postgres
[Pgday.Seoul 2018] replacing oracle with edb postgres
PgDay.Seoul606 views
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종 by PgDay.Seoul
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
PgDay.Seoul434 views
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진 by PgDay.Seoul
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
PgDay.Seoul2.4K views
[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명 by PgDay.Seoul
[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명
[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명
PgDay.Seoul572 views
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오 by PgDay.Seoul
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
PgDay.Seoul1.4K views
PostgreSQL 9.6 새 기능 소개 by PgDay.Seoul
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개
PgDay.Seoul3.2K views
pg_hba.conf 이야기 by PgDay.Seoul
pg_hba.conf 이야기pg_hba.conf 이야기
pg_hba.conf 이야기
PgDay.Seoul831 views
Pg report 20161010_02 by PgDay.Seoul
Pg report 20161010_02Pg report 20161010_02
Pg report 20161010_02
PgDay.Seoul342 views

Recently uploaded

DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... by
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...Deltares
13 views34 slides
Roadmap y Novedades de producto by
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
50 views33 slides
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDeltares
17 views13 slides
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDeltares
7 views23 slides
SAP FOR TYRE INDUSTRY.pdf by
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
24 views3 slides
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...Deltares
12 views23 slides

Recently uploaded(20)

DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... by Deltares
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
Deltares13 views
Roadmap y Novedades de producto by Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j50 views
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares17 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares12 views
Neo4j y GenAI by Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j45 views
Headless JS UG Presentation.pptx by Jack Spektor
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptx
Jack Spektor7 views
El Arte de lo Possible by Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j39 views
Citi TechTalk Session 2: Kafka Deep Dive by confluent
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
confluent17 views
Consulting for Data Monetization Maximizing the Profit Potential of Your Data... by Flexsin
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Flexsin 15 views
SUGCON ANZ Presentation V2.1 Final.pptx by Jack Spektor
SUGCON ANZ Presentation V2.1 Final.pptxSUGCON ANZ Presentation V2.1 Final.pptx
SUGCON ANZ Presentation V2.1 Final.pptx
Jack Spektor22 views
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon by Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares15 views
Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views

Mvcc in postgreSQL 권건우

  • 1. PGDay Seoul 2016 2016.10.15 Multi Version Concurrency Control In PostgreSQL (PostgreSQL 9.4) 권건우
  • 2. Table of Agenda Ⅰ. MVCC 정의 및 역사 Ⅱ. MVCC에 대한 두가지 접근법 Ⅲ. Deep Dive into MVCC in PostgreSQL [별첨] Tuple Header
  • 3. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅰ. MVCC 정의 및 역사
  • 4. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅰ. MVCC 정의 및 역사 Writing transactions does not prevent reading and vice versa, because each one sees its own version of the database. 출처 - https://en.wikipedia.org/wiki/Firebird_(database_server)#The_Multi-Generational_Architecture_.28MGA.29 MVCC (Multi Version Concurrency Control)
  • 5. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅰ. MVCC 정의 및 역사 • The Data Independence • Set Processing • High level language 1970년 E. F. Codd 박사의 논문 Traditional approaches to the synchronization problems of shared data accessed by concurrently running computations have relied on mutual exclusion – the ability of one computation to stop the execution of other other computations that might access or change shared data accessed by that computation. Our approach is quite different. We regard an object that is modifiable as a sequence of immutable versions. each version is the state of the object after an update is made to the object. 1978년 David Patric Reed 박사학위논문 MIT 1981년 PHILIP A. BERNSTEIN AND NATHAN GOODMAN 논문 • Multiversion Reading and Writing
  • 6. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 출처 - Bernstein, Philip A.; Goodman, Nathan (1981). "Concurrency Control in Distributed Database Systems". ACM Computing Surveys. Ⅰ. MVCC 정의 및 역사
  • 7. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 1984년 Jim Starkey • The first shipping, commercial database software product featuring MVCC was Digital's VAX Rdb/ELN. The second was InterBase, both of which are still active, commercial products. • Multi Generation Architecture 1986년 Bob Miner • 1986년 Oracle version 6 에서 Rollback Segment 도입 출처 - https://en.wikipedia.org/wiki/Multiversion_concurrency_control Ⅰ. MVCC 정의 및 역사
  • 8. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 1999년 Mikheev, Vadim B. Ⅰ. MVCC 정의 및 역사 • 1999년 Vadim 이 PostgreSQL 6.5 에 MVCC 아키텍쳐를 도입함 출처 - Bruce Momjian, “get to know PostgreSQL”
  • 9. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅱ. MVCC에 대한 두가지 접근법
  • 10. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 • PostgreSQL, Firebird/Interbase, SQL Server 해당 • 데이터베이스에 다중 버전의 레코드를 저장 • 더 이상 필요하지 않을 때 모아둔 레코드를 버림 접근법 1 • Oracle, MySQL/InnoDB 해당 • 최신 버전의 데이터만 데이터베이스 내에 저장 • 언두를 이용하여 이전 버전의 데이터를 재구성 접근법 2
  • 11. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 2. Second Approach1. First Approach 10021 10021 10024 10008 10024 10011 10021 10021 10008 SELECT (SCN 10023) Data Blocks Rollback Segment 레코드1 레코드2(v1) 레코드3 레코드4 「레코드 2(v1)」를 「레코드 2(v2)」로 갱신 파일 중에 4건의 레코드가 순서대로 나열됨 • 레코드 갱신처리 (UPDATE) 레코드1 레코드2(v1) 레코드3 레코드4 레코드2(v2) 레코드2(v1)에 삭제 표시가 생겨, 레코드2(v2)가 새롭게 추가되고 파일 사이즈도 증가됨
  • 12. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 Database PostgreSQL Oracle SQL Server Storage for Old Versions In the main segment (Heap/Index) In the separate segment (Rollback Segment/Undo) In the separate database (tempdb – known as version store) Size of Tuple Header (bytes) 24 3 Fixed – 4 Variable – 14 Clean up Vacuum System Monitor Process (SMON) Ghost Cleanup task  PostgreSQL VS Oracle VS SQL Server
  • 13. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 출처 - http://www.siue.edu/~dbock/cmis565/module10-undo_data.htm 출처 - https://riddle.ru/mirrors/oracledocs/server/scn73/ch1001.html Ⅱ. MVCC에 대한 두 가지 접근법 - Oracle Table Undo Image New Image from the Update DML Command UPDATE employee SET emp_addr = … SELECT emp_addr FROM employee WHERE … 10021 10021 10024 10008 10024 10011 10021 10021 10008 SELECT (SCN 10023) Data Blocks Rollback Segment Read Consistency CR Block 생성
  • 14. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - Oracle
  • 15. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - Oracle
  • 16. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL 출처 - http://pgsqldeepdive.blogspot.kr/2012/12/postgresql_16.html 오라클처럼 replace되는 것이 아니라 레코드2(v1)에 삭제 표시(xmax)가 생겨, 레코드2(v2)가 새롭게 추가되고 파일 사이즈도 증가됨 파일 중에 4건의 레코드가 순서대로 나열됨 「레코드 2(v1)」를 「레코드 2(v2)」로 갱신 xmin 레코드1 xmax, infomask2, infomask 레코드2(v1) xmin 레코드3 xmin 레코드4 xmin, infomask2, infomask 레코드2(v2) xmin 레코드1 xmin 레코드2 (v1) xmin 레코드3 xmin 레코드4  레코드 갱신처리(UPDATE)
  • 17. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1Tuple2Tuple3 Tuple Header line pointer2000 801f Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL
  • 18. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL t_xmin t_xmax t_field3 (cmin,cmax,t_xvac) • t_xmin: insert 시의 XID • t_xmax: delete 시의 XID • t_field3: t_cid, t_xvac 로 구성 • t_cid: insert, delete command id (cmin, cmax) • t_xvac: 이전 full vacuum의 트랜잭션 ID를 추적 가능 • t_ctid: 해당 튜플의 현재 버전을 가리키는 포인터 block id data(4bytes) + offset number (2bytes) • t_infomask2: 앞의 2자리는 변경 커맨드 정보, 뒤의 2자리는 컬럼 수 • t_infomask: commit 여부 • t_hoff: 튜플 헤더의 길이, 유저 데이터의 시작 주소 • t_bits: null 값의 variable length bitmap
  • 19. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016  레코드 갱신처리(UPDATE) ② update t2 set c2='B' where c1 = 'A1001' ;예) pd_lower (freespace 시작) pd_upper (freespace 끝) items t_xmin t_xmax t_infomask2 t_infomask Ⅱ. MVCC에 대한 두 가지 접근법 - PostgreSQL
  • 20. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅲ. Deep Dive into MVCC in PostgreSQL
  • 21. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1, A line pointer Ⅲ. Deep Dive into MVCC in PostgreSQL • Insert (Tuple1, A) 001c 1d10 세션1 세션2 세션3 t_xmin 2a9 t_xmax 0 ctid (0,1) Tuple 1, A t_xmin 2a9 t_xmax 0 t_ctid (0,1) 세션0 Begin; Insert (Tuple1, A) Commit; ① ② Read Only 후, Select ctid (0,1)
  • 22. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1, A Ⅲ. Deep Dive into MVCC in PostgreSQL • Update (Tuple1, B) 세션1 세션2 세션3 t_xmin 2a9 t_xmax 2aa t_ctid (0,2) Tuple1, B line pointer0020 1a20 t_xmin 2aa t_xmax 0 t_ctid (0,2) Select② Read Only 후, Select③ t_xmin 2a9 t_xmax 2aa ctid (0,1) Tuple 1, A t_xmin 2aa t_xmax 0 ctid (0,2) Tuple 1, B ctid (0,1) ctid (0,2) 세션0 Begin; Update (Tuple1, B) Commit; ①
  • 23. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1, A 세션1 세션2 세션3 t_xmin 2a9 t_xmax 2aa t_ctid (0,2) Tuple1, B 0024 1730 t_xmin 2aa t_xmax 2ab t_ctid (0,3) Select② Select③ ctid (0,1) t_xmin 2a9 t_xmax 2aa ctid (0,1) Tuple 1, A t_xmin 2aa t_xmax 2ab ctid (0,2) Tuple 1, B Tuple1, C line pointer ctid (0,2) ctid (0,3) Read Only 후, Select④ t_xmin 2ab t_xmax 0 ctid (0,3) Tuple 1, C • Update (Tuple1, C) t_xmin 2ab t_xmax 0 t_ctid (0,3) 세션0 Begin; Update (Tuple1, C) Commit; ① Ⅲ. Deep Dive into MVCC in PostgreSQL
  • 24. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1, A Ⅲ. Deep Dive into MVCC in PostgreSQL 세션1 세션2 세션3 Tuple1, B 0028 1440 t_xmin 2aa t_xmax 2ab t_ctid (0,3) Select② Select③ ctid (0,1) t_xmin 2a9 t_xmax 2aa ctid (0,1) Tuple 1, A t_xmin 2aa t_xmax 2ab ctid (0,2) Tuple 1, B Tuple1, C ctid (0,2) ctid (0,3) Select④ t_xmin 2ab t_xmax 2ac ctid (0,3) Tuple 1, C • Update (Tuple1, D) ctid (0,4) Tuple 1, D line pointer t_xmin 2ab t_xmax 2ac t_ctid (0,4) t_xmin 2a9 t_xmax 2aa t_ctid (0,2) t_xmin 2ac t_xmax 0 t_ctid (0,4) 세션0 Begin; Update (Tuple1, D) Commit; ①
  • 25. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1, A Ⅲ. Deep Dive into MVCC in PostgreSQL • Update (Tuple1, B) 세션1 세션2 t_xmin 2a9 t_xmax 2aa t_ctid (0,2) Tuple1, B line pointer0020 1a20 t_xmin 2aa t_xmax 0 t_ctid (0,2) t_xmin 2a9 t_xmax 2aa ctid (0,1) Tuple 1, A Lock ctid (0,1) ctid (0,2) 세션0 Begin; Update (Tuple1, B) Commit은 안함 ① Select② Update (Tuple1, C)③
  • 26. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅲ. Deep Dive into MVCC in PostgreSQL  Oracle • 시간 정보 “SCN”과 공간 정보 “XID”를 복합적으로 활용하여 트랜잭션을 처리함 • Commit SCN은 트랜잭션이 완료될 때 부여됨  PostgreSQL, MySQL • XID가 트랜잭션이 시작할 때 붙여지기 때문에 각각“Snapshot”과 “Readview”가 필요 • Snapshot structure 출처 - https://www.postgresql.org/files/developer/internalpics.pdf
  • 27. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Ⅲ. Deep Dive into MVCC in PostgreSQL • 시나리오 Transaction Counter at query start: 90, 106, 120 Open Transaction: 105 100 t_xmin t_xmax SELECT (XID 90) 105101 110104 110 100 t_xmin t_xmax SELECT (XID 106) 105101 110104 110 100 t_xmin t_xmax SELECT (XID 120) 105101 110104 110
  • 28. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. [별첨] Tuple Header
  • 29. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Special Page Header Tuple1Tuple2Tuple3 Tuple Header line pointer 2000 801f [별첨] Tuple Header
  • 30. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 t_xmin t_xmax t_field3 (cmin,cmax,t_xvac) • t_xmin: insert 시의 XID • t_xmax: delete 시의 XID • t_field3: t_cid, t_xvac 로 구성 • t_cid: insert, delete command id (cmin, cmax) • t_xvac: 이전 full vacuum의 트랜잭션 ID를 추적 가능 • t_ctid: 해당 튜플의 현재 버전을 가리키는 포인터 block id data(4bytes) + offset number (2bytes) • t_infomask2: 앞의 2자리는 변경 커맨드 정보, 뒤의 2자리는 컬럼 수 • t_infomask: commit 여부 • t_hoff: 튜플 헤더의 길이, 유저 데이터의 시작 주소 • t_bits: null 값의 variable length bitmap [별첨] Tuple Header
  • 31. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 t_xmin t_xmax t_field3 t_cid/t_xvac t_ctid 중 block id data 4bytes 4bytes 4bytes 4bytes t_ctid 중 offset t_infoma sk2 t_infomas k t_hoff 사용자 2 bytes 2 bytes 2 bytes 1 bytes 9bytes 001380 69 31 00 00 6b 31 00 00 00 00 00 00 00 00 00 00 >i1..k1..........< 001390 64 00 01 20 02 01 18 00 11 31 39 39 20 20 20 20 >d.. .....199 < 예) [별첨] Tuple Header
  • 32. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016  Dump 00 7c 9f 80  SELECT * from heap_page_items(get_raw_page('t2', 0)); • heap_page_items : 테이블 내의 데이터 • get_raw_page : 페이지를 나타내는 byte array [별첨] Tuple Header
  • 33. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Name Body Description HEAP_NATTS_MASK 0x07FF 11 bits for number of attributes 0x1800 bits 0x1800 are available HEAP_KEYS_UPDATED 0x2000 tuple was updated and key cols modified, or tuple deleted HEAP_HOT_UPDATED 0x4000 tuple was HOT-updated HEAP_ONLY_TUPLE 0x8000 this is heap-only tuple HEAP2_XACT_MASK 0xE000 visibility-related bits  t_infomask2 [별첨] Tuple Header
  • 34. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016  t_infomask2 Command Dump Meaning commit insert 0003 delete 2003 rollback 0003 0003 0x0003 number of attributes (컬럼 수 3개) 0x000 2003 0x0003 number of attributes (컬럼 수 3개) 0x2000 tuple was updated and key cols modified or tuple deleted 0003 0x0003 number of attributes (컬럼 수 3개) 0x000 [별첨] Tuple Header
  • 35. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Name Body Description HEAP_HASNULL 0x0001 has null attribute(s) HEAP_HASVARWIDTH 0x0002 has variable-width attribute(s) HEAP_HASEXTERNAL 0x0004 has external stored attribute(s) HEAP_HASOID 0x0008 has an object-id field HEAP_XMAX_KEYSHR_LOCK 0x0010 xmax is a key-shared locker HEAP_COMBOCID 0x0020 t_cid is a combo cid HEAP_XMAX_EXCL_LOCK 0x0040 xmax is exclusive locker HEAP_XMAX_LOCK_ONLY 0x0080 xmax, if valid, is only a locker  t_infomask [별첨] Tuple Header
  • 36. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016 Name Body Description HEAP_XMIN_COMMITTED 0x0100 t_xmin committed HEAP_XMIN_INVALID 0x0200 t_xmin invalid/aborted HEAP_XMIN_FROZEN 0X0300 (HEAP_XMIN_COMMITTED | HEAP_XMIN_INVALID) HEAP_XMAX_COMMITTED 0x0400 t_xmax committed HEAP_XMAX_INVALID 0x0800 t_xmax invalid/aborted HEAP_XMAX_IS_MULTI 0x1000 t_xmax is a MultiXactId HEAP_UPDATED 0x2000 this is UPDATEd version of row HEAP_MOVED_OFF 0x4000 • moved to another place by pre-9.0 • VACUUM FULL; kept for binary • upgrade support HEAP_MOVED_IN 0x8000 • moved from another place by pre-9.0 • VACUUM FULL; kept for binary • upgrade support HEAP_XACT_MASK 0xFFF0 visibility-related bits  t_infomask [별첨] Tuple Header
  • 37. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016  t_infomask Command Dump Meaning commit insert 0902 delete 0502 update delete : 0502 insert : 2902 0902 0x0002 variable-width attributes 0x0900 ( 0x0100 + 0x0800 ) xmin committed + xmax invalid 0502 0x0002 variable-width attributes 0x0500 ( 0x0100 + 0x0400 ) xmin committed + xmax committed 2902 0x0002 variable-width attributes 0x2900 ( 0x2000 + 0x0900 ) updated version of row + insert와 동일 [별첨] Tuple Header
  • 38. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016  t_infomask Command Dump Meaning rollback 0A02 cf) null이 있는 경우 insert : 0903 rollback : 0A03 0A02 0x0002 variable-width attributes 0x0A00 ( 0x0200 + 0x0800 ) xmin invalid + xmax invalid 0A03 0x0003 ( 0x0001 + 0x0002 ) has null attribute(s) + variable-width 0x0A00 ( 0x0200 + 0x0800 ) xmin invalid + xmax invalid attributes [별첨] Tuple Header
  • 39. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. PG_DAY 2016Reference 1.Bernstein, Philip A.; Goodman, Nathan (1981). "Concurrency Control in Distributed Database Systems". ACM Computing Surveys. 2.Reed, David P. (September 21, 1978). "Naming and Synchronization in a Decentralized Computer System". MIT dissertation. 3.https://en.wikipedia.org/wiki/Edgar_F._Codd 4.https://en.wikipedia.org/wiki/David_P._Reed 5.https://www.microsoft.com/en-us/research/people/philbe/ 6.https://en.wikipedia.org/wiki/Jim_Starkey 7.https://www.linkedin.com/in/jistarkey 8.http://www.enterprisedb.com/postgres-plus-edb-blog/amit-kapila/well-known-databases-use-different-approaches-mvcc 9.https://riddle.ru/mirrors/oracledocs/server/scn73/ch1001.html 10.http://www.siue.edu/~dbock/cmis565/module10-undo_data.htm 11.https://en.wikipedia.org/wiki/PostgreSQL 12.https://pgconf.ru/media/2016/05/13/tuple-internals.pdf 13.Dibyendu Majumdar,(November 4, 2007). “A Quick Survery of MultiVersion Concurrency Algorithms” 14.Bruce Mamjian, “MVCC unmasked”
  • 40. cafe.naver.com/playexem Q & A © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
  • 41. NAVER http://cafe.naver.com/playexem ITPUB (中) http://blog.itpub.net/31135309/ Wordpress https://playexem.wordpress.com/ Slideshare http://www.slideshare.net/playexem 교육 문의: 연구컨텐츠팀 김숙진 edu@ex-em.com • EXEM Research & Contents Team © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Youtube https://www.youtube.com/channel/UC5wK R_-A0eL_Pn_EMzoauJg Tudou (中) http://www.tudou.com/home/maxgauge/
  • 42. Thank You cafe.naver.com/playexem © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.