pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16021: Can create Pk on partitioned table with foreign table as partition
2+ messages / 2 participants
[nested] [flat]

* BUG #16021: Can create Pk on partitioned table with foreign table as partition
@ 2019-09-25 07:11  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2019-09-25 07:11 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: stepya@ukr.net

The following bug has been logged on the website:

Bug reference:      16021
Logged by:          Stepan Yankevych
Email address:      stepya@ukr.net
PostgreSQL version: 11.5
Operating system:   CentOS Linux release 7.3.1611 (Core)
Description:        

As far as I can see  the issue has been fixed in 11.5 with following
resolution: 
Ignore partitions that are foreign tables when creating indexes on
partitioned tables (Álvaro Herrera) 
Previously an error was thrown on encountering a foreign-table partition,
but that's unhelpful and doesn't protect against any actual problem.

But I still can't create Pk on partitioned table

See details: 
SELECT version();
PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623
(Red Hat 4.8.5-36), 64-bit

ALTER TABLE fix_capture.fix_message_json ADD CONSTRAINT fix_message_json_pk
PRIMARY KEY (fix_message_id,date_id); 
SQL Error [42809]: ERROR: cannot create unique index on partitioned table
"fix_message_json"
  Detail: Table "fix_message_json" contains partitions that are foreign
tables.

Have I missed something?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16021: Can create Pk on partitioned table with foreign table as partition
@ 2019-09-25 07:48  Etsuro Fujita <etsuro.fujita@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Etsuro Fujita @ 2019-09-25 07:48 UTC (permalink / raw)
  To: PG Bug reporting form <noreply@postgresql.org>; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; stepya@ukr.net

On Wed, Sep 25, 2019 at 4:12 PM PG Bug reporting form
<noreply@postgresql.org> wrote:

> Bug reference:      16021
> Logged by:          Stepan Yankevych
> Email address:      stepya@ukr.net
> PostgreSQL version: 11.5
> Operating system:   CentOS Linux release 7.3.1611 (Core)
> Description:
>
> As far as I can see  the issue has been fixed in 11.5 with following
> resolution:
> Ignore partitions that are foreign tables when creating indexes on
> partitioned tables (Álvaro Herrera)
> Previously an error was thrown on encountering a foreign-table partition,
> but that's unhelpful and doesn't protect against any actual problem.
>
> But I still can't create Pk on partitioned table
>
> See details:
> SELECT version();
> PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623
> (Red Hat 4.8.5-36), 64-bit
>
> ALTER TABLE fix_capture.fix_message_json ADD CONSTRAINT fix_message_json_pk
> PRIMARY KEY (fix_message_id,date_id);
> SQL Error [42809]: ERROR: cannot create unique index on partitioned table
> "fix_message_json"
>   Detail: Table "fix_message_json" contains partitions that are foreign
> tables.
>
> Have I missed something?

As I said in a previous mail, this is a limitation, not a bug.

Best regards,
Etsuro Fujita





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-09-25 07:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 07:11 BUG #16021: Can create Pk on partitioned table with foreign table as partition PG Bug reporting form <noreply@postgresql.org>
2019-09-25 07:48 ` Etsuro Fujita <etsuro.fujita@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox