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

Add explicit error when MERGE command is used with hypertables #4930

Closed
iroussos opened this issue Nov 7, 2022 · 5 comments · Fixed by #4969
Closed

Add explicit error when MERGE command is used with hypertables #4930

iroussos opened this issue Nov 7, 2022 · 5 comments · Fixed by #4969

Comments

@iroussos
Copy link

iroussos commented Nov 7, 2022

What problem do we want to solve?

As discussed in #4929, the new MERGE command (introduced in PG 15) fails with an error when used with hypertables.

Currently a generic catch-all error is presented which is not only confusing, but straightforward wrong (it will be thrown even if the extension is available and preloaded):

ERROR:  invalid INSERT on the root table of hypertable "conditions"
HINT:  Make sure the TimescaleDB extension has been preloaded.

Before adding full support for MERGE (which at the moment we don't know how much effort it will require), we want to make sure that we present a properly descriptive error to TimescaleDB users.

ERROR:  The MERGE command does not support hypertables in this version 
HINT:  Check https://github.com/timescale/timescaledb/issues/4929 for more information and current status
@iroussos
Copy link
Author

iroussos commented Nov 7, 2022

@horzsolt assigning to you to decide who should work on this as part of https://github.com/timescale/timescaledb-private/issues/972

@iroussos
Copy link
Author

iroussos commented Nov 7, 2022

The question is how easy is it to identify when MERGE command is used with hypertables? Seems pretty straight forward, but could this delay our plans for PG15 support?

@iroussos
Copy link
Author

iroussos commented Nov 7, 2022

@charislam can you help us with some feedback on the error message we should have in this case?

We want to inform TimescaleDB users that the newly introduced MERGE command does not work with hypertables right now (2.9.0) (but it works for normal tables).

The idea is to inform them on use of the command (for that small 99%+ that doesn't check release announcements :-) ). My quick proposal:

ERROR:  The MERGE command does not support hypertables in this version 
HINT:  Check https://github.com/timescale/timescaledb/issues/4929 for more information and current status

Seems weird to link to a github issue in there. Maybe we should skip the hint (?)

PS. We'll most probably add support for it around 2.10.0

FYI @nenadmalic (and any ideas on wording)

@mfundul mfundul self-assigned this Nov 7, 2022
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 7, 2022
@jfjoly jfjoly added this to the TimescaleDB 2.9 milestone Nov 7, 2022
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 7, 2022
@charislam
Copy link

Hi @iroussos text looks fine to me, no suggestions there. I actually like the hint, it feels more responsive than just saying "nope, this doesn't work". As it's a temp measure I think linking to a GitHub issue is fine

mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 8, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 8, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 9, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 9, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 9, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 10, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 11, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 11, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit to mfundul/timescaledb that referenced this issue Nov 12, 2022
Fixes timescale#4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
mfundul pushed a commit that referenced this issue Nov 14, 2022
Fixes #4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
SachinSetiya pushed a commit that referenced this issue Nov 16, 2022
Fixes #4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
SachinSetiya pushed a commit that referenced this issue Nov 28, 2022
Fixes #4930

Co-authored-by: Lakshmi Narayanan Sreethar <lakshmi@timescale.com>
@theblinkingusb
Copy link

Thanks for this one - just came across the error and having the github issue there was helpful. Upgraded and now g2g.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment