When you do partition your tables monthly, then comes the question of when to create next partitions. I tend to create them just the week before next month and I have some nice nagios scripts to alert me in case I’ve forgotten to do so. How to check that by hand in the end of a month?
We’re using constants in some constraints here, for example in cases where several servers are replicating to the same federating one: each origin server has his own schema, and all is replicated nicely on the central host, thanks to Londiste, as you might have guessed already.
Some user on IRC was reading the releases notes in order to plan for a minor upgrade of his 8.3.3 installation, and was puzzled about potential needs for rebuilding GIST indexes. That’s from the 8.3.5 release notes, and from the 8.3.8 notes you see that you need to consider hash indexes on interval columns too. Now the question is, how to find out if any such beasts are in use in your database?
So, after restoring a production dump with intermediate filtering, none of our sequences were set to the right value. I could have tried to review the process of filtering the dump here, but it’s a one-shot action and you know what that sometimes mean. With some pressure you don’t script enough of it and you just crawl more and more.
Still, I think how I solved it is worthy of a blog entry.
As it happens, I’ve got some environments where I want to make sure HOT (
aka Heap Only Tuples) is in use. Because we’re doing so much updates a
second that I want to get sure it’s not killing my database server. I not
only wrote some checking view to see about it, but also made
a
quick article about
it in the French PostgreSQL website. Handling
around in #postgresql
means that I’m now bound to write about it in
English too!