Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gaoe4-0002VL-GG for pgsql-general@arkaria.postgresql.org; Sat, 22 Dec 2018 21:17:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gaod3-000125-92 for pgsql-general@arkaria.postgresql.org; Sat, 22 Dec 2018 21:16:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gaod2-00010n-Uq for pgsql-general@lists.postgresql.org; Sat, 22 Dec 2018 21:16:13 +0000 Received: from mail-it1-x130.google.com ([2607:f8b0:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gaocz-0006uZ-KC for pgsql-general@lists.postgresql.org; Sat, 22 Dec 2018 21:16:12 +0000 Received: by mail-it1-x130.google.com with SMTP id a6so11304653itl.4 for ; Sat, 22 Dec 2018 13:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=McBZVqEWyQXqkLfihNKPkl80yEYS7JkAnRQ1jGt0vr4=; b=HeIKHHosKTDAM/Oup5IUDkZUV/bdpdThQlUoI5HVvVr3WXmIpQTxTvXBMKM6pBlPve 1uMEf2xAX5lYGQU9k43AezO4wsNAgre/MNGOsuxRdfXBIWczwvYOACRqkic/pI/YirlH hB6Gspy8Lb1rYPoVlHGIiUMXy/aEhtzqvOv4x+HDT5mmGGibV5eM5tcLMsjohvaW3Iah 1ArXR2j0pCjbKqV5T4ZzoaOp7pNgHjsCttqRd2YfkIZKh2FRYD1/j2e7rj6aigOZIqpu Sj0gzs6WNSu2k1aOa3pj14MH/DpzjSESFVeyLklZAdPDcYRfLWmo3qbWWH/2Svrga4Y3 dnCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=McBZVqEWyQXqkLfihNKPkl80yEYS7JkAnRQ1jGt0vr4=; b=mkOCccfpAccPvwKm3BRxB2Tl/AbZj2UtL/MlrgUE/tOUG1e4laYXUYUcHO01m5O3Hp wkNGM7HxkAXZxH5ZYn5/T1ezwpuQ/p5PbJWpudCbsIsFsQ4y1y3ROp8OjUvtvmgpF2qz CiC9enelejpLXObvz8+PiIZu7EhTeg9FFtrvqeXrcbPG2jxoRn8LXNh+04X/wZXIVTsm tUuBbxCZhcAIJ8U4cjYfj8M/TrmNe+mnyTG9efKXX8KxHR1RwQpFyM5C0txKDXpMkKwA Lnb758hEZnzYcjABrO8ZF6Yw9tOCX+KQ28EEfwzFgmjKajjWUOU/GDPZt2d8CiyPCDwB Koug== X-Gm-Message-State: AA+aEWYFxHWlJxi94y+qzoGU1aFhSE+0r/0fCueXE+6cOtSEhJaoORu+ VL8wDurPduTHgVU2ld5ky2o= X-Google-Smtp-Source: AFSGD/Wzpm5vZoe4dXbQiPvnDGVn1TNOXS6ebN1wFh3E6c0VNTsuKUETJUhqErhl13iQuOvqVn8azA== X-Received: by 2002:a05:660c:128c:: with SMTP id s12mr4205880ita.145.1545513367547; Sat, 22 Dec 2018 13:16:07 -0800 (PST) Received: from [192.168.1.140] (c-73-63-59-118.hsd1.ut.comcast.net. [73.63.59.118]) by smtp.gmail.com with ESMTPSA id a25sm609841iod.63.2018.12.22.13.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Dec 2018 13:16:06 -0800 (PST) From: Rob Sargent Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_35397609-C162-4A93-8F79-26A40905A825" Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: Watching for view changes Date: Sat, 22 Dec 2018 14:16:05 -0700 In-Reply-To: Cc: Kevin Brannen , "pgsql-general@lists.postgresql.org" To: Mitar References: <8ce68eb6-4bae-447c-b9d2-f25e0c02546d@gmail.com> <24cae5b1-fbc6-0cb4-e10c-6cd316dff2f5@aklaver.com> <7D00214A-F8F0-44DC-9772-E35EAF2E2FAD@gmail.com> X-Mailer: Apple Mail (2.3445.101.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_35397609-C162-4A93-8F79-26A40905A825 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Is this of theoretical interest (up to and including a = specification/requirement) or this a practical concern (i.e. need to = know when to update somebody=E2=80=99s dashboard widget (but the query = is too slow to simply refresh on-demand)? > On Dec 22, 2018, at 9:42 AM, Ricardo Martin Gomez = wrote: >=20 > Hi, perhaps you can use triggers for some tables.=20 > Regards. >=20 > Obtener Outlook para Android > From: Mitar > Sent: Saturday, December 22, 2018 1:21:49 AM > To: Kevin Brannen > Cc: pgsql-general@lists.postgresql.org > Subject: Re: Watching for view changes > =20 > Hi! >=20 > On Thu, Dec 20, 2018 at 12:54 PM Kevin Brannen > 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. >=20 > 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. > =20 > Maybe it's a useful idea for you ... or maybe not. =F0=9F=98=8A >=20 > 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. >=20 >=20 > Mitar >=20 > --=20 > http://mitar.tnode.com/ > https://twitter.com/mitar_m --Apple-Mail=_35397609-C162-4A93-8F79-26A40905A825 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Is = this of theoretical interest (up to and including a = specification/requirement) or this a practical concern (i.e. need to = know when to update somebody=E2=80=99s dashboard widget (but the query = is too slow to simply refresh on-demand)?


On Dec 22, 2018, at 9:42 AM, Ricardo Martin Gomez <rimartingomez@hotmail.com> wrote:

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


From: = Mitar <mmitar@gmail.com>
Sent: Saturday, December 22, 2018 1:21:49 AM
To: Kevin Brannen
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Watching for view changes
 
Hi!

On Thu, Dec 20, 2018 at 12:54 PM Kevin = Brannen <KBrannen@efji.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. =F0=9F=98=8A

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

--

= --Apple-Mail=_35397609-C162-4A93-8F79-26A40905A825--