PostgreSQL Development Today: 9.0

47
PostgreSQL Development TODAY Josh Berkus PostgreSQL Experts Inc. LCA2010

description

 

Transcript of PostgreSQL Development Today: 9.0

Page 1: PostgreSQL Development Today: 9.0

PostgreSQLDevelopmentTODAY

Josh BerkusPostgreSQL Experts Inc.

LCA2010

Page 2: PostgreSQL Development Today: 9.0

BREAKING NEWS: January 15, 2010 ... PostgreSQL 9.0 Enters Final Commitfest ...

“many landmark features planned”, says developer ...

Page 3: PostgreSQL Development Today: 9.0

... wait, 9.0?!?

Page 4: PostgreSQL Development Today: 9.0

... landmark features ...

Hot standby ... synchronous replication ... exclusion constraints ... JSON/XML EXPLAIN output ... Windows 64-bit ... writeable CTEs* ...

permissions enhancements ...GRANT ON ALL/DEFAULT ... SQL enhancements ... Ordered

aggregates ... DO () statement ... performance improvements ... PL/Perl enhancements ...

PL/Python enhancements ... new LISTEN/NOTIFY*

* = not committed yet

Page 5: PostgreSQL Development Today: 9.0

... landmark features ...

Hot standby ... synchronous replication ... exclusion constraints ... JSON/XML EXPLAIN output ... Windows 64-bit ... writeable CTEs* ...

permissions enhancements ...GRANT ON ALL/DEFAULT ... SQL enhancements ... Ordered

aggregates ... DO () statement ... performance improvements ... PL/Perl enhancements ...

PL/Python enhancements ... new LISTEN/NOTIFY*

* = not committed yet

Page 6: PostgreSQL Development Today: 9.0

Postgres 9Postgres 9

Page 7: PostgreSQL Development Today: 9.0

... wait, commitfest?!?

Page 8: PostgreSQL Development Today: 9.0

scarce committer timescarce committer time

Page 9: PostgreSQL Development Today: 9.0
Page 10: PostgreSQL Development Today: 9.0

new review

1. review patches faster2. review patches sooner3. review every patch4. train new reviewers

Page 11: PostgreSQL Development Today: 9.0

8.5 (9.0) RC and Branch

Cleanup

Beta

9.1 RC and Branch

Development Period

Integration & Review(2-4 weeks)

Beta Testing(2-3 months)

July 1 2009

July 15 2009

February 15 2010

June-July, 2010

CommitFest 1

Development Period

September 15 2009CommitFest 2

Development Period

November 15 2009CommitFest 3

Development Period

January 15 2010CommitFest 4

August 15 2009

October 15 2009

December 15 2009

Page 12: PostgreSQL Development Today: 9.0

… … back to hot standbyback to hot standby

Page 13: PostgreSQL Development Today: 9.0

8.0: Point-In-Time Recovery (PITR)

Page 14: PostgreSQL Development Today: 9.0

8.0: Point-In-Time Recovery (PITR)

Page 15: PostgreSQL Development Today: 9.0

8.0: Point-In-Time Recovery (PITR)

Page 16: PostgreSQL Development Today: 9.0

8.0: Point-In-Time Recovery (PITR)

10 minutes to hours

Page 17: PostgreSQL Development Today: 9.0

8.3: Warm Standby

Page 18: PostgreSQL Development Today: 9.0

8.3: Warm Standby

Page 19: PostgreSQL Development Today: 9.0

8.3: Warm Standby

seconds to minutes

Page 20: PostgreSQL Development Today: 9.0

8.3: Warm Standby

Page 21: PostgreSQL Development Today: 9.0

Alvaro Herrera

Page 22: PostgreSQL Development Today: 9.0

8.3 Ghost XID

write

read

3452119

3452120

3452119/101

Page 23: PostgreSQL Development Today: 9.0

9.0: Hot Standby

Page 24: PostgreSQL Development Today: 9.0

Problemswith Hot Standby

Page 25: PostgreSQL Development Today: 9.0

Problemswith Hot Standby

x

Page 26: PostgreSQL Development Today: 9.0

max_standby_delay

Page 27: PostgreSQL Development Today: 9.0

max_standby_delay

