-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Is your feature request related to a problem? Please describe.
Follow on from #8
- There is a 8000 byte limit for pg_notify data, which isn't much.
- This obviously doesn't work for sending large submission XML data.
Describe the solution you'd like
- Instead of aggregating all data for the payload in the trigger, perhaps we actually need to pass a lightweight object through pg_notify, then have the listener gather all the data required from the DB before posting:
PERFORM pg_notify('odk-events', jsonb_build_object(
'action', TG_OP,
'type', action_type,
'id', NEW.id
)::text);
- We pass the entity or submission def ID, then get the data from the listener code.
The downside here (and reason for not doing this originally), is the need for two db transactions, not just one.
Describe alternatives you've considered
- Handling submission related events separately, as this is probably only where we will have issues (entity / review events will generally have smaller payloads).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed