SlideShare a Scribd company logo
1 of 20
Download to read offline
PgDay.Seoul 2017
2017-11-04
PostgreSQL 10 새기능 소개
김상기
2017-11-04
2
PgDay.Seoul 2017 PostgreSQL 10 새기능
● 김상기
– 현재 사내 PostgreSQL 마이스터로 활동
● Facebook PostgreSQL Korea 그룹 구성원
– 매월 마지막 주 일요일 PostgreSQL 기술 세미나 운영
●
주말 아이 돌볼 일도 , 애인 만날 일도 없는 이들의 모임
● PostgreSQL.kr 홈페이지 운영자
– 여러 한국어 환경에서 쓰기 좋은 PostgreSQL 이 되도록 하는 작업
●
문서 & 배포판 메시지 자국어화 작업 기여
● textsearch_ko 전문 검색 확장 모듈 개발
●
사내 각종 PostgreSQL 컨설팅 및 교육 담당
– 전환 , 신규 시스템 설계 컨설팅 및 개발 , 운영 지원
– 개발자 , 운영자를 위한 정기 사내 교육
– 컨소이엄 재직자 무료 교육
● kr@postgresql.org
2017-11-04
3
PgDay.Seoul 2017 PostgreSQL 10 새기능
● 포스트그레스큐엘 소개
12 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 17 17 17 17 17
0
20
40
60
80
100
120
PostgreSQL MySQL Oracle SQL Server
구글 트랜드 차트
9.4 9.5 9.6 10
0
2
4
6
8
10
12
14
16
18
버전 별 새 기능 수
2017-11-04
4
PgDay.Seoul 2017 PostgreSQL 10 새기능
차례
응용 프로그램 개발자
– 파티션 테이블
– 논리 복제
– AS IDENTITY 칼럼 속성
– pg_sequence
– XMLTABLE
– UPDATE 구문 확장
– to_date('2017-02-35','YYYY-MM-DD')
2017-11-04
5
PgDay.Seoul 2017 PostgreSQL 10 새기능
파티션 테이블
CREATE TABLE measurement (
logdate date not null,
peaktemp int,
unitsales int
) PARTITION BY RANGE (logdate);
CREATE TABLE measurement_y2016m07
PARTITION OF measurement (
unitsales DEFAULT 0
) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01');
● 아직 못 푼 것들
● 하위 테이블 간 이동하는 UPDATE
● 전역 색인
● 하위 테이블 자동 생성
● 그 외 여러 삽질들
2017-11-04
6
PgDay.Seoul 2017 PostgreSQL 10 새기능
논리 복제
● 아직 못 푼 것들
● DDL, TRUNCATE
● 테이블 빼고 모두 안 됨
● 교차 참조 - 충돌 해결 정책 없음
● SQL 기반 복제
● Promotion - 발행 구독 전환
발행 서버 구독 서버
CREATE PUBLICATION
mypublication
FOR TABLE users;
CREATE SUBSCRIPTION mysub
CONNECTION
'host=192.168.1.50'
PUBLICATION mypublication;
* 2ndQuadrant Postgres-BDR
2017-11-04
7
PgDay.Seoul 2017 PostgreSQL 10 새기능
AS IDENTITY 칼럼 속성
postgres=# CREATE TABLE t (
a int GENERATED ALWAYS AS IDENTITY,
b int);
CREATE TABLE
postgres=# INSERT INTO t values (1,1);
오류: "a" 칼럼에 자료를 입력할 수 없습니다
상세정보: "a" 칼럼에 GENERATED ALWAYS 속성을 지정했습니다.
힌트: 이 속성을 무시하려면 OVERRIDING SYSTEM VALUE 옵션을 사용하세요.
postgres=# INSERT INTO t OVERRIDING SYSTEM VALUE values (1,1);
INSERT 0 1
postgres=# SELECT * FROM t_a_seq;
last_value | log_cnt | is_called
------------+---------+-----------
1 | 0 | f
(1개 행)
- 왜?
- 좀 더 ANSI 규약을 따르려고
2017-11-04
8
PgDay.Seoul 2017 PostgreSQL 10 새기능
pg_sequence 테이블
postgres=# ds
릴레이션(relation) 목록
스키마 | 이름 | 종류 | 소유주
--------+---------+--------+----------
public | t_a_seq | 시퀀스 | postgres
(1개 행)
postgres=# d+ t_a_seq
"public.t_a_seq" 시퀀스
종류 | Start | Minimum | Maximum | Increment | Cycles? | Cache
---------+-------+---------+------------+-----------+---------+-------
integer | 1 | 1 | 2147483647 | 1 | no | 1
식별 칼럼용 시퀀스: public.t.a
postgres=# select * from t_a_seq;
last_value | log_cnt | is_called
------------+---------+-----------
1 | 0 | f
(1개 행)
* 이전 버전의 시퀀스 관련 정보를 살펴보는 것은 지면 관계상 생략
2017-11-04
9
PgDay.Seoul 2017 PostgreSQL 10 새기능
XMLTABLE
● 관계형 데이터베이스에서 XML 자료를 다루는 표준 함수
● xmltable( [XMLNAMESPACES(네임스페이스정의), ]
xpath값 PASSING XML자료
COLUMNS 칼럼정의
[, ...]
)
● XML 자료가 있는 테이블과 이 함수 조인 쿼리로 사용됨
● 기존 xpath() 함수와 xml2 확장 모듈에서 할 수 있었던 것
● 대세는 json이나 기존 XML 자료를 여전히 다뤄야 하는 환경을
끌어안는 그나마 싼 방법
2017-11-04
10
PgDay.Seoul 2017 PostgreSQL 10 새기능
(9.6) postgres@postgres=# SELECT to_date('2017-02-35', 'YYYY-MM-DD');
to_date
------------
2017-03-07
(1개 행)
(10) postgres@postgres=# SELECT to_date('2017-02-35', 'YYYY-MM-DD');
오류: 날짜/시간 필드의 값이 범위를 벗어남: "2017-02-35"
UPDATE
to_date(), to_timestamp()
(9.6) postgres@postgres=# UPDATE measurement
SET (peaktemp, unitsales) = ROW(2,2);
오류: 구문 오류, "row" 부근
(10) postgres@postgres=# UPDATE measurement
SET (peaktemp, unitsales) = ROW(2,2);
UPDATE 1
2017-11-04
11
PgDay.Seoul 2017 PostgreSQL 10 새기능
차례
데이터 베이스 관리자
– 용어 정리
– 추가된 시스템 카탈로그
– 사용자 정의 통계 정보
– pg_stat_activity
– SCRAM-SHA-256
– 병렬 쿼리
– 모니터링을 위한 롤
2017-11-04
12
PgDay.Seoul 2017 PostgreSQL 10 새기능
용어 정리
● wal와 xlog가 모두 wal로 통일함
- pg_xlog → pg_wal
- pg_clog → pg_xact
- pg_receivewal, pg_resetwal, pg_waldump
- pg_switch_wal(), pg_walfile_name(), …
● 트랜잭션 위치가 모두 lsn으로 통일함
- df *lsn*
- SELECT pg_walfile_name(pg_current_wal_lsn());
● 서버 로그는 pg_log → log
- log_line_prefix 기본값이 바뀜
2017-11-04
13
PgDay.Seoul 2017 PostgreSQL 10 새기능
시스템 카탈로그
pg_hba_file_rules pg_hba.conf 내용
pg_sequences 시퀀스
pg_statistic_ext 사용자 정의 통계 정보
pg_partitioned_table 파티션 테이블 정보
pg_publication 논리 복제 발행과 구독 관련 정보들
pg_subscription
● 새로 추가된 테이블 또는 뷰
● 새로 추가된 칼럼 pg_class.relispartition
pg_class.relpartbound
pg_replication_slots.temporary
pg_stat_replication.write_lag
pg_stat_replication.flush_lag
pg_stat_replication.replay_lag
pg_stat_activity.backend_type
pg_attribute.attidentity
2017-11-04
14
PgDay.Seoul 2017 PostgreSQL 10 새기능
사용자 정의 통계 정보
CREATE TABLE t1 (
a int,
b int
);
INSERT INTO t1 SELECT i/100, i/500
FROM generate_series(1,1000000) s(i);
ANALYZE t1;
EXPLAIN ANALYZE SELECT * FROM t1 WHERE (a = 1) AND (b = 0);
QUERY PLAN
------------------------------------------------------
Seq Scan on t1 (cost=0.00..19425.00 rows=1 width=8)
Filter: ((a = 1) AND (b = 0))
(2개 행)
CREATE STATISTICS s1 (dependencies) ON a, b FROM t1;
ANALYZE t1;
QUERY PLAN
-------------------------------------------------------
Seq Scan on t1 (cost=0.00..19425.00 rows=98 width=8)
Filter: ((a = 1) AND (b = 0))
(2개 행)
2017-11-04
15
PgDay.Seoul 2017 PostgreSQL 10 새기능
SCRAM-SHA-256
● password_encryption = plain 설정이 없어짐
● md5 또는 scram-sha-256 둘 중 하나
● pg_hba.conf에서 md5는 scram-sha-256 인증을 포함함
● pg_authid.rolpassword 값이 이미 scram-sha-256 암호화를
했다면 클라이언트가 그 인증 방법을 사용할 수 있어야 함
postgres=# set password_encryption = 'scram-sha-256';
SET
postgres=# alter role postgres password 'mypassword';
ALTER ROLE
postgres=# q
[postgres@centos7 data10]$ /postgres/9.6/bin/psql
psql: 10 인증 방법이 지원되지 않음
[postgres@centos7 data10]$ /postgres/10/bin/psql
암호:
psql (10.0)
도움말을 보려면 "help"를 입력하십시오.
2017-11-04
16
PgDay.Seoul 2017 PostgreSQL 10 새기능
병렬 쿼리
● min_parallel_relation_size 환경 설정이
min_parallel_index_scan_size,
min_parallel_table_scan_size 두 개로 변경됨
● max_parallel_workers_per_gather 환경 설정값의
초가값이 0에서 2로 바뀜 → 기본 설정이 병렬 쿼리를
쓸 수 있는 상황이라면 적극적으로 쓰겠다를 의미함
● max_connections 값을 잘 설계해야 함
클라이언트 접속 수보다 최대 8배(max_parallel_workers)가
많아질 수 있음
● postgres_fdw 모듈을 사용하는 외부 테이블에 대한
병렬 쿼리를 확인 못 해 봤음
2017-11-04
17
PgDay.Seoul 2017 PostgreSQL 10 새기능
모니터링을 위한 롤
[postgres@centos7 ~]$ /postgres/10/bin/psql -U ioseph postgres
postgres=> show hba_file;
오류: "hba_file" 설정값을 알려면 pg_read_all_settings의 맴버이거나 슈퍼유저여야합니다
postgres=> c - postgres
접속정보: 데이터베이스="postgres", 사용자="postgres".
postgres=# grant pg_read_all_settings to ioseph;
GRANT ROLE
postgres=# c - ioseph
접속정보: 데이터베이스="postgres", 사용자="ioseph".
postgres=> show hba_file;
...
postgres=> select rolname from pg_roles;
rolname
----------------------
pg_monitor
pg_read_all_settings
pg_read_all_stats
pg_stat_scan_tables
pg_signal_backend
2017-11-04
18
PgDay.Seoul 2017 PostgreSQL 10 새기능
2017-11-04
19
PgDay.Seoul 2017 PostgreSQL 10 새기능
더 살펴볼 거리
● PostgreSQL 10 릴리즈 노트
● Wiki.postgresql.org 의 New in postgres 10
● 예제로 살펴보는 PostgreSQL 10 새기능
● PostgreSQL 10 언론 보도 자료 속 링크들
[링크1] [링크2]
2017-11-04
20
PgDay.Seoul 2017 PostgreSQL 10 새기능
발표 마지막 장표입니다.
함께 해 주셔서 고맙습니다.

