Replace usage of deprecated gb_tree/0
Export pgsql_connection/0 type
Synchronize to version 21