I was struggling few hours why I couldn't get connection to work to foreign MS SQL server, until I figured and remembered Fedora is SELinux enabled system. It did not allow PostgreSQL server just to make external net connections.
It started to work after:
$ sudo semanage permissive -a postgresql_t
There may be a strict tighter way of allowing it (tds-fdw) to work, but right now I'll go with that.
If I google now, it is obvious; there is similar problems with php and freetds, but couldn't find it right away few hours ago, so wrote this note (issue) here also. It can be confusing problem when tds_fdw just says "Permission denied", and you wonder why when you have double checked server/port/user/passwrd/database/schema several times to be correct and working with tsql command.
I was struggling few hours why I couldn't get connection to work to foreign MS SQL server, until I figured and remembered Fedora is SELinux enabled system. It did not allow PostgreSQL server just to make external net connections.
It started to work after: $ sudo semanage permissive -a postgresql_t
There may be a strict tighter way of allowing it (tds-fdw) to work, but right now I'll go with that.
If I google now, it is obvious; there is similar problems with php and freetds, but couldn't find it right away few hours ago, so wrote this note (issue) here also. It can be confusing problem when tds_fdw just says "Permission denied", and you wonder why when you have double checked server/port/user/passwrd/database/schema several times to be correct and working with tsql command.