More Related Content

What's hot

[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정PgDay.Seoul
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuningelliando dias
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스PgDay.Seoul
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PGConf APAC
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestI Goo Lee
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An IntroductionSmita Prasad
 
PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오PgDay.Seoul
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용I Goo Lee
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewRené Cannaò
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep InternalEXEM
 
より深く知るオプティマイザとそのチューニング
より深く知るオプティマイザとそのチューニングより深く知るオプティマイザとそのチューニング
より深く知るオプティマイザとそのチューニングYuto Hayamizu
 
[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.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오PgDay.Seoul
 
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱PgDay.Seoul
 
MySQLを割と一人で300台管理する技術
MySQLを割と一人で300台管理する技術MySQLを割と一人で300台管理する技術
MySQLを割と一人で300台管理する技術yoku0825
 

What's hot (20)

[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
 
PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 
Load Data Fast!
Load Data Fast!Load Data Fast!
Load Data Fast!
 
Oracle Tablespace介紹
Oracle Tablespace介紹Oracle Tablespace介紹
Oracle Tablespace介紹
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
 
より深く知るオプティマイザとそのチューニング
より深く知るオプティマイザとそのチューニングより深く知るオプティマイザとそのチューニング
より深く知るオプティマイザとそのチューニング
 
[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.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
 
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
 
MySQLを割と一人で300台管理する技術
MySQLを割と一人で300台管理する技術MySQLを割と一人で300台管理する技術
MySQLを割と一人で300台管理する技術
 
Postgresql
PostgresqlPostgresql
Postgresql
 

Similar to [Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기

공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습BJ Jang
 
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개PgDay.Seoul
 
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons LearnedWeb Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons LearnedJungsu Heo
 
Front-end Development Process - 어디까지 개선할 수 있나
Front-end Development Process - 어디까지 개선할 수 있나Front-end Development Process - 어디까지 개선할 수 있나
Front-end Development Process - 어디까지 개선할 수 있나JeongHun Byeon
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQLI Goo Lee
 
배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle
배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle
배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle엑셈
 
2. Application - Sqoop Import
2. Application - Sqoop Import2. Application - Sqoop Import
2. Application - Sqoop Importmerry7
 
Node.js and react
Node.js and reactNode.js and react
Node.js and reactHyungKuIm
 
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요NAVER D2
 
PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS MinPa Lee
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxNeoClova
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxNeoClova
 
NDC11_김성익_슈퍼클래스
NDC11_김성익_슈퍼클래스NDC11_김성익_슈퍼클래스
NDC11_김성익_슈퍼클래스Sungik Kim
 
Fundamentals of Oracle SQL
Fundamentals of Oracle SQLFundamentals of Oracle SQL
Fundamentals of Oracle SQLJAEGEUN YU
 
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1Jungsu Heo
 
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912Yooseok Choi
 

Similar to [Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기 (20)

공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습
 
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개
 
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons LearnedWeb Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
 
Front-end Development Process - 어디까지 개선할 수 있나
Front-end Development Process - 어디까지 개선할 수 있나Front-end Development Process - 어디까지 개선할 수 있나
Front-end Development Process - 어디까지 개선할 수 있나
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQL
 
배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle
배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle
배치 프로그램에서 튜닝대상 SQL 추출하기_Wh oracle
 
Redis
RedisRedis
Redis
 
2. Application - Sqoop Import
2. Application - Sqoop Import2. Application - Sqoop Import
2. Application - Sqoop Import
 
Node.js and react
Node.js and reactNode.js and react
Node.js and react
 
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
 
PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
 
Basic git-commands
Basic git-commandsBasic git-commands
Basic git-commands
 
Whats new rails 7
Whats new   rails 7Whats new   rails 7
Whats new rails 7
 
NDC11_김성익_슈퍼클래스
NDC11_김성익_슈퍼클래스NDC11_김성익_슈퍼클래스
NDC11_김성익_슈퍼클래스
 
Fundamentals of Oracle SQL
Fundamentals of Oracle SQLFundamentals of Oracle SQL
Fundamentals of Oracle SQL
 
PostGIS 시작하기
PostGIS 시작하기PostGIS 시작하기
PostGIS 시작하기
 
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
 
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912
 

More from PgDay.Seoul

[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google CloudPgDay.Seoul
 
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기PgDay.Seoul
 
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기PgDay.Seoul
 
[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDW[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDWPgDay.Seoul
 
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposhaPgDay.Seoul
 
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA
[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPAPgDay.Seoul
 
[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PGPgDay.Seoul
 
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기
[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기PgDay.Seoul
 
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계
[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계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.Seoul 2018] replacing oracle with edb postgresPgDay.Seoul
 
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우PgDay.Seoul
 
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종PgDay.Seoul
 
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진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.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명PgDay.Seoul
 
PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PgDay.Seoul
 
pg_hba.conf 이야기
pg_hba.conf 이야기pg_hba.conf 이야기
pg_hba.conf 이야기PgDay.Seoul
 
Pg report 20161010_02
Pg report 20161010_02Pg report 20161010_02
Pg report 20161010_02PgDay.Seoul
 

More from PgDay.Seoul (17)

[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud
 
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
 
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
 
[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDW[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDW
 
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
 
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA
[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA
 
[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
 
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기
[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기
 
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계
[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계
 
[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.Seoul 2018] replacing oracle with edb postgres
 
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
 
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
 
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
 
[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.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명
 
PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개
 
pg_hba.conf 이야기
pg_hba.conf 이야기pg_hba.conf 이야기
pg_hba.conf 이야기
 
Pg report 20161010_02
Pg report 20161010_02Pg report 20161010_02
Pg report 20161010_02
 

[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기

  • 1. PgDay.Seoul 2017 2017-11-04 PostgreSQL 10 새기능 소개 김상기
  • 2. 2017-11-04 2 PgDay.Seoul 2017 PostgreSQL 10 새기능 ● 김상기 – 현재 사내 PostgreSQL 마이스터로 활동 ● Facebook PostgreSQL Korea 그룹 구성원 – 매월 마지막 주 일요일 PostgreSQL 기술 세미나 운영 ● 주말 아이 돌볼 일도 , 애인 만날 일도 없는 이들의 모임 ● PostgreSQL.kr 홈페이지 운영자 – 여러 한국어 환경에서 쓰기 좋은 PostgreSQL 이 되도록 하는 작업 ● 문서 & 배포판 메시지 자국어화 작업 기여 ● textsearch_ko 전문 검색 확장 모듈 개발 ● 사내 각종 PostgreSQL 컨설팅 및 교육 담당 – 전환 , 신규 시스템 설계 컨설팅 및 개발 , 운영 지원 – 개발자 , 운영자를 위한 정기 사내 교육 – 컨소이엄 재직자 무료 교육 ● kr@postgresql.org
  • 3. 2017-11-04 3 PgDay.Seoul 2017 PostgreSQL 10 새기능 ● 포스트그레스큐엘 소개 12 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 17 17 17 17 17 0 20 40 60 80 100 120 PostgreSQL MySQL Oracle SQL Server 구글 트랜드 차트 9.4 9.5 9.6 10 0 2 4 6 8 10 12 14 16 18 버전 별 새 기능 수
  • 4. 2017-11-04 4 PgDay.Seoul 2017 PostgreSQL 10 새기능 차례 응용 프로그램 개발자 – 파티션 테이블 – 논리 복제 – AS IDENTITY 칼럼 속성 – pg_sequence – XMLTABLE – UPDATE 구문 확장 – to_date('2017-02-35','YYYY-MM-DD')
  • 5. 2017-11-04 5 PgDay.Seoul 2017 PostgreSQL 10 새기능 파티션 테이블 CREATE TABLE measurement ( logdate date not null, peaktemp int, unitsales int ) PARTITION BY RANGE (logdate); CREATE TABLE measurement_y2016m07 PARTITION OF measurement ( unitsales DEFAULT 0 ) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01'); ● 아직 못 푼 것들 ● 하위 테이블 간 이동하는 UPDATE ● 전역 색인 ● 하위 테이블 자동 생성 ● 그 외 여러 삽질들
  • 6. 2017-11-04 6 PgDay.Seoul 2017 PostgreSQL 10 새기능 논리 복제 ● 아직 못 푼 것들 ● DDL, TRUNCATE ● 테이블 빼고 모두 안 됨 ● 교차 참조 - 충돌 해결 정책 없음 ● SQL 기반 복제 ● Promotion - 발행 구독 전환 발행 서버 구독 서버 CREATE PUBLICATION mypublication FOR TABLE users; CREATE SUBSCRIPTION mysub CONNECTION 'host=192.168.1.50' PUBLICATION mypublication; * 2ndQuadrant Postgres-BDR
  • 7. 2017-11-04 7 PgDay.Seoul 2017 PostgreSQL 10 새기능 AS IDENTITY 칼럼 속성 postgres=# CREATE TABLE t ( a int GENERATED ALWAYS AS IDENTITY, b int); CREATE TABLE postgres=# INSERT INTO t values (1,1); 오류: "a" 칼럼에 자료를 입력할 수 없습니다 상세정보: "a" 칼럼에 GENERATED ALWAYS 속성을 지정했습니다. 힌트: 이 속성을 무시하려면 OVERRIDING SYSTEM VALUE 옵션을 사용하세요. postgres=# INSERT INTO t OVERRIDING SYSTEM VALUE values (1,1); INSERT 0 1 postgres=# SELECT * FROM t_a_seq; last_value | log_cnt | is_called ------------+---------+----------- 1 | 0 | f (1개 행) - 왜? - 좀 더 ANSI 규약을 따르려고
  • 8. 2017-11-04 8 PgDay.Seoul 2017 PostgreSQL 10 새기능 pg_sequence 테이블 postgres=# ds 릴레이션(relation) 목록 스키마 | 이름 | 종류 | 소유주 --------+---------+--------+---------- public | t_a_seq | 시퀀스 | postgres (1개 행) postgres=# d+ t_a_seq "public.t_a_seq" 시퀀스 종류 | Start | Minimum | Maximum | Increment | Cycles? | Cache ---------+-------+---------+------------+-----------+---------+------- integer | 1 | 1 | 2147483647 | 1 | no | 1 식별 칼럼용 시퀀스: public.t.a postgres=# select * from t_a_seq; last_value | log_cnt | is_called ------------+---------+----------- 1 | 0 | f (1개 행) * 이전 버전의 시퀀스 관련 정보를 살펴보는 것은 지면 관계상 생략
  • 9. 2017-11-04 9 PgDay.Seoul 2017 PostgreSQL 10 새기능 XMLTABLE ● 관계형 데이터베이스에서 XML 자료를 다루는 표준 함수 ● xmltable( [XMLNAMESPACES(네임스페이스정의), ] xpath값 PASSING XML자료 COLUMNS 칼럼정의 [, ...] ) ● XML 자료가 있는 테이블과 이 함수 조인 쿼리로 사용됨 ● 기존 xpath() 함수와 xml2 확장 모듈에서 할 수 있었던 것 ● 대세는 json이나 기존 XML 자료를 여전히 다뤄야 하는 환경을 끌어안는 그나마 싼 방법
  • 10. 2017-11-04 10 PgDay.Seoul 2017 PostgreSQL 10 새기능 (9.6) postgres@postgres=# SELECT to_date('2017-02-35', 'YYYY-MM-DD'); to_date ------------ 2017-03-07 (1개 행) (10) postgres@postgres=# SELECT to_date('2017-02-35', 'YYYY-MM-DD'); 오류: 날짜/시간 필드의 값이 범위를 벗어남: "2017-02-35" UPDATE to_date(), to_timestamp() (9.6) postgres@postgres=# UPDATE measurement SET (peaktemp, unitsales) = ROW(2,2); 오류: 구문 오류, "row" 부근 (10) postgres@postgres=# UPDATE measurement SET (peaktemp, unitsales) = ROW(2,2); UPDATE 1
  • 11. 2017-11-04 11 PgDay.Seoul 2017 PostgreSQL 10 새기능 차례 데이터 베이스 관리자 – 용어 정리 – 추가된 시스템 카탈로그 – 사용자 정의 통계 정보 – pg_stat_activity – SCRAM-SHA-256 – 병렬 쿼리 – 모니터링을 위한 롤
  • 12. 2017-11-04 12 PgDay.Seoul 2017 PostgreSQL 10 새기능 용어 정리 ● wal와 xlog가 모두 wal로 통일함 - pg_xlog → pg_wal - pg_clog → pg_xact - pg_receivewal, pg_resetwal, pg_waldump - pg_switch_wal(), pg_walfile_name(), … ● 트랜잭션 위치가 모두 lsn으로 통일함 - df *lsn* - SELECT pg_walfile_name(pg_current_wal_lsn()); ● 서버 로그는 pg_log → log - log_line_prefix 기본값이 바뀜
  • 13. 2017-11-04 13 PgDay.Seoul 2017 PostgreSQL 10 새기능 시스템 카탈로그 pg_hba_file_rules pg_hba.conf 내용 pg_sequences 시퀀스 pg_statistic_ext 사용자 정의 통계 정보 pg_partitioned_table 파티션 테이블 정보 pg_publication 논리 복제 발행과 구독 관련 정보들 pg_subscription ● 새로 추가된 테이블 또는 뷰 ● 새로 추가된 칼럼 pg_class.relispartition pg_class.relpartbound pg_replication_slots.temporary pg_stat_replication.write_lag pg_stat_replication.flush_lag pg_stat_replication.replay_lag pg_stat_activity.backend_type pg_attribute.attidentity
  • 14. 2017-11-04 14 PgDay.Seoul 2017 PostgreSQL 10 새기능 사용자 정의 통계 정보 CREATE TABLE t1 ( a int, b int ); INSERT INTO t1 SELECT i/100, i/500 FROM generate_series(1,1000000) s(i); ANALYZE t1; EXPLAIN ANALYZE SELECT * FROM t1 WHERE (a = 1) AND (b = 0); QUERY PLAN ------------------------------------------------------ Seq Scan on t1 (cost=0.00..19425.00 rows=1 width=8) Filter: ((a = 1) AND (b = 0)) (2개 행) CREATE STATISTICS s1 (dependencies) ON a, b FROM t1; ANALYZE t1; QUERY PLAN ------------------------------------------------------- Seq Scan on t1 (cost=0.00..19425.00 rows=98 width=8) Filter: ((a = 1) AND (b = 0)) (2개 행)
  • 15. 2017-11-04 15 PgDay.Seoul 2017 PostgreSQL 10 새기능 SCRAM-SHA-256 ● password_encryption = plain 설정이 없어짐 ● md5 또는 scram-sha-256 둘 중 하나 ● pg_hba.conf에서 md5는 scram-sha-256 인증을 포함함 ● pg_authid.rolpassword 값이 이미 scram-sha-256 암호화를 했다면 클라이언트가 그 인증 방법을 사용할 수 있어야 함 postgres=# set password_encryption = 'scram-sha-256'; SET postgres=# alter role postgres password 'mypassword'; ALTER ROLE postgres=# q [postgres@centos7 data10]$ /postgres/9.6/bin/psql psql: 10 인증 방법이 지원되지 않음 [postgres@centos7 data10]$ /postgres/10/bin/psql 암호: psql (10.0) 도움말을 보려면 "help"를 입력하십시오.
  • 16. 2017-11-04 16 PgDay.Seoul 2017 PostgreSQL 10 새기능 병렬 쿼리 ● min_parallel_relation_size 환경 설정이 min_parallel_index_scan_size, min_parallel_table_scan_size 두 개로 변경됨 ● max_parallel_workers_per_gather 환경 설정값의 초가값이 0에서 2로 바뀜 → 기본 설정이 병렬 쿼리를 쓸 수 있는 상황이라면 적극적으로 쓰겠다를 의미함 ● max_connections 값을 잘 설계해야 함 클라이언트 접속 수보다 최대 8배(max_parallel_workers)가 많아질 수 있음 ● postgres_fdw 모듈을 사용하는 외부 테이블에 대한 병렬 쿼리를 확인 못 해 봤음
  • 17. 2017-11-04 17 PgDay.Seoul 2017 PostgreSQL 10 새기능 모니터링을 위한 롤 [postgres@centos7 ~]$ /postgres/10/bin/psql -U ioseph postgres postgres=> show hba_file; 오류: "hba_file" 설정값을 알려면 pg_read_all_settings의 맴버이거나 슈퍼유저여야합니다 postgres=> c - postgres 접속정보: 데이터베이스="postgres", 사용자="postgres". postgres=# grant pg_read_all_settings to ioseph; GRANT ROLE postgres=# c - ioseph 접속정보: 데이터베이스="postgres", 사용자="ioseph". postgres=> show hba_file; ... postgres=> select rolname from pg_roles; rolname ---------------------- pg_monitor pg_read_all_settings pg_read_all_stats pg_stat_scan_tables pg_signal_backend
  • 19. 2017-11-04 19 PgDay.Seoul 2017 PostgreSQL 10 새기능 더 살펴볼 거리 ● PostgreSQL 10 릴리즈 노트 ● Wiki.postgresql.org 의 New in postgres 10 ● 예제로 살펴보는 PostgreSQL 10 새기능 ● PostgreSQL 10 언론 보도 자료 속 링크들 [링크1] [링크2]
  • 20. 2017-11-04 20 PgDay.Seoul 2017 PostgreSQL 10 새기능 발표 마지막 장표입니다. 함께 해 주셔서 고맙습니다.