First Execute
CREATE EXTENSION DBLINK;
Then
INSERT INTO
<SCHEMA_NAME>.<TABLE_NAME_1>
SELECT *
FROM
DBLINK(
'HOST=<IP-ADDRESS> USER=<USERNAME> PASSWORD=<PASSWORD> DBNAME=<DATABASE>',
'SELECT * FROM <SCHEMA_NAME>.<TABLE_NAME_2>')
AS <TABLE_NAME>
(
<COLUMN_1> <DATATYPE_1>,
<COLUMN_1> <DATATYPE_2>,
<COLUMN_1> <DATATYPE_3>
);