Parallel run of queries / functions / tasks using dblink

PostgreSQL has one problem which limits scalability. One process / session / connection can use only one CPU / core. Therefore if you want / need to run several queries / tasks / functions in parallel you have to use dblink functions to open more parallel connections...

Simple query to find object in all databases on your server

This is also only very small hint. As you probably already very well know databases on PostgreSQL server are isolated and you cannot so easily run queries across them. This small query shows one simple way how to check for some pattern in table and view names across...

List of columns and list of column definitions for dblink

This is just a very small and very simple candy – but sometimes it can save some nerves. Sometimes you need to aggregate list of columns and list of column definitions to use it in dynamic query for example for dblink etc. with srcdata as (         select   ...

Autonomous transaction in PostgreSQL

I think this is really very well known. I add it here only as a reminder. In Oracle you can define “pragma autonomous_transaction” to force your procedure make changes in data regardless of any other pending transaction. This is really useful when you need...