SlideShare a Scribd company logo
What you need to know for
Postgresql operation
https://orabase.org/owncloud/index.php/s/vdqNlAqNqIPLxil
materials
Who Am I ?
Oracle OCP 12c
OCE 11g PT
OCE 11g RAC
Senior Specialist at RT Labs
The guy on the left ^_^
PostgreSQL 9.3 Associate
Presentation plan
1.Architecture of Postgresql
2.Transactions and Concurrency, MVCC
3.Connection Pooling ( pgpool,pgbouncer )
4.Tips & Trics + Monitoring
Architectural Summary :
• PostgreSQL uses processes, not threads
• Postmaster process acts as supervisor
• Several utility processes perform background work
• postmaster starts them, restarts them if they die
• postmaster listens for new connections
1. Architecture of Postgresql
Main Utility Processes:
• Background writer − Writes dirty data blocks to disk
• WAL writer − Flushes write-ahead log to disk
• Checkpointer process − Automatically performs a checkpoint based
on config parameters
• Autovacuum launcher − Starts Autovacuum workers as needed
• Autovacuum workers − Recover free space for reuse
• Stats Collector – collects runtime statistics
1.Architecture of Postgresql
2.Transactions and Concurrency, MVCC
3.Connection Pooling ( pgpool,pgbouncer )
4.Tips & Trics + Monitoring
Presentation plan
What is a Transaction?
• A transaction is set of statements bundled into a single step, all-or-
nothing operation
• A transaction must possess ACID properties:
• An all-or-nothing operation (Atomicity).
• Only valid data is written to the database (Consistency).
• The intermediate states between the steps are not visible to other concurrent
transactions (Isolation).
• If some failure occurs that prevents the transaction from completing, then
none of the steps affect the database at all (Durability).
2. Transactions and Concurrency, MVCC
• Snapshot of data at a point in time.
• Updates, inserts and deletes cause the creation of a new row version.
Row version stored in same page.
• MVCC uses increasing transaction IDs to achieve consistency.
• Each row has 2 transaction ids: created and expired
• Queries check:
• creation trans id is committed and < current trans counter
• row lacks expire trans id or expire was in process at query start
MVCC Maintenance
• MVCC creates multiple versions of a row for concurrency
• Old row versions can cause “bloat”
• Rows no longer needed are recovered for reuse/removed via
vacuuming or autovacuum
• To prevent transaction wraparound failure each table must be
vacuumed periodically
• PostgreSQL reserves a special XID as FrozenXID
• This XID is always considered older than every normal XID
Presentation plan
1.Architecture of Postgresql
2.Transactions and Concurrency, MVCC
3.Connection Pooling ( pgpool,pgbouncer )
4.Tips & Trics + Monitoring
Pgpool
• At first, developed for connection pooling
• Replication Master/Slave mode
• Load balancing
• Automatic failover on desync detection
• Online recovery
• Parallel Query
Pgpool
PgBouncer
• Lightweight connection pooler for PostgreSQL
• Any application can connect to Pgboucer as it connects with
PostgreSQL
• Pgbouncer help to lower down the connections impact on the
PostgreSQL Server
• Pgbouncer provides connection pooling thus reuse the existing
connections
Types of Connections
• pgbouncer supports several types of pooling when rotating
connections:
• Session pooling − A server connection is assigned to the client application for
the life of the client connection.
• Transaction pooling − A server connection is assigned to the client application
for the duration of a transaction
• Statement pooling − A server connection is assigned to the client application
for each statement
How Connections are Established
• An application connects to PgBouncer as if it were a PostgreSQL database
• PgBouncer then creates a connection to the actual database server, or it
reuses one of the existing connections from the pool
• Step 1: The client application attempts to connect to PostgreSQL on the port where
pgbouncer is running
• Step 2: The database name supplied by the client application must match with the
list in pgBouncer.ini
• Step 3: The user name and password supplied must match with the list in users.txt
• Step 4: If a connection with same settings is available in pool it will be assigned to
client
• otherwise a new connection object will be created
• Step 5: Once client log off the connection object return back to the pool
Manage pgbouncer
• Show stats, servers, clients, pools, lists, databases, fds commands can
be used.
• Manage pgbouncer by connecting to the special administration
database
• pgbouncer and issuing show help;
• $ psql -p 6543 -U someuser pgbouncer
• pgbouncer=# show help;
• NOTICE: Console usage
• DETAIL: SHOW [HELP|CONFIG|DATABASES|FDS|POOLS|CLIENTS|SERVERS|SOCKETS|LISTS|VERSION]
Avito link
quick test with pgbouncer
• Connecting to the bouncer over local unix socket, it took 31s to
perform all the queries.
• Connecting to the bouncer over localhost, it took 45s to perform all
the queries.
• Connecting to the bouncer running on the remote server, it took
1m6s
• Without using pgbouncer, it took 3m34s
1.Architecture of Postgresql
2.Transactions and Concurrency, MVCC
3.Connection Pooling ( pgpool,pgbouncer )
4.Tips & Trics + Monitoring
Presentation plan
What can we see ?
What can we see ?
How graphite populate data
• We write function that in single pass get all information (still under
development)
• adm-get_stat_activity.sql
Autovacuum & DB activity monitoring
• autovacuum_count.Query=select count (*) from pg_stat_activity
where state = 'active' AND query LIKE 'autovacuum:%’
• autovacuum_max.Query=select coalesce (max(round(extract( epoch
FROM age(statement_timestamp(), state_change)))),0)
active_seconds from pg_stat_activity where state = 'active' AND
query LIKE 'autovacuum:%’
• xactcommit.Query=SELECT sum(xact_commit) FROM
pg_stat_database
• xactrollback.Query=SELECT sum(xact_rollback) FROM
pg_stat_database
Zabbix
Graphana
What can we see ?
Session activity monitoring
• active_session_cnt.Query=select count (*) from pg_stat_activity where state='active' and pid != pg_backend_pid()
• active_5s.Query=select count (*) from pg_stat_activity where state='active' and statement_timestamp() - state_change >
INTERVAL '5s' AND query not LIKE 'autovacuum:%’
• active_max.Query=select coalesce(abs(max(round(extract( epoch FROM age(statement_timestamp(), state_change))))),0)
• active_max_seconds from pg_stat_activity where state='active' AND query not LIKE 'autovacuum:%’
• idle_session_cnt.Query=select count (*) from pg_stat_activity where state='idle’
• idle_in_trans_cnt.Query=select count (*) from pg_stat_activity where state like 'idle in trans%’
• idle_in_trans_5s.Query=select count (*) from pg_stat_activity where state like 'idle in trans%' and statement_timestamp() -
state_change > INTERVAL '5s’
• idle_in_trans_max.Query=select coalesce(max(round(extract( epoch FROM age(statement_timestamp(), state_change)))),0)
max_idle_in_trans from eyes.get_pg_stat_activity() where state like ’
• idle in trans%'waiting_session_cnt.Query=select count (*) from eyes.get_pg_stat_activity() where waiting is true
• waiting_session_5s.Query=select count (*) from pg_stat_activity where waiting is true and statement_timestamp() - state_change
> INTERVAL '5s’
• waiting_session_max.Query=select coalesce (abs(max(round(extract( epoch FROM age(statement_timestamp(),
state_change))))),0)
• waiting_max from pg_stat_activity where waiting is true
zabbix
Graphana
Query stats ( okmeter )
Vmware Log Insight
What can we see ?
Database stats monitoring
• activeconn.Query=select sum(numbackends) from pg_stat_database
• tupreturned.Query=select sum(tup_returned) from pg_stat_database
• tupfetched.Query=select sum(tup_fetched) from pg_stat_database
• tupinserted.Query=select sum(tup_inserted) from pg_stat_database
• tupupdated.Query=select sum(tup_updated) from pg_stat_database
• tupdeleted.Query=select sum(tup_deleted) from pg_stat_database
Zabbix
Graphana
What can we see ?
MasterSlave stats queries
• master_or_slave.Query=select pg_is_in_recovery()::int
• slave_delay_mb.Query=select
application_name,(pg_xlog_location_diff(sent_location,
replay_location))/1024/1024 as mb_lag from pg_stat_replication as
MB_lag
• slave_delay_sec.Query=select extract(epoch FROM now() -
COALESCE(pg_last_xact_replay_timestamp(),now()))
MasterSlave in Graphana
Bgwriter +checkpoint stats
• checkpoints_timed.Query=select checkpoints_timed from
pg_stat_bgwriter
• checkpoints_req.Query=select checkpoints_req from pg_stat_bgwriter
• buffers_checkpoint.Query=select buffers_checkpoint from
pg_stat_bgwriter
• buffers_clean.Query=select buffers_clean from pg_stat_bgwriter
• maxwritten_clean.Query=select maxwritten_clean from pg_stat_bgwriter
• buffers_backend.Query=select buffers_backend from pg_stat_bgwriter
• buffers_alloc.Query=select buffers_alloc from pg_stat_bgwriter
zabbix
zabbix
Graphana
What can we see ?
What can we see ?
Tips and Tricks
• Pg_stat_statements
• Pg_stat_kcache
• pg_buffercache
• pg_stat_user_indexes,pg_stat_user_tables *etc
Pg_stat_statements
• Good toolset by postgresql consulting
Top query by avg runtime
• select
md5(query),calls,total_time,rows,shared_blks_hit,shared_blks_read,
(total_time/calls) as avg_time from pg_stat_statements order by
avg_time desc limit 5;
Query_stat_io_time
pg_stat_kcache
• Gathers statistics about real reads and writes done by the filesystem
layer.
• PostgreSQL >= 9.4
• Not yet in contrib
pg_stat_kcache
SELECT datname, queryid, round(total_time::numeric, 2) AS total_time, calls,
pg_size_pretty((shared_blks_hit+shared_blks_read)*8192 - reads) AS memory_hit,
pg_size_pretty(reads) AS disk_read, pg_size_pretty(writes) AS disk_write,
round(user_time::numeric, 2) AS user_time, round(system_time::numeric, 2) ASsystem_time
FROM pg_stat_statements s
JOIN pg_stat_kcache() k USING (userid, dbid, queryid)
JOIN pg_database d ON s.dbid = d.oid
WHERE datname != 'postgres' AND datname NOT LIKE 'template%’ ORDER BY total_time DESC LIMIT 10;
Top 10 queries
pg_buffercache
Top object in cache
SELECT c.relname ,
pg_size_pretty(count(*) * 8192) as buffered
, round(100.0 * count(*) / ( SELECT setting FROM pg_settings WHERE
name='shared_buffers')::integer,1) AS buffers_percent
, round(100.0 * count(*) * 8192 / pg_relation_size(c.oid),1) AS percent_of_relation
FROM pg_class c
JOIN pg_buffercache b ON b.relfilenode = c.relfilenode
JOIN pg_database d ON (b.reldatabase = d.oid AND d.datname = current_database())
WHERE pg_relation_size(c.oid) > 0 GROUP BY c.oid, c.relname
ORDER BY 3 DESC LIMIT 10;
Top object in cache example
Top 20 unused indexes
SELECT relid::regclass AS table,
indexrelid::regclass AS index,
pg_size_pretty(pg_relation_size(indexrelid::regclass)) AS index_size,
idx_tup_read,
idx_tup_fetch,
idx_scan
FROM pg_stat_user_indexes
JOIN pg_index USING (indexrelid)
WHERE idx_scan = 0 AND indisunique IS FALSE
order by pg_relation_size(indexrelid::regclass) desc limit 20;
Top 20 unused indexes examples
indexes on nulls
Select
pg_index.indrelid::regclass as table,
pg_index.indexrelid::regclass as index,
pg_attribute.attname as field,pg_statistic.stanullfrac,
pg_size_pretty(pg_relation_size(pg_index.indexrelid)) as indexsize,
pg_get_indexdef(pg_index.indexrelid) as indexdef
from pg_index
join pg_attribute ON pg_attribute.attrelid=pg_index.indrelid AND
pg_attribute.attnum=ANY(pg_index.indkey)
join pg_statistic ON pg_statistic.starelid=pg_index.indrelid AND
pg_statistic.staattnum=pg_attribute.attnum
where pg_statistic.stanullfrac>0.5
AND pg_relation_size(pg_index.indexrelid)>10*8192
order by pg_relation_size(pg_index.indexrelid) desc,1,2,3;
indexes on nulls examples
Duplicate indexes
SELECT pg_size_pretty(SUM(pg_relation_size(idx))::BIGINT) AS SIZE,
(array_agg(idx))[1] AS idx1, (array_agg(idx))[2] AS idx2,
(array_agg(idx))[3] AS idx3, (array_agg(idx))[4] AS idx4
FROM ( SELECT indexrelid::regclass AS idx, (indrelid::text ||E'n'|| indclass::text ||E'n'||
indkey::text ||E'n'||
COALESCE(indexprs::text,'')||E'n' || COALESCE(indpred::text,'')) AS KEY
FROM pg_index) sub
GROUP BY KEY HAVING COUNT(*)>1 ORDER BY SUM(pg_relation_size(idx)) DESC;
Duplicate indexes example
Missing index
SELECT relname, seq_scan-idx_scan AS too_much_seq, case when
seq_scan-idx_scan>0 THEN 'Missing Index?' ELSE 'OK' END,
pg_size_pretty(pg_relation_size(relname::regclass)) AS rel_size,
seq_scan, idx_scan FROM pg_stat_all_tables WHERE
schemaname='public' AND
pg_relation_size(relname::regclass)>10*1024*1024 ORDER BY
too_much_seq DESC nulls last;
Missing index
Lock dependency information
Write activity
SELECT s.relname,
pg_size_pretty(pg_relation_size(relid)),
coalesce(n_tup_ins,0) + 2 * coalesce(n_tup_upd,0) - coalesce(n_tup_hot_upd,0) +
coalesce(n_tup_del,0) AS total_writes,
(coalesce(n_tup_hot_upd,0)::float * 100 / (CASE WHEN n_tup_upd > 0 THEN n_tup_upd
ELSE 1 END)::float)::numeric(10,2) AS hot_rate,
(SELECT v[1]
FROM regexp_matches(reloptions::text,e'fillfactor=(d+)') AS r(v) LIMIT 1) AS fillfactor
FROM pg_stat_all_tables s
JOIN pg_class c ON c.oid=relid
ORDER BY total_writes DESC LIMIT 50;
Write activity example
• What is HOT
Usefull materials
• Postgrespro курс на русском
• Способы диагностики PostgreSQL ( yandex )
• Deep dive into postgresql statistics
• PostgreSQL meetup @ Avito (9.04.2016)
• What is HOT
please feel free to contact me at email:
bushmelev.aa@gmail.com

More Related Content

What's hot

An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
Lee Theobald
 
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
Noriyoshi Shinoda
 
PostgreSQL Administration for System Administrators
PostgreSQL Administration for System AdministratorsPostgreSQL Administration for System Administrators
PostgreSQL Administration for System Administrators
Command Prompt., Inc
 
DBパフォーマンスチューニングの基礎:インデックス入門
DBパフォーマンスチューニングの基礎:インデックス入門DBパフォーマンスチューニングの基礎:インデックス入門
DBパフォーマンスチューニングの基礎:インデックス入門
Akira Shimosako
 
PostgreSQL のイケてるテクニック7選
PostgreSQL のイケてるテクニック7選PostgreSQL のイケてるテクニック7選
PostgreSQL のイケてるテクニック7選
Tomoya Kawanishi
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Joel Brewer
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
botsplash.com
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB
MongoDB
 
Working with JSON Data in PostgreSQL vs. MongoDB
Working with JSON Data in PostgreSQL vs. MongoDBWorking with JSON Data in PostgreSQL vs. MongoDB
Working with JSON Data in PostgreSQL vs. MongoDB
ScaleGrid.io
 
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
PgDay.Seoul
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
Mydbops
 
MYSQL-Database
MYSQL-DatabaseMYSQL-Database
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
NeoClova
 
