SlideShare a Scribd company logo
Sharing Code and
Experiences
@fabriziomello
Acknowledgements
About Me
Fabrízio de Royes Mello
● Bachelor in Information Systems in 2/2002 (URCAMP)
● Entrepeneur at http://timbira.com
● Agile Methodologies Specialization student 2014/2015
● PostgreSQL colaborator since 2008 (Brazilian
community and now the international too)
… and nowadays
● PostgreSQL contributor (more than 35
patches as developer and/or reviewer)
● Brazilian Community
○ http://postgresql.org.br
○ http://listas.postgresql.org.br
● PostgreSQL Consultant at Timbira
○ http://timbira.com.br
About Timbira
The brazilian PostgreSQL Company
The brazilian PostgreSQL company
● Consulting
● Support
● Training
● Development (PostgreSQL related)
http://www.timbira.com.br
Special gifts to participants
1. 2 (two) hours of “Free Health Check or
Mentoring” with a Timbira PostgreSQL
Consultant
2. 3 (three) training vouchers (100%)
a. Fundamentals
b. Backup and Restore
c. Tuning
Just to stay
all of us tuned!!!
Everybody knows what a database is?
Is this a database?
Of course not!
But what wikipedia tell us?
A database is an integrated and organized
collection of logically related records or files or
data that are stored in a computer system
which consolidates records previously stored in
a separate files into a common pool of data
records that provides data for many
applications.
Source: http://en.wikipedia.org/wiki/Database
WTF???
Ok, more simple and in pt-br !!
“Bancos de dados ou bases de dados são
coleções organizadas de dados que se
relacionam de forma a criar algum sentido
(Informação) e dar mais eficiência durante uma
pesquisa ou estudo.” (Wikipedia)
Source: http://pt.wikipedia.org/wiki/Banco_de_dados
Database is a concept
Relational Database Management Systems
is the implementation of this concept
About PostgreSQL
About PostgreSQL
The world’s most advanced open source database
PostgreSQL (http://postgresql.org)
● The world’s most advanced open source database
● Run in all major operating systems: Linux, UNIX (AIX,
BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and
Windows
● Fully ACID compliant (Atomicity, Consistency, Isolation
and Durability)
● Full support for foreign keys, joins, views, triggers, and
stored procedures (in multiple languages)
● Native programming interfaces for C/C++, Java, .Net,
Perl, Python, Ruby, Tcl, ODBC, among others.
PostgreSQL (http://postgresql.org)
● Before : born from INGRES
● 1986 : Project start (Berkley)
● 1987 : First Postgres version Postgres
● 1991 : (v 3) with the most of the actual features
● 1993 : (v 4.2) last released by Berkley
● 1994 : Andrew Yu and Jolly Chen release Postgre95
with support to SQL language
● 1997 : (v 6) Name changes to PostgreSQL
● 2000 : (v 7) Support to Foreign Keys
PostgreSQL (http://postgresql.org)
● 2005 : (v 8) Native port to Windows, Tablespaces,
Savepoints, Point-In-Time-Recovery
● 2005 : (v 8.1) Two-phase Commit, Roles
● 2006 : (v 8.2) [Insert, Update, Delete] Returning,
improve performance OLTP and BI
● 2008 : (v 8.3) Debug PL/PgSQL, Tsearch2 (XML)
incorporated to the core, performance improvements
● 2009 : (v 8.4) Windowing Functions, Common Table
Expressions and Recursive Queries, Parallel Restore,
“pg_upgrade”
PostgreSQL (http://postgresql.org)
● 2010 : (v 9.0) Hot Standby and Streaming Replication
● 2011 : (v 9.1) Synchronous Replicacion, FDW
(SQL/MED), CREATE EXTENSION, Unlogged Tables
● 2012 : (v 9.2) Index-only Scans, Cascading Replication,
JSON, Range Types
● 2013 : (v 9.3) Materialized Views, Lateral Join, writable
FDW, Event Triggers, Background Workers
● 2014 : (v 9.4) JSONB, Logical Decoding, Dynamic
Background Workers
PostgreSQL (http://postgresql.org)
● 2015 : (v 9.5) INSERT … ON CONFLICT UPDATE
(upsert), IMPORT FOREIGN SCHEMA, ALTER TABLE
.. SET LOGGED, Parallel Infrastructure
● 2016 : (v 9.6) Parallel Sequencial Scan, Join and
Aggregates
About FOOS and Google
FOSS (free and open source software) and me
● My first contact was using Linux in 1997
● I fell in love with this culture since then
● In 1999 I met PostgreSQL so since then I
knew this would be part of my life
● Because of this decision I had a lot of
troubles, including financial…
● But here I am :-)
Is a global program that
offers students stipends to
write code for open source
projects.
We have worked with the
open source community to
identify and fund exciting
projects for the upcoming
summer.
Connect students to
open source communities
GSoC and PostgreSQL
● Since 2006
● Cool projects
○ Fast GiST index build
○ New phpPgAdmin Plugin Architecture (brazilian)
○ pgAdmin database designer
○ Better indexing for ranges
○ Document collection Foreign-data Wrapper
About My Project
At September 2011
PostgreSQL 9.1 introduced a new kind of table
Unlogged Tables
What means “Unlogged”?
First we need to know what means “WAL”
PostgreSQL is Full-ACID and to guarantee data
integrity uses a standard method called
WAL (Write-Ahead Logging)
WAL (Write-Ahead Logging)
“In computer science, write-ahead logging (WAL) is a family
of techniques for providing atomicity and durability (two of
the ACID properties) in database systems.
In a system using WAL, all modifications are written to a log
before they are applied. Usually both redo and undo
information is stored in the log.”
http://en.wikipedia.org/wiki/Write-ahead_logging
WAL (Write-Ahead Logging)
ARIES (Algorithms for Recovery and Isolation
Exploit Semantics)
https://en.wikipedia.org/wiki/Algorithms_for_Re
covery_and_Isolation_Exploiting_Semantics
http://www.vldb.org/conf/1999/P1.pdf
WAL first rule!
Ok, and what means “Unlogged” ?
● Unlogged means that the data written in
these tables is not written to WAL.
● So it makes written really, really fast
compared to written into regular tables.
Demo Time
So I’ll use it to ALL of my tables...
● However you won’t want to do that, because
● They are neither crash-safe (an unlogged
table is automatically truncated after a crash
or unclean shutdown)
● And they are nor replicated using SR
But there are some cool use cases
● Speed ETL jobs
● Cache
● Session State
● Queues?!
● ...
And now we have the power to ...
● change from UNLOGGED to LOGGED
○ ALTER TABLE name SET LOGGED;
● change from LOGGED to UNLOGGED
○ ALTER TABLE name SET UNLOGGED;
Git commit message
commit: f41872d0c1239d36ab03393c39ec0b70e9ee2a3c
author: Alvaro Herrera <alvherre@alvh.no-ip.org>
date: Fri, 22 Aug 2014 14:27:00 -0400
Implement ALTER TABLE .. SET LOGGED / UNLOGGED
This enables changing permanent (logged) tables to unlogged and
vice-versa.
(Docs for ALTER TABLE / SET TABLESPACE got shuffled in an order that
hopefully makes more sense than the original.)
Author: Fabrízio de Royes Mello
Reviewed by: Christoph Berg, Andres Freund, Thom Brown
Some tweaking by Álvaro Herrera
How it works
1. Acquire AcessExclusiveLock
2. Check dependencies
a. Cannot change temp tables
b. Check Foreign Keys
3. Create new heap/toast with new relpersistence
(pass down relpersistence to reindex_index)
4. Rewrite heap/toast
5. Rewrite indexes
Demo Time
Currently Caveats
● AccessExclusiveLock
● Rewrite datafiles
Future work
● Don’t rewrite datafiles when wal_level =
minimal
● Unlogged Indexes on Regular Tables
● Unlogged Materialized Views (was reverted
by Tom Lane because of the bad design)
Questions?
Special thanks to
● Stephen Frost (mentor)
● Josh Berkus and Thom Brown (organizers)
● Christoph Berg (patch review)
● Álvaro Herrera (patch review and commit)
● Maristela Kohlrausch de Andrade (my
english teacher)
● http://fabriziomello.github.io
● https://www.linkedin.com/in/fabriziomello
● @fabriziomello
My contacts
GSoC2014 - PGDay Ijui/RS Presentation October, 2016

More Related Content

Viewers also liked

Keep calm and Database Continuous Deployment
Keep calm and Database Continuous DeploymentKeep calm and Database Continuous Deployment
Keep calm and Database Continuous Deployment
Fabrízio Mello
 
GSoC2014 - PGCon2015 Presentation June, 2015
GSoC2014 - PGCon2015 Presentation June, 2015GSoC2014 - PGCon2015 Presentation June, 2015
GSoC2014 - PGCon2015 Presentation June, 2015
Fabrízio Mello
 
Dojo plpgsql
Dojo plpgsqlDojo plpgsql
Dojo plpgsql
Fabrízio Mello
 
EXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQLEXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQL
Fabrízio Mello
 
Bad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de DadosBad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de Dados
Fabrízio Mello
 
Bad Smells em Bancos de Dados
Bad Smells em Bancos de DadosBad Smells em Bancos de Dados
Bad Smells em Bancos de Dados
Fabrízio Mello
 
Dojo PHP (treinanto programação orientada a objetos em PHP)
Dojo PHP (treinanto programação orientada a objetos em PHP)Dojo PHP (treinanto programação orientada a objetos em PHP)
Dojo PHP (treinanto programação orientada a objetos em PHP)
Fabrízio Mello
 
Postgres Wonderland - PGDay Cascavél 2013
Postgres Wonderland - PGDay Cascavél 2013Postgres Wonderland - PGDay Cascavél 2013
Postgres Wonderland - PGDay Cascavél 2013
Fabio Telles Rodriguez
 
Sharing Code and Experiences
Sharing Code and ExperiencesSharing Code and Experiences
Sharing Code and Experiences
Fabrízio Mello
 
GSoC2014 - Uniritter Presentation May, 2015
GSoC2014 - Uniritter Presentation May, 2015GSoC2014 - Uniritter Presentation May, 2015
GSoC2014 - Uniritter Presentation May, 2015
Fabrízio Mello
 
Planejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQLPlanejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQL
Fabrízio Mello
 
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
Андрей Анатольевич Ващенко
 
יחידת הוראה לחנכה
יחידת הוראה לחנכהיחידת הוראה לחנכה
יחידת הוראה לחנכה
Max Rokach
 
Tutorial Database Refactoring
Tutorial Database RefactoringTutorial Database Refactoring
Tutorial Database Refactoring
Fabrízio Mello
 
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
Fabrízio Mello
 
PostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords SafelyPostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords Safely
Juliano Atanazio
 
PROCERGS 2015-03-25: Bad Smells em Bancos de Dados
PROCERGS 2015-03-25: Bad Smells em Bancos de DadosPROCERGS 2015-03-25: Bad Smells em Bancos de Dados
PROCERGS 2015-03-25: Bad Smells em Bancos de Dados
Fabrízio Mello
 
Greenplum: O banco de dados open source massivamente paralelo baseado em Post...
Greenplum: O banco de dados open source massivamente paralelo baseado em Post...Greenplum: O banco de dados open source massivamente paralelo baseado em Post...
Greenplum: O banco de dados open source massivamente paralelo baseado em Post...
PGDay Campinas
 
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di CiurcioDevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
PGDay Campinas
 

Viewers also liked (19)

Keep calm and Database Continuous Deployment
Keep calm and Database Continuous DeploymentKeep calm and Database Continuous Deployment
Keep calm and Database Continuous Deployment
 
GSoC2014 - PGCon2015 Presentation June, 2015
GSoC2014 - PGCon2015 Presentation June, 2015GSoC2014 - PGCon2015 Presentation June, 2015
GSoC2014 - PGCon2015 Presentation June, 2015
 
Dojo plpgsql
Dojo plpgsqlDojo plpgsql
Dojo plpgsql
 
EXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQLEXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQL
 
Bad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de DadosBad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de Dados
 
Bad Smells em Bancos de Dados
Bad Smells em Bancos de DadosBad Smells em Bancos de Dados
Bad Smells em Bancos de Dados
 
Dojo PHP (treinanto programação orientada a objetos em PHP)
Dojo PHP (treinanto programação orientada a objetos em PHP)Dojo PHP (treinanto programação orientada a objetos em PHP)
Dojo PHP (treinanto programação orientada a objetos em PHP)
 
Postgres Wonderland - PGDay Cascavél 2013
Postgres Wonderland - PGDay Cascavél 2013Postgres Wonderland - PGDay Cascavél 2013
Postgres Wonderland - PGDay Cascavél 2013
 
Sharing Code and Experiences
Sharing Code and ExperiencesSharing Code and Experiences
Sharing Code and Experiences
 
GSoC2014 - Uniritter Presentation May, 2015
GSoC2014 - Uniritter Presentation May, 2015GSoC2014 - Uniritter Presentation May, 2015
GSoC2014 - Uniritter Presentation May, 2015
 
Planejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQLPlanejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQL
 
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
 
יחידת הוראה לחנכה
יחידת הוראה לחנכהיחידת הוראה לחנכה
יחידת הוראה לחנכה
 
Tutorial Database Refactoring
Tutorial Database RefactoringTutorial Database Refactoring
Tutorial Database Refactoring
 
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
 
PostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords SafelyPostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords Safely
 
PROCERGS 2015-03-25: Bad Smells em Bancos de Dados
PROCERGS 2015-03-25: Bad Smells em Bancos de DadosPROCERGS 2015-03-25: Bad Smells em Bancos de Dados
PROCERGS 2015-03-25: Bad Smells em Bancos de Dados
 
Greenplum: O banco de dados open source massivamente paralelo baseado em Post...
Greenplum: O banco de dados open source massivamente paralelo baseado em Post...Greenplum: O banco de dados open source massivamente paralelo baseado em Post...
Greenplum: O banco de dados open source massivamente paralelo baseado em Post...
 
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di CiurcioDevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
 

Similar to GSoC2014 - PGDay Ijui/RS Presentation October, 2016

An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
Joshua Drake
 
Planning for CRAP and entity revisions in Drupal core
Planning for CRAP and entity revisions in Drupal corePlanning for CRAP and entity revisions in Drupal core
Planning for CRAP and entity revisions in Drupal core
Dick Olsson
 
What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3
Pavan Deolasee
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present futurelolopetit
 
HelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersHelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript Developers
Juho Teperi
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
Mukesh Singh
 
Handout: 'Open Source Tools & Resources'
Handout: 'Open Source Tools & Resources'Handout: 'Open Source Tools & Resources'
Handout: 'Open Source Tools & Resources'
BDPA Education and Technology Foundation
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisDeep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Citus Data
 
Rails data migrations
Rails data migrationsRails data migrations
Rails data migrations
Andrei Kaleshka
 
Webbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript DevelopersWebbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript Developers
Juho Teperi
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
Aleksander Alekseev
 
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Jacek Gebal
 
rsyslog meets docker
rsyslog meets dockerrsyslog meets docker
rsyslog meets docker
Rainer Gerhards
 
From Zero to Hero @ PyGrunn 2014
From Zero to Hero @ PyGrunn 2014From Zero to Hero @ PyGrunn 2014
From Zero to Hero @ PyGrunn 2014
meij200
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
Wei Shan Ang
 
Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsPostgreSQL Experts, Inc.
 
Elephant Roads: a tour of Postgres forks
Elephant Roads: a tour of Postgres forksElephant Roads: a tour of Postgres forks
Elephant Roads: a tour of Postgres forks
Command Prompt., Inc
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL Extensions
EDB
 
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveOSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
NETWAYS
 
Instant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetInstant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and Puppet
Patrick Lee
 

Similar to GSoC2014 - PGDay Ijui/RS Presentation October, 2016 (20)

An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
 
Planning for CRAP and entity revisions in Drupal core
Planning for CRAP and entity revisions in Drupal corePlanning for CRAP and entity revisions in Drupal core
Planning for CRAP and entity revisions in Drupal core
 
What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
HelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersHelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript Developers
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
 
Handout: 'Open Source Tools & Resources'
Handout: 'Open Source Tools & Resources'Handout: 'Open Source Tools & Resources'
Handout: 'Open Source Tools & Resources'
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisDeep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
 
Rails data migrations
Rails data migrationsRails data migrations
Rails data migrations
 
Webbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript DevelopersWebbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript Developers
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
 
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
 
rsyslog meets docker
rsyslog meets dockerrsyslog meets docker
rsyslog meets docker
 
From Zero to Hero @ PyGrunn 2014
From Zero to Hero @ PyGrunn 2014From Zero to Hero @ PyGrunn 2014
From Zero to Hero @ PyGrunn 2014
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and Variants
 
Elephant Roads: a tour of Postgres forks
Elephant Roads: a tour of Postgres forksElephant Roads: a tour of Postgres forks
Elephant Roads: a tour of Postgres forks
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL Extensions
 
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveOSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
 
Instant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetInstant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and Puppet
 

More from Fabrízio Mello

PHP e PostgreSQL: Um é pouco, dois é bom, três é demais
PHP e PostgreSQL: Um é pouco, dois é bom, três é demaisPHP e PostgreSQL: Um é pouco, dois é bom, três é demais
PHP e PostgreSQL: Um é pouco, dois é bom, três é demais
Fabrízio Mello
 
Bad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de DadosBad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de Dados
Fabrízio Mello
 
URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...
URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...
URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...
Fabrízio Mello
 
DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...
DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...
DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...
Fabrízio Mello
 
Software Delivery Like a Boss
Software Delivery Like a BossSoftware Delivery Like a Boss
Software Delivery Like a Boss
Fabrízio Mello
 
NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)
NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)
NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)
Fabrízio Mello
 
Oficina PostgreSQL Básico Latinoware 2012
Oficina PostgreSQL Básico Latinoware 2012Oficina PostgreSQL Básico Latinoware 2012
Oficina PostgreSQL Básico Latinoware 2012
Fabrízio Mello
 
Oficina postgresql avançado_consegi2010
Oficina postgresql avançado_consegi2010Oficina postgresql avançado_consegi2010
Oficina postgresql avançado_consegi2010Fabrízio Mello
 
Oficina postgresql basico_consegi2010
Oficina postgresql basico_consegi2010Oficina postgresql basico_consegi2010
Oficina postgresql basico_consegi2010Fabrízio Mello
 
Database refactoring postgresql_consegi2010
Database refactoring postgresql_consegi2010Database refactoring postgresql_consegi2010
Database refactoring postgresql_consegi2010Fabrízio Mello
 
Database Refactoring PostgreSQL Urcamp Alegrete 2009
Database Refactoring PostgreSQL Urcamp Alegrete 2009Database Refactoring PostgreSQL Urcamp Alegrete 2009
Database Refactoring PostgreSQL Urcamp Alegrete 2009
Fabrízio Mello
 
Database Refactoring com PostgreSQL PGDay RS 2009
Database Refactoring com PostgreSQL PGDay RS 2009Database Refactoring com PostgreSQL PGDay RS 2009
Database Refactoring com PostgreSQL PGDay RS 2009
Fabrízio Mello
 
Refatoração Banco de Dados (Agileweekend2009)
Refatoração Banco de Dados (Agileweekend2009)Refatoração Banco de Dados (Agileweekend2009)
Refatoração Banco de Dados (Agileweekend2009)
Fabrízio Mello
 

More from Fabrízio Mello (13)

PHP e PostgreSQL: Um é pouco, dois é bom, três é demais
PHP e PostgreSQL: Um é pouco, dois é bom, três é demaisPHP e PostgreSQL: Um é pouco, dois é bom, três é demais
PHP e PostgreSQL: Um é pouco, dois é bom, três é demais
 
Bad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de DadosBad Smells (mal cheiros) em Bancos de Dados
Bad Smells (mal cheiros) em Bancos de Dados
 
URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...
URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...
URCAMP (Jun2017) - Como o papel e atividades de DBA ficam no contexto da cult...
 
DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...
DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...
DBA Brasil 2.0: Como o papel e atividades de DBA ficam no contexto da cultura...
 
Software Delivery Like a Boss
Software Delivery Like a BossSoftware Delivery Like a Boss
Software Delivery Like a Boss
 
NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)
NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)
NoSQL + SQL = PostgreSQL (PGDay Campinas 2014)
 
