Questions tagged [foreign-table]

4 questions
0
votes
2 answers

Postgresql: how to ignore unavailable foreign tables when selecting data from them

I have a view as a union of several external tables (postgres_fdw). When selected in this view, some of the external servers may be unavailable (there is no network connection), and the select raise an error. Is it possible to ignore such errors and…
0
votes
1 answer

Setting privileges on foreign table on Postgres

How do foreign table privileges work? A simple example where both source_db and destination_db are Postgres databases. source_db: -- create user for user mapping CREATE USER fdw_user WITH PASSWORD 'secret'; -- create table CREATE TABLE data (value…
tok
  • 909
  • 1
  • 10
  • 21
0
votes
2 answers

Adding a partition from another DB to existing partitioned table in Postgres 12

Short description of a problem I need to build a partitioned table "users" with 2 partitions located on separate servers (Moscow and Hamburg), each partition is table with columns: id - integer primary key with auto increment region - smallint…
Vind Iskald
  • 345
  • 3
  • 14
0
votes
0 answers

Postgres - CREATE FOREIGN TABLE based on other table

I'm looking way to simplify CREATE FOREIGN command, so do need to specify all columns and types. What I'm doing now (using file_fdw server): CREATE FOREIGN TABLE temp_table_csv (id integer, name text) SERVER csv_log_server OPTIONS ( filename…
Maciej
  • 10,423
  • 17
  • 64
  • 97