Postgre sql vs oracle
Postgre sql vs oraclePostgre sql vs oracle
Postgre sql vs oracle
Jacques Kostic
 
SQL Injection Defense in Python
SQL Injection Defense in PythonSQL Injection Defense in Python
SQL Injection Defense in Python
Public Broadcasting Service
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance Optimisation
Mydbops
 
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
Equnix Business Solutions
 
[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning
PgDay.Seoul
 
ストリームデータ分散処理基盤Storm
ストリームデータ分散処理基盤Stormストリームデータ分散処理基盤Storm
ストリームデータ分散処理基盤Storm
NTT DATA OSS Professional Services
 
Introduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerIntroduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard Broker
Zohar Elkayam
 

What's hot (20)

An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
 
PostgreSQL Administration for System Administrators
PostgreSQL Administration for System AdministratorsPostgreSQL Administration for System Administrators
PostgreSQL Administration for System Administrators
 
DBパフォーマンスチューニングの基礎:インデックス入門
DBパフォーマンスチューニングの基礎:インデックス入門DBパフォーマンスチューニングの基礎:インデックス入門
DBパフォーマンスチューニングの基礎:インデックス入門
 
PostgreSQL のイケてるテクニック7選
PostgreSQL のイケてるテクニック7選PostgreSQL のイケてるテクニック7選
PostgreSQL のイケてるテクニック7選
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB
 
Working with JSON Data in PostgreSQL vs. MongoDB
Working with JSON Data in PostgreSQL vs. MongoDBWorking with JSON Data in PostgreSQL vs. MongoDB
Working with JSON Data in PostgreSQL vs. MongoDB
 
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
 
MYSQL-Database
MYSQL-DatabaseMYSQL-Database
MYSQL-Database
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
 
Postgre sql vs oracle
Postgre sql vs oraclePostgre sql vs oracle
Postgre sql vs oracle
 
SQL Injection Defense in Python
SQL Injection Defense in PythonSQL Injection Defense in Python
SQL Injection Defense in Python
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance Optimisation
 
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
 
[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning
 
ストリームデータ分散処理基盤Storm
ストリームデータ分散処理基盤Stormストリームデータ分散処理基盤Storm
ストリームデータ分散処理基盤Storm
 
Introduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerIntroduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard Broker
 

Viewers also liked

Social media for Business
Social media for BusinessSocial media for Business
Social media for Business
Biznet IIS
 
Mas sobre mi - Solicitud IE - Jessica A
Mas sobre mi - Solicitud IE - Jessica AMas sobre mi - Solicitud IE - Jessica A
Mas sobre mi - Solicitud IE - Jessica A
Jessica Aguilera
 
Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...
Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...
Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...
Kevin Perry
 
Homework 2
Homework  2Homework  2
Homework 2
貞元 曹
 
Vayu, the Ayurvedic neurology.
Vayu, the Ayurvedic neurology.Vayu, the Ayurvedic neurology.
Vayu, the Ayurvedic neurology.
Muralidharan Dr.K.P.
 
Analyzuj a proveď
Analyzuj a proveďAnalyzuj a proveď
Analyzuj a proveď
Edolo s.r.o.
 
Bai 01 new
Bai 01 newBai 01 new
Bai 01 newdowsing
 
Teddyhouse 091021233119-phpapp02
Teddyhouse 091021233119-phpapp02Teddyhouse 091021233119-phpapp02
Teddyhouse 091021233119-phpapp02
Bảo Thy Phan
 
Absolute inequalities
Absolute inequalitiesAbsolute inequalities
Absolute inequalities
Spainhour
 
Ingurune esperimentua (Buru buruargia)
Ingurune esperimentua (Buru buruargia)Ingurune esperimentua (Buru buruargia)
Ingurune esperimentua (Buru buruargia)arregisa
 
Digital storytelling
Digital storytellingDigital storytelling
Digital storytelling
Darleen00
 
Using Content Marketing to Drive Sales
Using Content Marketing to Drive SalesUsing Content Marketing to Drive Sales
Using Content Marketing to Drive Sales
TruebridgeFinancialMarketing
 
Media – aman dhillon
Media – aman dhillonMedia – aman dhillon
Media – aman dhillon
Aman Dhillon
 
Tugas Jarkom Kel.2
Tugas Jarkom Kel.2Tugas Jarkom Kel.2
Tugas Jarkom Kel.2
Maharani Savitri
 
Tugas 3 tik
Tugas 3 tikTugas 3 tik
Tugas 3 tik
rizaldyilham
 
Kaushansky Case Study
Kaushansky Case StudyKaushansky Case Study
Kaushansky Case Study
BOLO Conference
 
Catalog complet La Duchesse
Catalog complet La DuchesseCatalog complet La Duchesse
Catalog complet La Duchesse
sorinciuciuc
 
Presentation
PresentationPresentation
Presentation
aprudyk
 
Rocky Mountain - Slemdal Sport & Fritid
Rocky Mountain - Slemdal Sport & FritidRocky Mountain - Slemdal Sport & Fritid
Rocky Mountain - Slemdal Sport & Fritid
dcadams
 

Viewers also liked (20)

Social media for Business
Social media for BusinessSocial media for Business
Social media for Business
 
Mas sobre mi - Solicitud IE - Jessica A
Mas sobre mi - Solicitud IE - Jessica AMas sobre mi - Solicitud IE - Jessica A
Mas sobre mi - Solicitud IE - Jessica A
 
Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...
Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...
Pendergrass, Gary, GeoEngineers Inc., USEPA Coal Combustion Residuals Rule, I...
 
Homework 2
Homework  2Homework  2
Homework 2
 
Vayu, the Ayurvedic neurology.
Vayu, the Ayurvedic neurology.Vayu, the Ayurvedic neurology.
Vayu, the Ayurvedic neurology.
 
Analyzuj a proveď
Analyzuj a proveďAnalyzuj a proveď
Analyzuj a proveď
 
Bai 01 new
Bai 01 newBai 01 new
Bai 01 new
 
Teddyhouse 091021233119-phpapp02
Teddyhouse 091021233119-phpapp02Teddyhouse 091021233119-phpapp02
Teddyhouse 091021233119-phpapp02
 
Absolute inequalities
Absolute inequalitiesAbsolute inequalities
Absolute inequalities
 
Research report2
Research report2Research report2
Research report2
 
Ingurune esperimentua (Buru buruargia)
Ingurune esperimentua (Buru buruargia)Ingurune esperimentua (Buru buruargia)
Ingurune esperimentua (Buru buruargia)
 
Digital storytelling
Digital storytellingDigital storytelling
Digital storytelling
 
Using Content Marketing to Drive Sales
Using Content Marketing to Drive SalesUsing Content Marketing to Drive Sales
Using Content Marketing to Drive Sales
 
Media – aman dhillon
Media – aman dhillonMedia – aman dhillon
Media – aman dhillon
 
Tugas Jarkom Kel.2
Tugas Jarkom Kel.2Tugas Jarkom Kel.2
Tugas Jarkom Kel.2
 
Tugas 3 tik
Tugas 3 tikTugas 3 tik
Tugas 3 tik
 
Kaushansky Case Study
Kaushansky Case StudyKaushansky Case Study
Kaushansky Case Study
 
Catalog complet La Duchesse
Catalog complet La DuchesseCatalog complet La Duchesse
Catalog complet La Duchesse
 
Presentation
PresentationPresentation
Presentation
 
Rocky Mountain - Slemdal Sport & Fritid
Rocky Mountain - Slemdal Sport & FritidRocky Mountain - Slemdal Sport & Fritid
Rocky Mountain - Slemdal Sport & Fritid
 

Similar to What you need to know for postgresql operation

Tuning Autovacuum in Postgresql
Tuning Autovacuum in PostgresqlTuning Autovacuum in Postgresql
Tuning Autovacuum in Postgresql
Mydbops
 
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Ontico
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
Jakub Hajek
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
PROIDEA
 
273CC03851E778670A (1).ppt
273CC03851E778670A (1).ppt273CC03851E778670A (1).ppt
273CC03851E778670A (1).ppt
GayathriSanthosh11
 
Intro to Apache Apex - Next Gen Platform for Ingest and Transform
Intro to Apache Apex - Next Gen Platform for Ingest and TransformIntro to Apache Apex - Next Gen Platform for Ingest and Transform
Intro to Apache Apex - Next Gen Platform for Ingest and Transform
Apache Apex
 
Strategic Autovacuum
Strategic AutovacuumStrategic Autovacuum
Strategic Autovacuum
Scott Mead
 
Overview of Postgres Utility Processes
Overview of Postgres Utility ProcessesOverview of Postgres Utility Processes
Overview of Postgres Utility Processes
EDB
 
Kubernetes Walk Through from Technical View
Kubernetes Walk Through from Technical ViewKubernetes Walk Through from Technical View
Kubernetes Walk Through from Technical View
Lei (Harry) Zhang
 
Strategic autovacuum
Strategic autovacuumStrategic autovacuum
Strategic autovacuum
Jim Mlodgenski
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A
 
PGConf APAC 2018 - Tale from Trenches
PGConf APAC 2018 - Tale from TrenchesPGConf APAC 2018 - Tale from Trenches
PGConf APAC 2018 - Tale from Trenches
PGConf APAC
 
Percona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA'sPercona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA's
Karthik .P.R
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
Taro L. Saito
 
Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrency
Alex Miller
 
Concurrency
ConcurrencyConcurrency
Concurrency
Biju Nair
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
Ajith Narayanan
 
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache ApexHadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Apache Apex
 
Drinking from the Firehose - Real-time Metrics
Drinking from the Firehose - Real-time MetricsDrinking from the Firehose - Real-time Metrics
Drinking from the Firehose - Real-time Metrics
Samantha Quiñones
 
1404 app dev series - session 8 - monitoring & performance tuning
1404   app dev series - session 8 - monitoring & performance tuning1404   app dev series - session 8 - monitoring & performance tuning
1404 app dev series - session 8 - monitoring & performance tuning
MongoDB
 

Similar to What you need to know for postgresql operation (20)

Tuning Autovacuum in Postgresql
Tuning Autovacuum in PostgresqlTuning Autovacuum in Postgresql
Tuning Autovacuum in Postgresql
 
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
273CC03851E778670A (1).ppt
273CC03851E778670A (1).ppt273CC03851E778670A (1).ppt
273CC03851E778670A (1).ppt
 
Intro to Apache Apex - Next Gen Platform for Ingest and Transform
Intro to Apache Apex - Next Gen Platform for Ingest and TransformIntro to Apache Apex - Next Gen Platform for Ingest and Transform
Intro to Apache Apex - Next Gen Platform for Ingest and Transform
 
Strategic Autovacuum
Strategic AutovacuumStrategic Autovacuum
Strategic Autovacuum
 
Overview of Postgres Utility Processes
Overview of Postgres Utility ProcessesOverview of Postgres Utility Processes
Overview of Postgres Utility Processes
 
Kubernetes Walk Through from Technical View
Kubernetes Walk Through from Technical ViewKubernetes Walk Through from Technical View
Kubernetes Walk Through from Technical View
 
Strategic autovacuum
Strategic autovacuumStrategic autovacuum
Strategic autovacuum
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
 
PGConf APAC 2018 - Tale from Trenches
PGConf APAC 2018 - Tale from TrenchesPGConf APAC 2018 - Tale from Trenches
PGConf APAC 2018 - Tale from Trenches
 
Percona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA'sPercona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA's
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrency
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
 
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache ApexHadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
Hadoop Summit SJ 2016: Next Gen Big Data Analytics with Apache Apex
 
Drinking from the Firehose - Real-time Metrics
Drinking from the Firehose - Real-time MetricsDrinking from the Firehose - Real-time Metrics
Drinking from the Firehose - Real-time Metrics
 
1404 app dev series - session 8 - monitoring & performance tuning
1404   app dev series - session 8 - monitoring & performance tuning1404   app dev series - session 8 - monitoring & performance tuning
1404 app dev series - session 8 - monitoring & performance tuning
 

Recently uploaded

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 

Recently uploaded (20)

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 

What you need to know for postgresql operation

  • 1. What you need to know for Postgresql operation https://orabase.org/owncloud/index.php/s/vdqNlAqNqIPLxil materials
  • 2. Who Am I ? Oracle OCP 12c OCE 11g PT OCE 11g RAC Senior Specialist at RT Labs The guy on the left ^_^ PostgreSQL 9.3 Associate
  • 3. Presentation plan 1.Architecture of Postgresql 2.Transactions and Concurrency, MVCC 3.Connection Pooling ( pgpool,pgbouncer ) 4.Tips & Trics + Monitoring
  • 4. Architectural Summary : • PostgreSQL uses processes, not threads • Postmaster process acts as supervisor • Several utility processes perform background work • postmaster starts them, restarts them if they die • postmaster listens for new connections
  • 5. 1. Architecture of Postgresql
  • 6. Main Utility Processes: • Background writer − Writes dirty data blocks to disk • WAL writer − Flushes write-ahead log to disk • Checkpointer process − Automatically performs a checkpoint based on config parameters • Autovacuum launcher − Starts Autovacuum workers as needed • Autovacuum workers − Recover free space for reuse • Stats Collector – collects runtime statistics
  • 7. 1.Architecture of Postgresql 2.Transactions and Concurrency, MVCC 3.Connection Pooling ( pgpool,pgbouncer ) 4.Tips & Trics + Monitoring Presentation plan
  • 8. What is a Transaction? • A transaction is set of statements bundled into a single step, all-or- nothing operation • A transaction must possess ACID properties: • An all-or-nothing operation (Atomicity). • Only valid data is written to the database (Consistency). • The intermediate states between the steps are not visible to other concurrent transactions (Isolation). • If some failure occurs that prevents the transaction from completing, then none of the steps affect the database at all (Durability).
  • 9. 2. Transactions and Concurrency, MVCC • Snapshot of data at a point in time. • Updates, inserts and deletes cause the creation of a new row version. Row version stored in same page. • MVCC uses increasing transaction IDs to achieve consistency. • Each row has 2 transaction ids: created and expired • Queries check: • creation trans id is committed and < current trans counter • row lacks expire trans id or expire was in process at query start
  • 10. MVCC Maintenance • MVCC creates multiple versions of a row for concurrency • Old row versions can cause “bloat” • Rows no longer needed are recovered for reuse/removed via vacuuming or autovacuum • To prevent transaction wraparound failure each table must be vacuumed periodically • PostgreSQL reserves a special XID as FrozenXID • This XID is always considered older than every normal XID
  • 11. Presentation plan 1.Architecture of Postgresql 2.Transactions and Concurrency, MVCC 3.Connection Pooling ( pgpool,pgbouncer ) 4.Tips & Trics + Monitoring
  • 12. Pgpool • At first, developed for connection pooling • Replication Master/Slave mode • Load balancing • Automatic failover on desync detection • Online recovery • Parallel Query
  • 14. PgBouncer • Lightweight connection pooler for PostgreSQL • Any application can connect to Pgboucer as it connects with PostgreSQL • Pgbouncer help to lower down the connections impact on the PostgreSQL Server • Pgbouncer provides connection pooling thus reuse the existing connections
  • 15. Types of Connections • pgbouncer supports several types of pooling when rotating connections: • Session pooling − A server connection is assigned to the client application for the life of the client connection. • Transaction pooling − A server connection is assigned to the client application for the duration of a transaction • Statement pooling − A server connection is assigned to the client application for each statement
  • 16. How Connections are Established • An application connects to PgBouncer as if it were a PostgreSQL database • PgBouncer then creates a connection to the actual database server, or it reuses one of the existing connections from the pool • Step 1: The client application attempts to connect to PostgreSQL on the port where pgbouncer is running • Step 2: The database name supplied by the client application must match with the list in pgBouncer.ini • Step 3: The user name and password supplied must match with the list in users.txt • Step 4: If a connection with same settings is available in pool it will be assigned to client • otherwise a new connection object will be created • Step 5: Once client log off the connection object return back to the pool
  • 17. Manage pgbouncer • Show stats, servers, clients, pools, lists, databases, fds commands can be used. • Manage pgbouncer by connecting to the special administration database • pgbouncer and issuing show help; • $ psql -p 6543 -U someuser pgbouncer • pgbouncer=# show help; • NOTICE: Console usage • DETAIL: SHOW [HELP|CONFIG|DATABASES|FDS|POOLS|CLIENTS|SERVERS|SOCKETS|LISTS|VERSION]
  • 19. quick test with pgbouncer • Connecting to the bouncer over local unix socket, it took 31s to perform all the queries. • Connecting to the bouncer over localhost, it took 45s to perform all the queries. • Connecting to the bouncer running on the remote server, it took 1m6s • Without using pgbouncer, it took 3m34s
  • 20. 1.Architecture of Postgresql 2.Transactions and Concurrency, MVCC 3.Connection Pooling ( pgpool,pgbouncer ) 4.Tips & Trics + Monitoring Presentation plan
  • 21. What can we see ?
  • 22. What can we see ?
  • 23. How graphite populate data • We write function that in single pass get all information (still under development) • adm-get_stat_activity.sql
  • 24. Autovacuum & DB activity monitoring • autovacuum_count.Query=select count (*) from pg_stat_activity where state = 'active' AND query LIKE 'autovacuum:%’ • autovacuum_max.Query=select coalesce (max(round(extract( epoch FROM age(statement_timestamp(), state_change)))),0) active_seconds from pg_stat_activity where state = 'active' AND query LIKE 'autovacuum:%’ • xactcommit.Query=SELECT sum(xact_commit) FROM pg_stat_database • xactrollback.Query=SELECT sum(xact_rollback) FROM pg_stat_database
  • 27. What can we see ?
  • 28. Session activity monitoring • active_session_cnt.Query=select count (*) from pg_stat_activity where state='active' and pid != pg_backend_pid() • active_5s.Query=select count (*) from pg_stat_activity where state='active' and statement_timestamp() - state_change > INTERVAL '5s' AND query not LIKE 'autovacuum:%’ • active_max.Query=select coalesce(abs(max(round(extract( epoch FROM age(statement_timestamp(), state_change))))),0) • active_max_seconds from pg_stat_activity where state='active' AND query not LIKE 'autovacuum:%’ • idle_session_cnt.Query=select count (*) from pg_stat_activity where state='idle’ • idle_in_trans_cnt.Query=select count (*) from pg_stat_activity where state like 'idle in trans%’ • idle_in_trans_5s.Query=select count (*) from pg_stat_activity where state like 'idle in trans%' and statement_timestamp() - state_change > INTERVAL '5s’ • idle_in_trans_max.Query=select coalesce(max(round(extract( epoch FROM age(statement_timestamp(), state_change)))),0) max_idle_in_trans from eyes.get_pg_stat_activity() where state like ’ • idle in trans%'waiting_session_cnt.Query=select count (*) from eyes.get_pg_stat_activity() where waiting is true • waiting_session_5s.Query=select count (*) from pg_stat_activity where waiting is true and statement_timestamp() - state_change > INTERVAL '5s’ • waiting_session_max.Query=select coalesce (abs(max(round(extract( epoch FROM age(statement_timestamp(), state_change))))),0) • waiting_max from pg_stat_activity where waiting is true
  • 31. Query stats ( okmeter )
  • 33. What can we see ?
  • 34. Database stats monitoring • activeconn.Query=select sum(numbackends) from pg_stat_database • tupreturned.Query=select sum(tup_returned) from pg_stat_database • tupfetched.Query=select sum(tup_fetched) from pg_stat_database • tupinserted.Query=select sum(tup_inserted) from pg_stat_database • tupupdated.Query=select sum(tup_updated) from pg_stat_database • tupdeleted.Query=select sum(tup_deleted) from pg_stat_database
  • 37. What can we see ?
  • 38. MasterSlave stats queries • master_or_slave.Query=select pg_is_in_recovery()::int • slave_delay_mb.Query=select application_name,(pg_xlog_location_diff(sent_location, replay_location))/1024/1024 as mb_lag from pg_stat_replication as MB_lag • slave_delay_sec.Query=select extract(epoch FROM now() - COALESCE(pg_last_xact_replay_timestamp(),now()))
  • 40. Bgwriter +checkpoint stats • checkpoints_timed.Query=select checkpoints_timed from pg_stat_bgwriter • checkpoints_req.Query=select checkpoints_req from pg_stat_bgwriter • buffers_checkpoint.Query=select buffers_checkpoint from pg_stat_bgwriter • buffers_clean.Query=select buffers_clean from pg_stat_bgwriter • maxwritten_clean.Query=select maxwritten_clean from pg_stat_bgwriter • buffers_backend.Query=select buffers_backend from pg_stat_bgwriter • buffers_alloc.Query=select buffers_alloc from pg_stat_bgwriter
  • 44. What can we see ?
  • 45. What can we see ?
  • 46. Tips and Tricks • Pg_stat_statements • Pg_stat_kcache • pg_buffercache • pg_stat_user_indexes,pg_stat_user_tables *etc
  • 47. Pg_stat_statements • Good toolset by postgresql consulting
  • 48. Top query by avg runtime • select md5(query),calls,total_time,rows,shared_blks_hit,shared_blks_read, (total_time/calls) as avg_time from pg_stat_statements order by avg_time desc limit 5;
  • 50. pg_stat_kcache • Gathers statistics about real reads and writes done by the filesystem layer. • PostgreSQL >= 9.4 • Not yet in contrib
  • 51. pg_stat_kcache SELECT datname, queryid, round(total_time::numeric, 2) AS total_time, calls, pg_size_pretty((shared_blks_hit+shared_blks_read)*8192 - reads) AS memory_hit, pg_size_pretty(reads) AS disk_read, pg_size_pretty(writes) AS disk_write, round(user_time::numeric, 2) AS user_time, round(system_time::numeric, 2) ASsystem_time FROM pg_stat_statements s JOIN pg_stat_kcache() k USING (userid, dbid, queryid) JOIN pg_database d ON s.dbid = d.oid WHERE datname != 'postgres' AND datname NOT LIKE 'template%’ ORDER BY total_time DESC LIMIT 10;
  • 54. Top object in cache SELECT c.relname , pg_size_pretty(count(*) * 8192) as buffered , round(100.0 * count(*) / ( SELECT setting FROM pg_settings WHERE name='shared_buffers')::integer,1) AS buffers_percent , round(100.0 * count(*) * 8192 / pg_relation_size(c.oid),1) AS percent_of_relation FROM pg_class c JOIN pg_buffercache b ON b.relfilenode = c.relfilenode JOIN pg_database d ON (b.reldatabase = d.oid AND d.datname = current_database()) WHERE pg_relation_size(c.oid) > 0 GROUP BY c.oid, c.relname ORDER BY 3 DESC LIMIT 10;
  • 55. Top object in cache example
  • 56. Top 20 unused indexes SELECT relid::regclass AS table, indexrelid::regclass AS index, pg_size_pretty(pg_relation_size(indexrelid::regclass)) AS index_size, idx_tup_read, idx_tup_fetch, idx_scan FROM pg_stat_user_indexes JOIN pg_index USING (indexrelid) WHERE idx_scan = 0 AND indisunique IS FALSE order by pg_relation_size(indexrelid::regclass) desc limit 20;
  • 57. Top 20 unused indexes examples
  • 58. indexes on nulls Select pg_index.indrelid::regclass as table, pg_index.indexrelid::regclass as index, pg_attribute.attname as field,pg_statistic.stanullfrac, pg_size_pretty(pg_relation_size(pg_index.indexrelid)) as indexsize, pg_get_indexdef(pg_index.indexrelid) as indexdef from pg_index join pg_attribute ON pg_attribute.attrelid=pg_index.indrelid AND pg_attribute.attnum=ANY(pg_index.indkey) join pg_statistic ON pg_statistic.starelid=pg_index.indrelid AND pg_statistic.staattnum=pg_attribute.attnum where pg_statistic.stanullfrac>0.5 AND pg_relation_size(pg_index.indexrelid)>10*8192 order by pg_relation_size(pg_index.indexrelid) desc,1,2,3;
  • 59. indexes on nulls examples
  • 60. Duplicate indexes SELECT pg_size_pretty(SUM(pg_relation_size(idx))::BIGINT) AS SIZE, (array_agg(idx))[1] AS idx1, (array_agg(idx))[2] AS idx2, (array_agg(idx))[3] AS idx3, (array_agg(idx))[4] AS idx4 FROM ( SELECT indexrelid::regclass AS idx, (indrelid::text ||E'n'|| indclass::text ||E'n'|| indkey::text ||E'n'|| COALESCE(indexprs::text,'')||E'n' || COALESCE(indpred::text,'')) AS KEY FROM pg_index) sub GROUP BY KEY HAVING COUNT(*)>1 ORDER BY SUM(pg_relation_size(idx)) DESC;
  • 62. Missing index SELECT relname, seq_scan-idx_scan AS too_much_seq, case when seq_scan-idx_scan>0 THEN 'Missing Index?' ELSE 'OK' END, pg_size_pretty(pg_relation_size(relname::regclass)) AS rel_size, seq_scan, idx_scan FROM pg_stat_all_tables WHERE schemaname='public' AND pg_relation_size(relname::regclass)>10*1024*1024 ORDER BY too_much_seq DESC nulls last;
  • 65. Write activity SELECT s.relname, pg_size_pretty(pg_relation_size(relid)), coalesce(n_tup_ins,0) + 2 * coalesce(n_tup_upd,0) - coalesce(n_tup_hot_upd,0) + coalesce(n_tup_del,0) AS total_writes, (coalesce(n_tup_hot_upd,0)::float * 100 / (CASE WHEN n_tup_upd > 0 THEN n_tup_upd ELSE 1 END)::float)::numeric(10,2) AS hot_rate, (SELECT v[1] FROM regexp_matches(reloptions::text,e'fillfactor=(d+)') AS r(v) LIMIT 1) AS fillfactor FROM pg_stat_all_tables s JOIN pg_class c ON c.oid=relid ORDER BY total_writes DESC LIMIT 50;
  • 67. Usefull materials • Postgrespro курс на русском • Способы диагностики PostgreSQL ( yandex ) • Deep dive into postgresql statistics • PostgreSQL meetup @ Avito (9.04.2016) • What is HOT
  • 68. please feel free to contact me at email: bushmelev.aa@gmail.com

Editor's Notes

  1. В виду последних событий и тренда на импортозамещение большую популярность набирает база данных postgresql, Тема доклада : что нужно знать для эксплуатации postgres
  2. Коллеги, доброго дня, по традиции немного о себе, почти два года работаю в РТ Лабс старшим специалистом в отделе эксплуатации субд . Умудрился сдать на сертификаты: ( клац клац мышкой ) эксперт по кластерам Oracle , настройке производительности бла бла бла, но в свете последних событий судьба оракла в России туманна, поэтому пришлось заняться постгресом, собственно этот доклад будет на тему того что нужно знать для его эксплуатации Клац Сейчас уже сдал на первый сертификат по postgres клац Человек слева :) справа Илья Космодемьянский ( Postgrespro )
  3. План презентации: Начнем с ахритектуры ( куда же без этого ) Продолжим расказом про уровни изоляции транзакций и управление конкурентным доступом с помощью многоверсионности ( MVCC Multi-Version Concurrency Control ) Третим пунктом будет описание реализации пула коонектов сторонними средствами ( pgpool,pgbouncer ) Последним пойдет обзор того что и чем можно пользоваться в postgres для анализа
  4. Postgresql использует процессы, не треды, это значит что каждый пользователь подключившийся к базе обслуживается отдельным серверным процессом Все процессы порождаются одним, postmaster Главный процесс postmaster, запускает вспомогательные процессы которые делают фоновую работу, постмастер перезапускает их если они умерли если перезапуск не удался – постмастер убивает экземпляр так же постмастер слушает запросы на новые подключения
  5. Этот слайд показывает общую архитектуру процессов и памяти Так же можно увидеть файлы, с них и начнем: Датафайлы, где хранятся данные Wal segments – логи транзакции Archive wal– если настроено, в случае если лог полный и переключен он может быть заахривирован в отдельную папку ERROR log – если настроено, то все ошибки, долгие транзакции, логи установки соединения будут писаться в лог В памяти: Во время старта экземпляра ему выделяется разделяемый кусок памяти ( shared memory ) Его можно разделить на: Shared buffers: – используется для операций с датафайлами ( кеш блоков ) WAL Buffers: - Process Array : - т.к каждый пользователь это процесс, то база должна поддерживать этот список процессов, так же как поддерживать список блокировок которые держат эти процессы и другую информацию необходимую для работы Впомогательные процессы ( bgwriter etc ) работают в фоне
  6. Основные вспомогательные процессы: работают в фоне Bgwiter пишет грязные буферы на диск Wall writer пишет данные в wal логи на каждом коммите Checkpointer ( every 5 min, manual, when full ) просыпается процесс и удостоверяется что все что есть в памяти скидывается на диск Autovacuum launcer – по умолчанию запущен (и это хорошо ) – запускает autowacuum workers Autowacuum workers – делают работу по очистке старых записей и сбору статитики Stats Collector – важный процесс, который собирает статитику, настройки которые отвечают за то, сколько статистики будет собиратся : The parameter track_activities enables monitoring of the current command being executed by any server process. The parameter track_counts controls whether statistics are collected about table and index accesses. (pg_stat_activity)  The parameter track_functions enables tracking of usage of user-defined functions. The parameter track_io_timing enables monitoring of block read and write times.
  7. Пример запущенных процессов
  8. Пройдемся по транзакциям и узнаем как реализован принцип ACID
  9. Что такое транзакция ? Транзакция это набор выражений собранных в один шаг, операция все или ничего Транзакция должна соблюдать свойства ACID : Атомарность гарантирует, что никакая транзакция не будет зафиксирована в системе частично. Будут либо выполнены все её подоперации, либо не выполнено ни одной. Согласованность Транзакция, достигающая своего нормального завершения (EOT — end of transaction, завершение транзакции) и, тем самым, фиксирующая свои результаты, сохраняет согласованность базы данных. Другими словами, каждая успешная транзакция по определению фиксирует только допустимые результаты. Это условие является необходимым для поддержки четвёртого свойства. Изолированность. Во время выполнения транзакции параллельные транзакции не должны оказывать влияние на её результат. Долговечность :Независимо от проблем на нижних уровнях (к примеру, обесточивание системы или сбои в оборудовании) изменения, сделанные успешно завершённой транзакцией, должны остаться сохранёнными после возвращения системы в работу. Другими словами, если пользователь получил подтверждение от системы, что транзакция выполнена, он может быть уверен, что сделанные им изменения не будут отменены из-за какого-либо сбоя.
  10. Как ACID реализован в Postgres: Обычное явление когда несколько пользователей работают с одним набором данных, для обеспечения конуретного доступа в используются снапшоты Версии строк храняться в той же странице, MVCC увеличивает счетчик айди транзакции для обеспечения согласованности
  11. Для работы MVCC использются несколько версий строк для конкурентного доступа Старые строки могут быть причиной распухания, бороться с ним помогает вакум или автовакум, который удаляет неиспользуемые строки Работа механизмов MVCC была бы невозможна без существования счётчика транзакций. Загадка, почему до сих пор счётчик этот 32-х битный, но имеем то, что имеем — через каждые 2 миллиарда транзакций счётчику полагается обнулиться. Чтобы не произошло потери данных этим строкам ставится в соответствие некий зарезервированный FrozenXID. При достижении счётчиком транзакций определённого конфигом значения запускается автовакуум с красивым комментом «to prevent wraparound». При больших таблицах (в десятки ГБ) этот процесс может занять часы, в течение которых таблица будет недоступна ни для чтения, ни для записи.
  12. Дело в том, что postgres для каждого соединения создает новый процесс. Чтобы «удешевить» соединение с БД, современные библиотеки используют пул соединений. То есть, они один раз соединяются с БД, а потом многократно используют это соединение. Если в библиотеке работы с БД нет возможности организовывать пулы соединений, то на помощь приходят pgpool и pgnouncer
  13. Пгпул, хорошая утилита ,позволяющая делать паралельные запрсы, сама может раскидывать читающие запросы на стендбаи, а запросы на сапись на мастер, может сделать автоматический файловер.. Но файловер настраивается руками, поэтому нужна квалифакация
  14. У меня ее не было  и после того как на проде получили 2 мастера приняли решение отказаться от него
  15. Более легковесный чем pgpool, На слайде видно что после переключения с pgpool на pgbouncer нагрузка на процессор и памят упала. Pgbouncer выступает как промежуточный слой между клиентом и сервером, клиент подключается к пгбаунсеру точно так же как он бы подключался к базе данных, но после завершения сесии клиента пгбаунсер не закрывает соединение с базой, а возвращает его в пул свободных. Тем самым снижается нагрузка на базу на открытие новых соединений
  16. Типы соединений: Пгбаунсер поддерживает несколько типов соединений: Клац Пулл на уровне сессии – это когда соединение с сервером назначено клиенту на время всей жизни соединения Клац Пул опетаций– это когда соедидение выдано клиенту на время одной операции Клац Мы используем Сешн пул Т.к сторонний софт может выставлять сессионные переменные, следовательно они могут заафектить другие сессии, поэтому разработчикам стоит подключаться к базе напрямую
  17. Пропустим..
  18. Пропустим
  19. Кому интересно как это все работает под большой нагрузкой приведу пример использования в авито где реализовали схему с pgbouncer расположеным на балансировщиках и перед базой Есть ссылка на доклад
  20. На сколько это эффективно: Небольшой тест Замеряли 50000 запросов select now() c установкой соединения для каждого запроса и после закрывали соединение. Результаты: с использованием bgbouncer тест отрабатывал быстрее минимум в 3 раза
  21. В данной части мы пройдемся по тому что мы смотрим ( собираемся смотреть ) + набор полезных скриптов
  22. Что мы можем посмотреть.. :) похоже что можно посмотреть практически все но порой и этого не достаточно Начнем с мониторинга, то что заведено в графики, после покажу запросы которыми можно вытащить полезную информацию Начнем по порядку: Клац
  23. Тут основной интерес к работе автовакума и активности экземпляра ( кол-во коммитов ролбэков ) они же TPS
  24. Это метрики для заббикса, смотрим количество сессий автовакума и время самой долгой операции автовакума, так же количество коммитов и ролбэков на основе которых высчитывается TPS SELECT sum(xact_commit+xact_rollback) FROM pg_stat_database;
  25. Автовакум : вывели на график количеств сессий + график самой долгой сессии TPS: вывели отдельно информацию о кол-ве коммитов и ролбеков
  26. На график выводиться количество активных или ждущих сессий, в том числе и автовакум + информацио об их длительности
  27. Данный блок наиболее полезный, т.к хранит информациу о текущих ( активных или ждущих ) сессиях, так же статистику по запросам
  28. Тут смотрим на количество активных, активных дольше 5ти секунд сессий Так же на самую долгую сессию Отдельно выводим информацию об сессиях которые в состоянии idle In transaction или ждут блокировку В данный момент для заббикса каждая метрика опрашивается поодельности, для графаны мой коллега Самойлов Александр реализовал все это в виде функции которая делает по одному запросу к представлениям и возвращает итоговый набор данных который уже отрисовывается графиками, что, как очевидно, более эффективно
  29. Очень полезная информация из модуля pg_stat_statements Показывает какие запросы в какое время были активны в базе, но тут есть один ньюанс – статистика в pg_stat_activity попадает после завершения запроса.. В данный момент у нас не реализовано, но есть аналог ( Клац )
  30. Нечто подобное в данный момент у нас реализовано средставми анализатора логов от vmware, картина не полная, т.к в лог попадают запросы дольше 200 мс
  31. Статистика работы с буфером, общая статистика активнсти по базе
  32. Количество подключений к базе Количество таплов ( можно обобщить как строки ) которые вернули Количество строк которые вставили\ удалили Для заббикса можно добавить метрику использования темпа Тут стоит учесть что раз мы метрики собираем раз в N секунд, то и результат должны делить на N, чтобы получить кол-во операций в секунду
  33. Тут мы поделили RO + RW активности
  34. Тоже самое в Graphana
  35. В этом блоке мониторим отставание стендбаев + статистику процесса чекпоинта
  36. В данный момент заведено только в графане, т.к заббикс стали внедрять пару недель назад На графиках видно отставание реплик в разрезе времени и объеме информации которое нужно передать
  37. Чекпойты по времени являются нормой, если пошли реквесты на чекпоинт, то с этим надо разбираться
  38. В данном блоке больше информации пожно получить из операционной системы, как то утилизация дисков, сети, кол-во операций ввода вывода, время ожидания дисков Думаю где искать эти метрики всем хорошо знакомо, как и их визуализация.
  39. Эту часть рассморим на примере конкретных запросов, которые можно ( и нужно ) использовать в работе
  40. Для обладателей доступа в наш конфлюенс есть сслка на документ В данной части пройдемся по наибоее интересным ( для меня ) расширениям: pg_buffercache, Pg_stat_statements, Pg_stat_kcache Дальше покажу несоклько запросов которые помогут оценить что можно улучшить в архитектуре приложения.
  41. Данный модуль содержит коммулятивную статитику запросов ( с момента старта экземпляра, но можно сбросить) Позволяет посмотреть топ запросов Есть набор готовых скриптов от postgesql consulting
  42. на основе этой вью легко строить подобные отчеты в различных разрезах ( данный по среднему времени выполнения )
  43. В данном примере используется статистика blk_read_time blk_wite_time, за которую отвечает параметр  track_io_timing
  44. Начнем pg_stat_kcache который позволяет собрать статистику о реальных чтениях\записи сделанных файловой системой Для работы нужен 9.4 И, к сожалению, в данний момент не в контрибе..
  45. Данным запросом мы находим топ запрсов по общему времени выполенения, но уже с учетом физичиких чтений\записи
  46. ПГ буферкэш, нужен для того чтобы определить какая часть таблицы\индекса закешировано в шаред буферах Для каждого буфера в общем кеше выдаётся одна строка, следовательно если посчитать каунт по нужным условиям, то получим общее количество буферов занятых обьектом. При обращении к представлению pg_buffercache устанавливаются блокировки менеджера внутренних буферов на время, достаточное для копирования всех данных состояния буферов, которые будут выводиться в представлении, это может повлиять на производительность базы данных, если обращаться к этому представлению часто.
  47. Данным запросом находим топ 10 обьетов в кеше и высчитываем процент от общего количество шаред буферов и процент от всего размера обьекта
  48. Дальше пойдут полезные запросы по системному каталогу, этим запросом мы найдем индексы которые не используются + их размеры
  49. Индексы по нулам, где процент нулов больше 50%
  50. Дубли индексов
  51. HOT stands for Heap Overflow Tuple and this is an attempt to solve some of the problems associated with frequently updated tables. This design optimizies the updates when none of the index columns are modified and length of the tuple remains the same after update. In this particular case, the updated tuple is stored in a seperate overflow relation and pulled-back into the main relation when the tuple in the main relation becomes dead.
  52. Коллеги, если не успею ответить на вопросы ( или не смогу ), то пожалуйста напишите их мне, со своей стороны обещаю разобраться и дать ответ за вменяемое время.