Oficina PostgreSQL Básico Latinoware 2012
Oficina PostgreSQL Básico Latinoware 2012Oficina PostgreSQL Básico Latinoware 2012
Oficina PostgreSQL Básico Latinoware 2012
 
Oficina postgresql avançado_consegi2010
Oficina postgresql avançado_consegi2010Oficina postgresql avançado_consegi2010
Oficina postgresql avançado_consegi2010
 
Oficina postgresql basico_consegi2010
Oficina postgresql basico_consegi2010Oficina postgresql basico_consegi2010
Oficina postgresql basico_consegi2010
 
Database refactoring postgresql_consegi2010
Database refactoring postgresql_consegi2010Database refactoring postgresql_consegi2010
Database refactoring postgresql_consegi2010
 
Database Refactoring PostgreSQL Urcamp Alegrete 2009
Database Refactoring PostgreSQL Urcamp Alegrete 2009Database Refactoring PostgreSQL Urcamp Alegrete 2009
Database Refactoring PostgreSQL Urcamp Alegrete 2009
 
Database Refactoring com PostgreSQL PGDay RS 2009
Database Refactoring com PostgreSQL PGDay RS 2009Database Refactoring com PostgreSQL PGDay RS 2009
Database Refactoring com PostgreSQL PGDay RS 2009
 
