10 Articles tagged “Catalogs”

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?



This time, we are trying to figure out where is the bulk of the data on disk. The trick is that we’re using DDL partitioning, but we want a “nice” view of size per partition set. Meaning that if you have for example a parent table foo with partitions foo_201006 and foo_201007, you would want to see a single category foo containing the accumulated size of all the partitions underneath foo.


Finding orphaned sequences

This time we’re having a database where sequences were used, but not systematically as a default value of a given column. It’s mainly an historic bad idea, but you know the usual excuse with bad ideas and bad code: the first 6 months it’s experimental, after that it’s historic. Not talking about genome orphaned sequences here, though Still, here’s a query for 8.4 that will allow you to list those sequences you have that are not used as a default value in any of your tables:


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!

Dimitri Fontaine

PostgreSQL Major Contributor

Open Source Software Engineer

France