postgresql when it's not your job

7 November 2009

14:40

Django, PostgreSQL, and Transaction Management

Django has quite a bit of code in it devoted to transaction management. Although the documentation goes into quite a bit of depth on transactions, I’ve never felt that the docs by themselves let you build a good mental model of how transactions actually work. So, I decided to approach it experimentally: Build a small Django app, and see how the various options actually work.

Read the rest of this entry »

4 November 2009

20:13

ORMs and Their Discontents

I love object-oriented programming. The first time I ever encountered an OO language or framework (Object Pascal and MacApp, thank you for asking), it was as if the heavens opened. It simply made sense to me as a way of structuring programs, and I’ve been wedded to it ever since. (As it turns out, if you do the right paperwork, you can marry a concept.)

So, I think object-oriented programming is the bee’s knees. And, in this post, I’m going to tell you to not use it.

Read the rest of this entry »

12:22

Git vs Mercurial

No, I’m not going to write another Git vs Mercurial post that really digs into them, because… well, if you are using one or the other, it is probably for reasons that don’t have much to do with your preferences.

In strictly my opinion, for personal use, I like Mercurial. For projects that use Git, I use Git.

My two sentence summary is: Mercurial is your smart friend who likes to explain things to you. Git is your genius coworker who sighs and rolls his eyes every time you ask him a question.

19 October 2009

08:30

WordPress to Django+PostgreSQL, Part 4: Configuring Apache, Django, PostgreSQL

In the previous installment of this series (in which we’re migrating this blog from WordPress to Django and PostgreSQL), we installed Apache, Python 2.6, psycopg and mod_wsgi on the server. Read the rest of this entry »

17 October 2009

16:09

WordPress to Django+PostgreSQL, Part 3: Installing Apache, Python 2.6, psycopg2, and mod_wsgi

In part 2 of this series, we got PostgreSQL up and running. In this part, we’ll install the remaining components to get Django up and running under Apache: Apache itself, Python 2.6, psycopg2, and mod_wsgi. Read the rest of this entry »

10:00

WordPress to Django+PostgreSQL: Part 2, Configuring PostgreSQL

In part 1, we installed PostgreSQL on the VPS. In this part, it’s time to get the database server up and configured. Read the rest of this entry »

16 October 2009

23:49

The Mighty GUCS: A guide to the essential PostgreSQL settings you need to know

The archive video for the October 13, 2009 SFPUG meeting is now available: Read the rest of this entry »

12:20

WordPress to Django+PostgreSQL: Part 1, Installing PostgreSQL

This is part 1 of my migration of my blog from WordPress to Django and PostgreSQL. I’m starting with a bare Centos 5.3 slice from Slicehost, and setting it up bit by bit.

In this part, I’m installing PostgreSQL. Read the rest of this entry »

09:32

WordPress to Django+PostgreSQL: Introduction

I’ve been doing a lot more development with Django and PostgreSQL lately. The logical thing to do is to blog about it, of course…

On my blog running WordPress?

Well, that won’t do at all.

So, I’m going to be migrating this blog to use Django and PostgreSQL, and will blog about the adventure here. I’ll be starting with a bare VPS “slice” at Slicehost, running Centos 5.3, and document each step.

Onwards to step 1: Installing PostgreSQL on the slice.

15 October 2009

20:51

Getting PostgreSQL 8.4 to only listen on Unix sockets

The default installation of PostgreSQL listens on 127.0.0.1 (the local loopback address) and on Unix sockets. The controlling parameter, listen_addresses, isn’t documented to have a setting that just listens on sockets, and not the loopback address.

As it happens, such a setting exists:

listen_addresses=''

Among other things, this appears to prevent local instances of pgAdmin from connecting (although psql works fine), so its utility is not clear, but there it is if you wish it.

« Older Entries

Newer Entries »