Registration is open now for the PyPgDay. Register early and register often!
We are also still looking for speakers and sponsors.
In addition to giving you access to a solid day of PostgreSQL, PostGIS and Python development content, your registration fee gets you a cool tshirt custom-designed for the PyPgDay and priority access to the afterparty. Early registration rates are in effect through February 28. We will have a full schedule for the PyPgDay up sometime in mid-February.
Yes, we are requiring a paid registration for this event. One reason for that is that PyPgDay is not free for SFPUG: we need to pay for room rental, catering, A/V, insurance, staffing and other expenses. More importantly, we've found that free registrations are not reliable, and we expect that the event may sell out. Event volunteers and speakers, of course, may attend the PyPgDay for free.
Net proceeds from the event will be split between PostgreSQL.US (a 501(c)3 nonprofit supporting the PostgreSQL community) and the SFPUG Meetings Fund.
Also, before anyone asks: No, PyCon is not underwriting the cost of the PyPgDay. Frankly, we didn't even ask them to: they are non-profit, same as us, and they have their own project to support.
Friday, January 11, 2013
Thursday, January 10, 2013
SFPUG Live: PostgreSQL and Distributed Services
For next Tuesday's San Francisco PostgreSQL User Group, we will have CitusDB talking about distributed services. As usual, this will be live broadcast on streaming video. Broadcast should start around 7:15 PM Pacific.
CitusDB is a distributed analytic database built on top of PostgreSQL that
enables queries to run in real-time against very large datasets. A quick
high-level overview of the key features is available on the CitusDB site.
Join CitusDB staff in discussing their experiences writing a foreign
data wrapper for MongoDB, as well as some of the broader issues that come
into play when writing FDWs that interact with distributed services.
More information about the event, and RSVPs on the SFPUG Meetup Page.
CitusDB is a distributed analytic database built on top of PostgreSQL that
enables queries to run in real-time against very large datasets. A quick
high-level overview of the key features is available on the CitusDB site.
Join CitusDB staff in discussing their experiences writing a foreign
data wrapper for MongoDB, as well as some of the broader issues that come
into play when writing FDWs that interact with distributed services.
More information about the event, and RSVPs on the SFPUG Meetup Page.
PyPgDay: Call For Sponsors
Does your company do Python and PostgreSQL or PostGIS? Do you want to make a good impression on the PostgreSQL community? Were you planning on attending PyCon anyway?
If so, you may want to sponsor our first-every PyPgDay on March 13th. Sponsorships are due by February 28th. We expect 90 to 140 attendees at this event, so it's decent publicity for a low, low price. Net proceeds go to benefit the PostgreSQL community via PostgreSQL.US and the SFPUG Meetings Fund.
More information on the PyPgDay Wiki Page.
Of course, we want you to speak too! Talk proposals are due by January 20th.
If so, you may want to sponsor our first-every PyPgDay on March 13th. Sponsorships are due by February 28th. We expect 90 to 140 attendees at this event, so it's decent publicity for a low, low price. Net proceeds go to benefit the PostgreSQL community via PostgreSQL.US and the SFPUG Meetings Fund.
More information on the PyPgDay Wiki Page.
Of course, we want you to speak too! Talk proposals are due by January 20th.
Saturday, January 5, 2013
Cascading Replication and Cycles
Cascading replication is a 9.2 feature which allows you to replicate through a chain of replicas. The master replicates to replica1, which replicates to replica2, which replicates to replica3, etc. This has some tremendous advantages for large high-availability setups, including rapid failover, limiting replication streams over WAN, and knowing determinatively which replica is furthest ahead.
In PostgreSQL 9.2, cascading replication really requires file-based WAL archiving to work. As of a recent commit, PostgreSQL 9.3 will not require that: you can do cascading replication chains of whatever length you want without any WAL archiving. Score one for vastly enhanced usability! Thanks, Heikki.
Also, score one for arming additional foot-guns (see below).
First, the good news. Setting up a chain of replicas has now become fairly simple even for non-DBAs. Here's the basic steps:
Given this simplicity, I was able to set up an eight-server chain of replicas on the GoGrid Cloud in about an hour, half of which was waiting for GoGrid's rubber-stamping feature to copy the master once I had it configured (I really like this feature on GoGrid, for testing). In a low-traffic environment lag from master to replica7 was between 0.1 and 1.7 seconds, median 0.5 seconds. Not bad!
Thom Brown one-upped me by setting up a chain of 120 replicas. Surprisingly, this worked fine, except that replication lag to the end of the chain was several minutes.
Of course, where there are powerful new features, there are powerful foot-guns. This foot-gun is known as "cycles".
Here's how it goes: you have a replication chain where m1 replicates to r1 (synchronously) and r2 (async). r2 replicates to r3, which replicates to r4, r5 and r6. This is complex, but not unreasonable in an HA multi-datacenter setup.
Then, m1 fails. You promote r1 to be the new master, and reconfigure r2 to replicate from it. However, due to out-of-date network documentation, you accidentally connect r2 to r6 instead of r1, which 9.3 cascading replication will happily let you do without a complaint. Now you have a single independant master, and five replicas which are working perfectly well except that they are receiving no new data at all because you have a cycle. Ooops!
Troubleshooting this situation, once it happens, will be annoying: you basically have to check pg_is_in_recovery() and pg_stat_replication on each server, looking for a master which has replicas. If you don't find one, a cycle is your problem; otherwise your problem is something else.
However, it's not clear how PostgreSQL would detect a cycle; currently a replica only knows about its master and its own replicas, and nothing about masters or replicas more than one step away. We'd probably need to modify streaming replication to support a detection mechanism.
It's also not clear what we should do if a cycle is detected. Preventing a cycle entirely seems wrong, since one can imagine circumstances where a temporary cycle is a legitimate part of a transition between two different replication setups. Issuing a warning doesn't seem sufficient, though, given that many replication chains are managed by devops software which ignores warnings. Although writing a warning every 5 minutes to the logs on all replicas would at least help with troubleshooting.
Anyway, there's no plans to address cycles as an issue for 9.3, except maybe some documentation. Please comment below if you have thoughts or ideas on this particular foot-gun.
In PostgreSQL 9.2, cascading replication really requires file-based WAL archiving to work. As of a recent commit, PostgreSQL 9.3 will not require that: you can do cascading replication chains of whatever length you want without any WAL archiving. Score one for vastly enhanced usability! Thanks, Heikki.
Also, score one for arming additional foot-guns (see below).
First, the good news. Setting up a chain of replicas has now become fairly simple even for non-DBAs. Here's the basic steps:
- Edit pg_hba.conf to enable replication connections.
- Edit postgresql.conf to turn on the various replication options.
- Restart the master.
- Set up passwordless access to the master from the first replica.
- Use pg_basebackup to snapshot the master from the replica.
- Create a recovery.conf pointing at the master.
- Start the replica.
- Run pg_basebackup on the second replica.
- Edit recovery.conf to point at the first replica.
- Start the second replica.
- Repeat steps 8-10 for as many replicas you want to chain.
Given this simplicity, I was able to set up an eight-server chain of replicas on the GoGrid Cloud in about an hour, half of which was waiting for GoGrid's rubber-stamping feature to copy the master once I had it configured (I really like this feature on GoGrid, for testing). In a low-traffic environment lag from master to replica7 was between 0.1 and 1.7 seconds, median 0.5 seconds. Not bad!
Thom Brown one-upped me by setting up a chain of 120 replicas. Surprisingly, this worked fine, except that replication lag to the end of the chain was several minutes.
Of course, where there are powerful new features, there are powerful foot-guns. This foot-gun is known as "cycles".
Here's how it goes: you have a replication chain where m1 replicates to r1 (synchronously) and r2 (async). r2 replicates to r3, which replicates to r4, r5 and r6. This is complex, but not unreasonable in an HA multi-datacenter setup.
Then, m1 fails. You promote r1 to be the new master, and reconfigure r2 to replicate from it. However, due to out-of-date network documentation, you accidentally connect r2 to r6 instead of r1, which 9.3 cascading replication will happily let you do without a complaint. Now you have a single independant master, and five replicas which are working perfectly well except that they are receiving no new data at all because you have a cycle. Ooops!
Troubleshooting this situation, once it happens, will be annoying: you basically have to check pg_is_in_recovery() and pg_stat_replication on each server, looking for a master which has replicas. If you don't find one, a cycle is your problem; otherwise your problem is something else.
However, it's not clear how PostgreSQL would detect a cycle; currently a replica only knows about its master and its own replicas, and nothing about masters or replicas more than one step away. We'd probably need to modify streaming replication to support a detection mechanism.
It's also not clear what we should do if a cycle is detected. Preventing a cycle entirely seems wrong, since one can imagine circumstances where a temporary cycle is a legitimate part of a transition between two different replication setups. Issuing a warning doesn't seem sufficient, though, given that many replication chains are managed by devops software which ignores warnings. Although writing a warning every 5 minutes to the logs on all replicas would at least help with troubleshooting.
Anyway, there's no plans to address cycles as an issue for 9.3, except maybe some documentation. Please comment below if you have thoughts or ideas on this particular foot-gun.
Tuesday, December 18, 2012
PyPgDay Call For Presentations
We are now ready to accept your submissions to present at PyPgDay. Please submit as soon as possible; the deadline is January 20.
We are particularly looking for speakers who can present on using PostgreSQL and Python together, including Django, GeoDjango, Pylons, psycopg2, SQLAlchemy, PL/Python, NumPy, and the new PostgreSQL JSON features. General talks about PostgreSQL administration and performance, pitched for a developer audience, are also welcome. How-to talks, case studies, personal experiences, and new software introductions are welcome. We will also have lightning talks.
Submit now!
We are particularly looking for speakers who can present on using PostgreSQL and Python together, including Django, GeoDjango, Pylons, psycopg2, SQLAlchemy, PL/Python, NumPy, and the new PostgreSQL JSON features. General talks about PostgreSQL administration and performance, pitched for a developer audience, are also welcome. How-to talks, case studies, personal experiences, and new software introductions are welcome. We will also have lightning talks.
Submit now!
Labels:
conferences,
pgday,
postgresql,
pycon,
pypgday,
python
Saturday, December 15, 2012
Reminder: pgCon Call For Papers
The pgCon Call For Papers has been open since December 1st. This is part of an effort by the conference committee to get all the speakers notified on time this year, so please submit your proposals before January 15th. See you at pgCon!
Friday, December 7, 2012
Save The Date: PyPgDay
PostgreSQL has become the "default database" of Python users everywhere. And Python has become the most popular scripting language for Postgres. So, to celebrate that, we're throwing a miniconference at PyCon 2013.
PyPgDay will be a full-day PostgreSQL event at PyCon this year, on March 13th (all day), at the Santa Clara Convention Center. Watch the PyPgDay wiki page and this blog for updates on the event, as we get it organized.
In other event news, the Call For Papers for pgCon is now open. Please submit your PostgreSQL hacking, development, performance, and advanced technique proposals.
PyPgDay will be a full-day PostgreSQL event at PyCon this year, on March 13th (all day), at the Santa Clara Convention Center. Watch the PyPgDay wiki page and this blog for updates on the event, as we get it organized.
In other event news, the Call For Papers for pgCon is now open. Please submit your PostgreSQL hacking, development, performance, and advanced technique proposals.
Subscribe to:
Posts (Atom)