Page 28: PostgreSQL Development Today: 9.0
Page 29: PostgreSQL Development Today: 9.0

different problems

1. Zero data loss2. Seconds of downtime (or less)3. Single-node performance4. Scalability: not important

Page 30: PostgreSQL Development Today: 9.0

Fujii Masao

Itagaki Takahiro

Page 31: PostgreSQL Development Today: 9.0

pgCon 2008:Synchronous Log-Shipping

Replication

Page 32: PostgreSQL Development Today: 9.0

after 18 months:“streaming replication”

Page 33: PostgreSQL Development Today: 9.0

after 18 months:“streaming replication”

walreciever

Page 34: PostgreSQL Development Today: 9.0

after 18 months:“streaming replication”

walreciever

walsender

Page 35: PostgreSQL Development Today: 9.0

Robert Haas

Greg Sabino-Mullaine

Page 36: PostgreSQL Development Today: 9.0

?

Page 37: PostgreSQL Development Today: 9.0

PostgreSQL Needs YOU

Page 38: PostgreSQL Development Today: 9.0

Many Patches == Lots of Testing

● Bug Testing– can you make 9.0 crash?

● Specifi cation Testing– do the features do what the docs say they do?

● Performance Testing– is 9.0 really faster? How much?

● Combinational Testing– what happens when you put several new features

together?

Page 39: PostgreSQL Development Today: 9.0

Many Patches == Lots of Testing

1. Take a copy of your production applications

2. Port them to 9.0

3. Report breakage and issues

4. Play with implementing new features

Do It Now!We're counting on you!

Page 40: PostgreSQL Development Today: 9.0

Why contribute?

● PostgreSQL is a community project

– owned by the community, run by the community

– if you contribute, you are a full participant● Tinker with cool database stuff

– we are hard-core database geeks

– learn a lot from top database hackers● Improve your employment prospects

– database engineers are always in demand

Page 41: PostgreSQL Development Today: 9.0

Mailing Lists

● Hackers list– pgsql-hackers– main list for development discussion– submit patches here until we move off CVS

● Testers list– pgsql-testers– submit test reports here

● Specifi c feature lists– pgsql-jdbc, pgsql-performance, pgsql-sql, etc.– subscribe at www.postgresql.org/community/lists

Page 42: PostgreSQL Development Today: 9.0

Web Sites

● www.postgresql.org– main site

● git.pgfoundry.org– branches, feature forks, snapshots

● wiki.postgresql.org– community wiki, including TODO lists– feature specs & testing info

● archives.postgresql.org– mailing list archives -- search for your idea here

Page 43: PostgreSQL Development Today: 9.0

Documentation

● www.postgresql.org/docs– main documentation– internals:/docs/current/static/internals.html– code conventions: /docs/current/static/source.html

● doxygen.postgresql.org– annotated source code

● www.postgresql.org/docs/faqs.FAQ_DEV.html– developer FAQ

Page 44: PostgreSQL Development Today: 9.0

Tips on submitting code

● Don't get discouraged.– Be prepared to argue.– One hacker rejecting your idea doesn't mean everyone

does.– Committers (esp. Tom Lane) are often more concerned

about maintainability than cool stuff.● Be fl exible: you will have to make changes.

– Corporate and academic coding standards are generally lower than the project's.

Page 45: PostgreSQL Development Today: 9.0

Other tips on submitting

● Don't use the wrong arguments– “MySQL/Oracle does it this way.”– “Based on this hot academic trend.”

● Some things make a patch harder to accept– New syntax– Backwards compatibility issues– High code counts

● Don't get discouraged.

Page 46: PostgreSQL Development Today: 9.0

Also: switching to git

● 9.0 was developed with both CVS and git● Probably just git in the future

Page 47: PostgreSQL Development Today: 9.0

Contact Information● Josh Berkus

[email protected]– blogs.ittoolbox.com/

database/soup– www.pgexperts.com

● User Groups– pugs.postgresql.org

– Wellington– Sydney– Adelaide– Canberra

● Upcoming Events:– PG East: March,

Philadelphia– pgCon: May 19,

Ottawa Canada CfP Open!

– OSCON: July, Portland ORCfP Open!

This talk is copyright 2010 Josh Berkus, and is licensed under the creative commons attribution license