Skip to content

Don't create hypertable for published tables #7911

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

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

Poroma-Banerjee
Copy link
Contributor

@Poroma-Banerjee Poroma-Banerjee commented Apr 3, 2025

Logical Replication of hypertables is not supported (for implementation reasons). We do not allow creation of hypertables
with publications and now throw an error if attempted.

Closes #7208

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.86%. Comparing base (59f50f2) to head (7a12390).
Report is 868 commits behind head on main.

Files with missing lines Patch % Lines
src/hypertable.c 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7911      +/-   ##
==========================================
+ Coverage   80.06%   81.86%   +1.79%     
==========================================
  Files         190      249      +59     
  Lines       37181    46149    +8968     
  Branches     9450    11571    +2121     
==========================================
+ Hits        29770    37778    +8008     
- Misses       2997     3807     +810     
- Partials     4414     4564     +150     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@Poroma-Banerjee Poroma-Banerjee force-pushed the main branch 2 times, most recently from 798e183 to f3b8d8e Compare April 4, 2025 00:11
@svenklemm svenklemm changed the title Don't create hypertable for punlished tables (#7208) Apr 4, 2025
@fabriziomello
Copy link
Member

Don't need to refer the issue in the PR subject but instead add a "Fixe #7208" at the end of PR description. For reference: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword#linking-a-pull-request-to-an-issue-using-a-keyword

Also is good to add a more descriptive commit why is necessary this change. And please add a "thanks" to the person that reported the issue into the changelog entry.

@Poroma-Banerjee Poroma-Banerjee changed the title Don't create hypertable for published tables (#7208) Apr 4, 2025
@Poroma-Banerjee Poroma-Banerjee force-pushed the main branch 2 times, most recently from 8d5d13f to 473da08 Compare April 4, 2025 17:18
Logical Replication of hypertables is not supported (for
implementation reasons). We do not allow creation of hypertables
with publications and now throw an error if attempted.
@Poroma-Banerjee Poroma-Banerjee merged commit 7173276 into timescale:main Apr 4, 2025
41 of 42 checks passed
@philkra philkra added this to the v2.20.0 milestone Apr 7, 2025
@arajkumar
Copy link
Member

@fabriziomello @Poroma-Banerjee This change doesn't disallow tables which are added to publication using create publication ... for all tables.

postgres=# create publication foo for all tables ;
WARNING:  "wal_level" is insufficient to publish logical changes
HINT:  Set "wal_level" to "logical" before creating subscriptions.
CREATE PUBLICATION
postgres=# create table foo(id integer);
CREATE TABLE
postgres=# select create_hypertable('foo', by_range('id'));
NOTICE:  adding not-null constraint to column "id"
DETAIL:  Dimensions cannot have NULL values.
 create_hypertable
-------------------
 (4,t)
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment