I suppose an easy workaround is to copy my version 9.6 pg_config.h into my user/include/postgresql directory and replace the one installed by libpq-dev.
Can you think of any detrimental side-effects from doing that?
with the following caveats: " Note: PostgreSQL 9.6 is required for TimescaleDB on Ubuntu distros. Releases with PostgreSQL 10 are coming soon Prerequisites
Ubuntu 16.04 or later
Build & Install
WARNING:If you have another PostgreSQL installation not via apt, this will likely cause problems. If you wish to maintain your current version of PostgreSQL outside of apt, we recommend installing from source. Otherwise please be sure to remove non-apt installations before using this method.
"
CPPFLAGS = -I/usr/include/postgresql
Very likely there's some amount of macro-ization involved, so it might look more like