Refatoração Banco de Dados (Agileweekend2009)
Refatoração Banco de Dados (Agileweekend2009)Refatoração Banco de Dados (Agileweekend2009)
Refatoração Banco de Dados (Agileweekend2009)
 

Recently uploaded

GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

GSoC2014 - PGDay Ijui/RS Presentation October, 2016

  • 4. Fabrízio de Royes Mello ● Bachelor in Information Systems in 2/2002 (URCAMP) ● Entrepeneur at http://timbira.com ● Agile Methodologies Specialization student 2014/2015 ● PostgreSQL colaborator since 2008 (Brazilian community and now the international too)
  • 5.
  • 6. … and nowadays ● PostgreSQL contributor (more than 35 patches as developer and/or reviewer) ● Brazilian Community ○ http://postgresql.org.br ○ http://listas.postgresql.org.br ● PostgreSQL Consultant at Timbira ○ http://timbira.com.br
  • 7. About Timbira The brazilian PostgreSQL Company
  • 8. The brazilian PostgreSQL company ● Consulting ● Support ● Training ● Development (PostgreSQL related) http://www.timbira.com.br
  • 9. Special gifts to participants 1. 2 (two) hours of “Free Health Check or Mentoring” with a Timbira PostgreSQL Consultant 2. 3 (three) training vouchers (100%) a. Fundamentals b. Backup and Restore c. Tuning
  • 10. Just to stay all of us tuned!!! Everybody knows what a database is?
  • 11. Is this a database?
  • 13. But what wikipedia tell us? A database is an integrated and organized collection of logically related records or files or data that are stored in a computer system which consolidates records previously stored in a separate files into a common pool of data records that provides data for many applications. Source: http://en.wikipedia.org/wiki/Database
  • 15. Ok, more simple and in pt-br !! “Bancos de dados ou bases de dados são coleções organizadas de dados que se relacionam de forma a criar algum sentido (Informação) e dar mais eficiência durante uma pesquisa ou estudo.” (Wikipedia) Source: http://pt.wikipedia.org/wiki/Banco_de_dados
  • 16. Database is a concept Relational Database Management Systems is the implementation of this concept
  • 18. About PostgreSQL The world’s most advanced open source database
  • 19. PostgreSQL (http://postgresql.org) ● The world’s most advanced open source database ● Run in all major operating systems: Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows ● Fully ACID compliant (Atomicity, Consistency, Isolation and Durability) ● Full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages) ● Native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others.
  • 20. PostgreSQL (http://postgresql.org) ● Before : born from INGRES ● 1986 : Project start (Berkley) ● 1987 : First Postgres version Postgres ● 1991 : (v 3) with the most of the actual features ● 1993 : (v 4.2) last released by Berkley ● 1994 : Andrew Yu and Jolly Chen release Postgre95 with support to SQL language ● 1997 : (v 6) Name changes to PostgreSQL ● 2000 : (v 7) Support to Foreign Keys
  • 21. PostgreSQL (http://postgresql.org) ● 2005 : (v 8) Native port to Windows, Tablespaces, Savepoints, Point-In-Time-Recovery ● 2005 : (v 8.1) Two-phase Commit, Roles ● 2006 : (v 8.2) [Insert, Update, Delete] Returning, improve performance OLTP and BI ● 2008 : (v 8.3) Debug PL/PgSQL, Tsearch2 (XML) incorporated to the core, performance improvements ● 2009 : (v 8.4) Windowing Functions, Common Table Expressions and Recursive Queries, Parallel Restore, “pg_upgrade”
  • 22. PostgreSQL (http://postgresql.org) ● 2010 : (v 9.0) Hot Standby and Streaming Replication ● 2011 : (v 9.1) Synchronous Replicacion, FDW (SQL/MED), CREATE EXTENSION, Unlogged Tables ● 2012 : (v 9.2) Index-only Scans, Cascading Replication, JSON, Range Types ● 2013 : (v 9.3) Materialized Views, Lateral Join, writable FDW, Event Triggers, Background Workers ● 2014 : (v 9.4) JSONB, Logical Decoding, Dynamic Background Workers
  • 23. PostgreSQL (http://postgresql.org) ● 2015 : (v 9.5) INSERT … ON CONFLICT UPDATE (upsert), IMPORT FOREIGN SCHEMA, ALTER TABLE .. SET LOGGED, Parallel Infrastructure ● 2016 : (v 9.6) Parallel Sequencial Scan, Join and Aggregates
  • 24. About FOOS and Google
  • 25. FOSS (free and open source software) and me ● My first contact was using Linux in 1997 ● I fell in love with this culture since then ● In 1999 I met PostgreSQL so since then I knew this would be part of my life ● Because of this decision I had a lot of troubles, including financial… ● But here I am :-)
  • 26. Is a global program that offers students stipends to write code for open source projects. We have worked with the open source community to identify and fund exciting projects for the upcoming summer.
  • 27. Connect students to open source communities
  • 28. GSoC and PostgreSQL ● Since 2006 ● Cool projects ○ Fast GiST index build ○ New phpPgAdmin Plugin Architecture (brazilian) ○ pgAdmin database designer ○ Better indexing for ranges ○ Document collection Foreign-data Wrapper
  • 30. At September 2011 PostgreSQL 9.1 introduced a new kind of table Unlogged Tables
  • 31. What means “Unlogged”? First we need to know what means “WAL” PostgreSQL is Full-ACID and to guarantee data integrity uses a standard method called WAL (Write-Ahead Logging)
  • 32. WAL (Write-Ahead Logging) “In computer science, write-ahead logging (WAL) is a family of techniques for providing atomicity and durability (two of the ACID properties) in database systems. In a system using WAL, all modifications are written to a log before they are applied. Usually both redo and undo information is stored in the log.” http://en.wikipedia.org/wiki/Write-ahead_logging
  • 33. WAL (Write-Ahead Logging) ARIES (Algorithms for Recovery and Isolation Exploit Semantics) https://en.wikipedia.org/wiki/Algorithms_for_Re covery_and_Isolation_Exploiting_Semantics http://www.vldb.org/conf/1999/P1.pdf
  • 35. Ok, and what means “Unlogged” ? ● Unlogged means that the data written in these tables is not written to WAL. ● So it makes written really, really fast compared to written into regular tables.
  • 37. So I’ll use it to ALL of my tables... ● However you won’t want to do that, because ● They are neither crash-safe (an unlogged table is automatically truncated after a crash or unclean shutdown) ● And they are nor replicated using SR
  • 38. But there are some cool use cases ● Speed ETL jobs ● Cache ● Session State ● Queues?! ● ...
  • 39. And now we have the power to ... ● change from UNLOGGED to LOGGED ○ ALTER TABLE name SET LOGGED; ● change from LOGGED to UNLOGGED ○ ALTER TABLE name SET UNLOGGED;
  • 40. Git commit message commit: f41872d0c1239d36ab03393c39ec0b70e9ee2a3c author: Alvaro Herrera <alvherre@alvh.no-ip.org> date: Fri, 22 Aug 2014 14:27:00 -0400 Implement ALTER TABLE .. SET LOGGED / UNLOGGED This enables changing permanent (logged) tables to unlogged and vice-versa. (Docs for ALTER TABLE / SET TABLESPACE got shuffled in an order that hopefully makes more sense than the original.) Author: Fabrízio de Royes Mello Reviewed by: Christoph Berg, Andres Freund, Thom Brown Some tweaking by Álvaro Herrera
  • 41. How it works 1. Acquire AcessExclusiveLock 2. Check dependencies a. Cannot change temp tables b. Check Foreign Keys 3. Create new heap/toast with new relpersistence (pass down relpersistence to reindex_index) 4. Rewrite heap/toast 5. Rewrite indexes
  • 44. Future work ● Don’t rewrite datafiles when wal_level = minimal ● Unlogged Indexes on Regular Tables ● Unlogged Materialized Views (was reverted by Tom Lane because of the bad design)
  • 46. Special thanks to ● Stephen Frost (mentor) ● Josh Berkus and Thom Brown (organizers) ● Christoph Berg (patch review) ● Álvaro Herrera (patch review and commit) ● Maristela Kohlrausch de Andrade (my english teacher)