PostgreSQL Partitioning Quick Tip

Reading time ~1 minute

Partitioning in PostgreSQL can be a little daunting at times. In fact, you should probably just use pg_partman and be done with it. However, if you’re trying to learn, can’t use pg_partman, or are a masochist you’ll probably be following the docs and thinking ‘seriously? i have to create indexes on each child? why don’t they copy the indexes of the parent? why isn’t this easier?’. Here’s a little tip to make things slightly easier:

Instead of creating your child tables like the docs say:

Create your child tables thusly:

and PostgeSQL will copy all your indexes, primary keys, etc from the parent to the child. Which is what you wanted, right?


pgBackRest 2.08 and macOS Mojave

UPDATE: My reasoning was incorrect below. It wasn't the moving of some of the lock code to C that caused the issue. It was moving `-D_POS...… Continue reading

pgBackRest 2.07 and macOS Mojave

Published on November 16, 2018

Monitoring pgBackRest with tail_n_mail

Published on September 24, 2018