Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres tables created with declarative partitioning option are not accessible #10400

Closed
guyco33 opened this issue Dec 23, 2021 · 3 comments · Fixed by #10403
Closed

Postgres tables created with declarative partitioning option are not accessible #10400

guyco33 opened this issue Dec 23, 2021 · 3 comments · Fixed by #10403
Labels
bug Something isn't working

Comments

@guyco33
Copy link
Member

guyco33 commented Dec 23, 2021

Since 364, Postgres tables created with the declarative partitioning option (10+) are not accessible.

Postgres 10+

CREATE TABLE test_part_tbl (
    id         int not null,
    logdate    date not null,
    payload    varchar
) PARTITION BY RANGE (logdate)

Trino 363

SHOW TABLES FROM postgres.public LIKE 'test_part_tbl'
('test_part_tbl',)

Trino 354+

SHOW TABLES FROM postgres.public LIKE 'test_part_tbl'
no result

I guess it's somehow related to bumping JDBC driver from 42.2.10 to 42.2.14

Tests for declarative partitioning cannot be done until Postgres docker will bump from 9.6 to 10+

The following test pass in 363 and fails in 364+

@guyco33 guyco33 added the bug Something isn't working label Dec 23, 2021
@guyco33
Copy link
Member Author

guyco33 commented Dec 23, 2021

@hashhar

guyco33 added a commit to guyco33/trino that referenced this issue Jan 3, 2022
Fixes trinodb#10400
Postgres Jdbc 42.2.14+ added a new PARTITIONED TABLE type that must be included in PgDatabaseMetaData.getTables function arguments to retrieve partitioned tables
@findepi
Copy link
Member

findepi commented Jan 4, 2022

Tests for declarative partitioning cannot be done until Postgres docker will bump from 9.6 to 10+

We should test with both: oldest and newest supported PostgreSQL version.
See BaseElasticsearchConnectorTest (perhaps this should use BaseConnectorSmokeTest instead.)

@guyco33
Copy link
Member Author

guyco33 commented Jan 4, 2022

10.x is the oldest supported version, so splitting tests is not relevant for partitioned tables.

hashhar pushed a commit that referenced this issue Jan 10, 2022
Fixes #10400
Postgres Jdbc 42.2.14+ added a new PARTITIONED TABLE type that must be included in PgDatabaseMetaData.getTables function arguments to retrieve partitioned tables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants