Posted on September 24, 2007
One of the issues we’ve had to deal with at myYearbook is how to deal with reducing index bloat in PostgreSQL. The reindex database command does this pretty handily, but since it is performed table by table in serial, it can be pretty slow when you're sporting 30GB+ tables. To solve this I threw together this little CLI php script.
The idea is pretty straightforward - get a list of all the tables with indexes from the PostgreSQL system catalog for a given database, split them up into chunks and run multiple reindexes at the same time. If you find it useful or have ideas to improve it, drop me a note and let me know.
Here is an example of usage:
[gmr@gmr-imac ~]$ ./parallelReindex.php
Error: Required parameters not set.
Usage: parallelReindex.php parameters
Parameters:
-host Specify the database host to connect to - required
-port Specify the port to connect to
-dbname Specify the database name to connect to - required
-user Specify the database user to connect as - required
-password Specify the database user password
-threads Set the number of parallel reindex tasks to run (default 15)
Example:
./parallelReindex.php -host localhost -user postgres -dbname test
Filed under: PostgreSQL |
Tagged with: PHP Postgres myYearbook |
Posted on September 09, 2007
We’ve adopted a new dog, Penny. She’s a Golden Retriever and has a great personality. We adopted her from the Bucks County SPCA who were all really nice and helpful.

A photo gallery of Penny, in progress.
Tagged with: Family |
Posted on September 05, 2007
I don't know what planet their marketing people are on, but the slogan “The New AT&T” really bothers me. It's not the new AT&T, if anything it's closer to the old AT&T. Check out this image taken from the AT&T wikipedia article:

I guess it’s part of the thinking that if you repeat something enough people will believe it is true. Of course what is really bothering me is I spent 45 minutes with “The New AT&T” last night on the phone activating a replacement lost cell phone for Michelle. I’ve come to the opinion that all cell phone companies suck and it’s no longer the choice of which one sucks less. They’re all large, monolithic organizations that couldn’t care less about their customers and make interacting with them as painful as possible. I want an iPhone, but not bad enough to deal with “The New AT&T.”
Tagged with: Rants |
Posted on September 04, 2007
Recently there has been a very active discussion on the pgsql-advocacy mailing list about renaming PostgreSQL to Postgres. If you have a vested interest or an opinion either way, please drop an email and let the community know. For a little background, the project was originally named Postgres. In 1995 it was renamed to Postgres95 and then in 1996 it was once again renamed, this time to PostgreSQL. The discussion is about returning to the more pronounceable original name. If you're interested, the PostgreSQL site has more information on the history of the project here.
Filed under: PostgreSQL |
Tagged with: Postgres |
Posted on September 04, 2007
I dropped Eden off this morning for her first day in pre-k school. She was quite excited. It was great to see her so eager about it.
Tagged with: Family |
Posted on September 04, 2007
I was processing a bunch of responses to job postings today and in responding via email, I received five bounded emails stating that the email address doesn't exist. Why would people apply for a job with bad email address info?
Tagged with: myYearbook |
Posted on September 02, 2007
Eden and I made a video of her dancing today. I've uploaded it to both the uber cool .Mac Web Gallery and to Youtube.
Tagged with: Family |