News for hackers. Stuff that matters.
Re:Rxdb: A reactive database where you can subscribe to the ... by kiwicopple on Friday October 25, 2019 @01:33PM (#21357286)
Yeah I also used triggers at the start. There are 2 things that this implementation achieve over triggers.

1. Triggers have an 8000 byte limit. I ran against these limits pretty quickly

2. You need to attach the trigger each time you create a new table. With this you can set and forget

Re:Rxdb: A reactive database where you can subscribe to the ... by anarazel on Friday October 25, 2019 @01:57PM (#21357517)
There's no 8k limit with triggers? Could you expect on what you mean by that?

One of the motivating factors for not using triggers is that the implied overhead is very significant. By logging changes separately which triggers the write volume is roughly doubled, and the overhead of insertions is much much higher (a lot of fast/bulk path can't be used, the trigger processing needs to be performed).

Re:Rxdb: A reactive database where you can subscribe to the ... by kiwicopple on Friday October 25, 2019 @02:05PM (#21357591)
Sorry I meant I was using triggers to sent a NOTIFY which has an 8k byte limit.

Very true what you mention about trigger overhead. Also you don’t get guaranteed atomicity

Re:Rxdb: A reactive database where you can subscribe to the ... by numtel on Saturday October 26, 2019 @10:10PM (#21367483)
I wrote a node.js package a few years ago that gets past the 8000 bytes by sending multiple notifications.

https://github.com/numtel/pg-live-select