Обсуждение: Problem with postgres_fdw and partitioned tables (9.6 to 10.2)

Поиск
Список
Период
Сортировка

Problem with postgres_fdw and partitioned tables (9.6 to 10.2)

От
Don Seiler
Дата:
My local DB is PG 9.6.6, remote is PG 10.2.

I created a partitioned table on remote that I want to be able to run queries against from the local DB. I create the server and user mappings just fine. Then I run IMPORT FOREIGN SCHEMA ... LIMIT TO to bring that remote table into view on my local 9.6 table. The IMPORT statement doesn't return any errors, but I can't see the partitioned table.

If I create a regular unpartitioned table on the remote 10.2 DB, I can import that just fine.

I'm guessing this just a limitation of using the 9.6 DB to import 10.2 features? Could I somehow create a view in 10.2 in front of that table to hide its true nature?

Don.

--
Don Seiler
www.seiler.us

Re: Problem with postgres_fdw and partitioned tables (9.6 to 10.2)

От
Don Seiler
Дата:
Just to follow-up, I think if this (importing a foreign Pg10 partitioned table into Pg9.6 via FDW) is just one of those things that isn't allowed, the DB should spit out a very clear error. Right it doesn't so it looks like the command executed fine so I spend a lot of time trying to find out what happened to that table.

On Wed, Apr 18, 2018 at 4:45 PM, Don Seiler <don@seiler.us> wrote:
My local DB is PG 9.6.6, remote is PG 10.2.

I created a partitioned table on remote that I want to be able to run queries against from the local DB. I create the server and user mappings just fine. Then I run IMPORT FOREIGN SCHEMA ... LIMIT TO to bring that remote table into view on my local 9.6 table. The IMPORT statement doesn't return any errors, but I can't see the partitioned table.

If I create a regular unpartitioned table on the remote 10.2 DB, I can import that just fine.

I'm guessing this just a limitation of using the 9.6 DB to import 10.2 features? Could I somehow create a view in 10.2 in front of that table to hide its true nature?

Don.

--
Don Seiler
www.seiler.us



--
Don Seiler
www.seiler.us