Is there a practical way to run a query outside current transaction?
PostgreSQL doesn't natively support what you want, which is autonomous (sub)transactions.
You can simulate them with dblink, albeit clumsily. dblink
does exactly what you suggested; it makes a connection from one PostgreSQL server to another. The connection may be the server connecting to its self.
If you can do this at the application level it's often better to do so, but dblink is certainly an option.