In this recipe, we will use the postgres_fdw extension that allows the creation of foreign data wrappers, needed to access data stored in external PostgreSQL databases. In order to use this extension, we will need the combination of several concepts: server, foreign data wrapper, user mapping, foreign table and table inheritance. We will see them in action in this recipe, and you are welcome to explore them in detail on the PostgreSQL documentation.
We will use the fire hotspot dataset and the world country borders shapefile used in Chapter 1, Moving Data in and out of PostGIS, in order to distribute the records for the hotspot data based on a geographical criteria, we will create a new distributed version of the hotspot dataset. ...