Re: Watching for view changes

From: Ricardo Martin Gomez <rimartingomez(at)hotmail(dot)com>
To: Kevin Brannen <kbrannen(at)efji(dot)com>, Mitar <mmitar(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Watching for view changes
Date: 2018-12-22 16:42:10
Message-ID: SC1P15201MB23043ECC20218275F67BF8E6A3B90@SC1P15201MB2304.LAMP152.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, perhaps you can use triggers for some tables.
Regards.

Obtener Outlook para Android<https://aka.ms/ghei36>

________________________________
From: Mitar <mmitar(at)gmail(dot)com>
Sent: Saturday, December 22, 2018 1:21:49 AM
To: Kevin Brannen
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Watching for view changes

Hi!

On Thu, Dec 20, 2018 at 12:54 PM Kevin Brannen <KBrannen(at)efji(dot)com<mailto:KBrannen(at)efji(dot)com>> wrote:
Hmm, I guess I could see that as long as the DB wasn't too [write] busy, else you'd be flooded with notifications.

Sure. But this could be resolved by allowing notifications to be batched together. Debounce them. So could maybe configure how often you want such notifications and if they are more often they would be combined together into one.

Maybe it's a useful idea for you ... or maybe not. 😊

Thanks. Yes, this is one approach to do it. Hooking into every modify call at the app level and in this way have some information what is changing. I would prefer doing it in the database though, so that it could be independent from the source of the change. Moreover, not all UPDATE queries really do end up updating the data.

Mitar

--
http://mitar.tnode.com/
https://twitter.com/mitar_m

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2018-12-22 21:16:05 Re: Watching for view changes
Previous Message Mark 2018-12-22 09:14:05 Re: Query planner / Analyse statistics bad estimate rows=1 with maximum statistics 10000 on PostgreSQL 10.2