Skip to content

move stats into a trigger #13

@marcopeg

Description

@marcopeg
IF NEW.status <> OLD.status THEN change counters

this way we can activate/deactivate counters by simply attaching or detaching the trigger.

heavily used queues can probably do without triggers and we might simply provide a way to estimate pending (reading through the index??)

normal queues can also disable the trigger while bulk inserting and reset the metrics when insert ends.

http://www.postgresqltutorial.com/creating-first-trigger-postgresql/

fetchq_queue_enable_metrics(queue, true/false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions