Quick start on Hot Standby

Updated.

We could have some better end-user documentation around creating a warm or hot standby system for basic postgresql replication.

To this end, I created a Quick Start doc on the wiki, but it could use more help. Maybe we should create some setup recipes for common situations?

Also – I wrote the following script during a hot standby bugbash PDXPUG had today:


#!/bin/sh

BINPATH=/usr/local/pg90/bin
CP=/bin/cp
PGCTL=${BINPATH}/pg_ctl
PSQL=${BINPATH}/psql
INITDB=${BINPATH}/initdb

sudo mkdir -p /var/tmp/archive
sudo chown ${USER} /var/tmp/archive

${INITDB} hotstandby1

echo 'wal_level = hot_standby' >> hotstandby1/postgresql.conf
echo 'archive_mode = on' >> hotstandby1/postgresql.conf
echo "archive_command = 'cp %p /var/tmp/archive/%f'" >> hotstandby1/postgresql.conf
echo "archive_timeout = 60" >> hotstandby1/postgresql.conf
echo "port = 6543" >> hotstandby1/postgresql.conf

${PGCTL} -D hotstandby1 start -l hotstandby1.log
sleep 5

${PSQL} -p 6543 postgres -c "select pg_start_backup('backup')"
${CP} -pR hotstandby1/ hotstandby2
${PSQL} -p 6543 postgres -c "select pg_stop_backup()"
rm hotstandby2/postmaster.pid
rm hotstandby2/pg_xlog/*

echo 'hot_standby = on' >> hotstandby2/postgresql.conf
echo 'port = 6544' >> hotstandby2/postgresql.conf
echo "standby_mode = 'on'" >> hotstandby2/recovery.conf
echo "restore_command = 'cp -i /var/tmp/archive/%f %p'" >> hotstandby2/recovery.conf

${PGCTL} -D hotstandby2 start -l hotstandby2.log

* Added port specification in case you’ve already got postgres running. Added a BINPATH for custom install directories.

Twitter and PostgreSQL!

Twitter: What are you doing?
Uploaded with plasq‘s Skitch!

On pgsql-general, Doug Hunley mentioned he’d created a twitter account for pgsql-announce! Way cool.

I’d written during last PgCon about Postgres and Twitter, and I figured it was time for a new list of Postgres-related people who I follow! Especially since a few people commented that Twitter was a waste of time last year 😉

If you’re on twitter (or identi.ca), and I missed you — please comment below!

Here we go (in no particular order):

  • Selena Deckelmann (me!)
  • Gabrielle Roth, member of PDXPUG, main force behind Code-N-Splode
  • Mark Wong, performance expert, leading the Portland PostgreSQL Performance Pad and associated projects to bring regular performance testing back to PostgreSQL
  • Francisco Figueiredo Jr., developer maintainer of Npgsql, speaker, member of PostgreSQL.Br
  • Magnus Hagander President of Pg.EU – the European Union non-profit organization dedicated to PostgreSQL and supporting user groups in the region
  • Josh Berkus, pgsql-advocacy leader, Member of the PostgreSQL core team
  • Jean-Paul Argudo, leader/member of PostgreSQL.Fr and Treasurer of Pg.EU
  • Hubert Lubaczewski , author of a great technical blog about PostgreSQL http://www.depesz.com/
  • Nikolay Samokhvalov, leader of the Moscow PostgreSQL Users Group, and consultant in Russia
  • Kristin Tufte, Postgres user, member of PDXPUG and assistant professor at Portland State University
  • Satoshi Nagayasu, member of the Japanese PostgreSQL Users Group, and spearheading meetups in Tokoyo
  • Brenda Wallace, moble gadget fetishist, Drupalista and Wellington, NZ PostgreSQL User Group wrangler
  • Isis Borges, Postgres enthusiast, works in the fashion industry in Puerto Alegre, Brazil
  • Dan Langille, DBA and organizer behind PgCon
  • Michael Brewer, DBA and board member of the United States PostgreSQL Association
  • Joshua Drake, business owner, board member of the United States PostgreSQL Association
  • Fábio Telles Rodriguez, active member of the PostgreSQL.Br (Brazil) and PgDay Brazil organizer. If you speak Portuguese, you can check out Planet Postgres Br here – http://planeta.postgresql.org.br/
  • Fernando Ike, member of PostgreSQL.Br
  • Ed Borasky, PhD, analytics nerd, PDXPUG member
  • Robert Treat, author of PHP and PostgreSQL book, speaker, on the board of the United States PostgreSQL Association
  • David Wheeler, contributed citext most recently to PostgreSQL, consultant, maintainer of Bricolage, formerly of I Want Sandy
  • Greg Sabino Mullane, author of Bucardo and check_postgres.pl, maintainer of DBD::Pg, recently contributed patches to psql, on the board of the United States PostgreSQL Association, my boss 🙂
  • Christophe, volunteer at OSCON for PostgreSQL booth, DBA
  • Aaron Thul, DBA, developer, speaker on PostgreSQL on Drugs 🙂
  • David Fetter, DBA, maintainer of the PostgreSQL Weekly News
  • Elein Mustain, DBA, speaker, maintainer of http://varlena.com
  • Chris May, DBA, member of PDXPUG
  • Jason Kirtland, developer, maintainer of SQLAlchemy, Pythonista
  • Josh Tolley, developer, DBA, statistics nerd, author of PL/LOLCODE and pgsnmpd
  • Erik Jones, Portland resident, Pythonista, made a cool python-based partitioning tool (pgpartitioner)
  • Nicholas Kreidberg, Nevada resident, PostgreSQL user
  • Gavin Roy, DBA, Business dude, Myyearbook.com, speaker, on the board of of United States PostgreSQL Association
  • Chris Browne, Slony maintainer
  • Douglas Hunley, creator of pgsql_announce on twitter 🙂
  • Larry Rosenman, PostgreSQL supporter, help with DNS for PostgreSQL.org, contributor (some of the syslog* stuff in version 7.0)

Organizations:

A year of PDXPUG

Last year was the third year that PDXPUG has been operating in Portland, and I decided to look back at our year of meetings. Here goes:

January 11 – 10 things you can use in PostgreSQL 8.3
February 26 – Extreme Database Makeover: RT
March 20 – Managing Internet Services: Using the right tool for the job
April 17 – Rails on PostgreSQL
May 15 – PostgreSQL for Pythoneers
June 19 – The relational model
July 20 – PDXPUG DAY!, and the schedule
August 21 – Tsearch2 and Materialized Views (Guest speaker from Seattle!!)
September 18 – The Visual Planner
October 16 – Point In Time Recovery
November 20 – Reviewed 8.4 features with the help of depesz’s blog
December – Coder’s Social

Thanks everyone who gave talks and attended meetings! User groups are only as good as the people who participate in them, and this list shows just how talented, diverse and fun the Postgres community is in Portland. I love you guys!

Looking forward – once again, we’ve already scheduled talks through the next four months! I feel like the group is running on its own momentum, and that is a fabulous feeling. We have a data visualization talk, another Extreme Database Makeover, and hopefully a presentation about teaching database theory with PostgreSQL.

Our next meeting is on January 15, 7pm with Stephen Jazdzewski traveling all the way from Eugene to present SplendidCRM, a formerly Microsoft SQL-only system that is now compatible with PostgreSQL. I am happy to see more of our Microsoft colleagues joining and presenting to the user group communities, as I’ve always felt they are underrepresented in our groups. Also, I’m happy to host another out-of-town presenter here in Portland! Hope to see you on the 15th.

PDXPUG Day on July 20 – Register now!

pgday 2007

photo courtesy of Dan Browning

Registration for PDXPUG Day on July 20, 2008 is open! Please sign up and let us know what size t-shirt you’d like. We’re requesting a $20 donation (by cash or check) at the door. All proceeds to to Software in the Public Interest, a 501(c)3 organization that is used to fund PostgreSQL advocacy.

Registration for OSCON is not required to attend.

Registering also gets you in the door at the Gotham Tavern, our after-party location close to the convention center!

Our line-up of talks includes:

PostgreSQL Unit Testing with pgTAP – David Wheeler
Inside the PostgreSQL Shared Buffer Cache – Greg Smith
Muldis D – Portable Databases At Full Power – Darren Duncan
A Streaming Database Talk – Rafael J. Fernández-Moctezuma
Using GLORP to connect Squeak Smalltalk to PostgreSQL – RandalSchwartz
Fighting Disease with PostgreSQL Full Text Search and JRuby on Rails – Mike Herrick
All Your GIS Are Belong to You – Abe Gillespie
What’s PgUS – Joshua Drake

Sign up today!

Call for proposals for PDXPUG PgDay, due June 20, 2008

pgday 2007
(Photo from PgDay 2007)

Please submit a talk! The call will be open for 2 weeks and proposals are due June 20th. Follow the link for details on submitting.

http://pugs.postgresql.org/node/400

PDXPUG PgDay will be on July 20, 2008. This is a one-day conference happening the day before OSCON at the Oregon Convention Center.

We are inviting anyone who has something interesting to share about PostgreSQL to send us a proposal!

We’d like to have at least one 1.5 hour tutorial and up to five 45-minute talks.

We welcome talks in any of the following areas:

* Case studies involving interesting and innovative uses of PostgreSQL from an application developer, PostgreSQL developer or administrative user perspective
* Converting from other databases to PostgreSQL
* Howtos for database administration tasks (partitioning, backups, replication, writing stored procedures)
* Practical advice on configuration, monitoring and database management