-
Notifications
You must be signed in to change notification settings - Fork 884
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
Support transition tables in triggers on hypertable #1084
Comments
|
This feature is needed to optimize MIN/MAX queries which sometimes can take several minutes (https://stackoverflow.com/questions/58868527/optimizing-min-max-queries-on-time-series-data/58889609) |
I wanted to use this to create custom notification logic:
it is important for me to get a complete statement and not just each inserted row, because the logic for the notification depends on multiple rows which always get inserted in a single statement. |
I was getting a segmentation fault when trying to this and ended up here. With a regular SQL table it works correctly. Is there a way to access Thanks |
Any updated on this issue or any workaround to get a batch of rows? |
The scariest thing about this issue is that it can be applied-to and works fine for the current chunk. As soon as your chunk rolls over to the next (say if you store daily, rolls over at midnight) the hypertable will stop functioning with error:
This almost got out to our production system. It's quite a flaw. |
Would love to see this capability |
This would be great. |
We were implementing statement-level triggers (to refresh global stats) when we noticed this issue on hypertables. That's a serious limitation. 😢 Is there any workaround? |
There ought to be a mention of this in the TSDB docs. Is there any discussion regarding the addition of this support? I do not see much via search |
please please please support this :) |
That's a serious limitation to us because row level triggers are several times slower than statement triggers |
In order to improve performance of custom triggers dramatically, please support the use of transition tables as of PostgreSQL 10, e.g.:
Furthermore, while creation of such a trigger works, any attempt to actually
INSERT
data into the affected hypertable will fail with:I would have expected to get this error while trying to create the trigger, not while executing an
INSERT
afterwards (which might be handled separately as a bug or enhancement).TimescaleDB version: 1.2.1
The text was updated successfully, but these errors were encountered: