· 1 min read

A brief reminder about casting TIMESTAMPTZ

I spent a few minutes worrying I had lost my mind: Results coming back to my application were different from those obtained by running psql directly on the database server, for identical queries.

As is often the case, the problem was time zones.

In particular, when casting a TIMESTAMPTZ to a DATE, the current client time zone

2 comments

· 1 min read

Blog Moved.

This is probably no big deal to anyone, but the blog has moved to a new server. Whee!

0 comments

· 1 min read

shared_buffers is not a sensitive setting

There’s a lot of mystery-cult information floating around out there about what to set shared_buffers to in PostgreSQL. Most of it is, at best, overthinking a fairly simple setting.

You can get 90% of the way there, on 95%+ of PostgreSQL systems, just by setting it to 25% of total system memory, to a maximum of 32GB. (It used

2 comments

· 1 min read

Resetting the postgres user's password

For some reason, this is something that even experienced PostgreSQL people don’t know about, which is: What do you do if you’ve forgotten the postgres user’s password, and you have no other superuser available?

The answer is: Bring up PostgreSQL in single-user mode, reset the password, bring it back up in standard mode.

Of course, this requires

3 comments

· 1 min read

A PostgreSQL Response to Uber

The slides from my talk at Percona Live 2017, A PostgreSQL Response to Uber, which I also gave as “Why Uber Was (Mostly) Wrong” at PGDay Nordic 2017, are now available.

0 comments

· 1 min read

"Corruption War Stories" from PGConf US 2017

The slides from my presentation, Corruption War Stories, are now available.

1 comment

· 1 min read

"Django and PostgreSQL" from PGConf US 2017

The slides from my presentation, Django and PostgreSQL, are now available.

1 comment

· 1 min read

PostgreSQL When It's Not Your Job

My slides from my PGConf US 2017 tutorial, PostgreSQL When It’s Not Your Job, are available now.

2 comments

· 1 min read

Corruption War Stories at PGDay FOSDEM 2017

The slides for my talk Corruption War Stories are now available.

0 comments

· 1 min read

Django: dictionary update sequence element #0 has length 1; 2 is required

(One of an occasional series of posts about strange errors you can get out of Django, and what it is trying to tell you.)

This exception was being thrown when I was trying to render a template:

1dictionary update sequence element #0 has length 1; 2 is required

It turned out to be a slightly

0 comments