Re: Populating missing dates in postgresql data

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
Cc: "Lavrenz, Steven M" <slavrenz(at)purdue(dot)edu>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Populating missing dates in postgresql data
Date: 2015-03-27 15:33:36
Message-ID: CAKFQuwYHUmEZZM=Zei4pgOkhHgCE4SiMgFWM+aC=JxUkAQeJig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 27, 2015 at 3:41 AM, Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> wrote:

> On Thu, 26 Mar 2015 00:25:09 +0000
> "Lavrenz, Steven M" <slavrenz(at)purdue(dot)edu> wrote:
>
> > I have a second table (TABLE B) with all of the object_ids and channels
> that are supposed to be reporting in each day. For cases where a certain
> channel does not check in, I want to add a column that indicates the comm
> failure.
>
> Not sure if your context allows it, but if you can change your program's
> logic, it might be easier to :
>
> -add a boolean field (e.g. 'checked') to table B, set to false
> -whenever an object checks in do 'update table B set checked = true where
> object_id = X and channel = Y'
> -run a cron job once a day that
> -runs 'select * from B where checked = false' and stores results
> somewhere
> -resets B with 'update B set checked = false'
>
>
​This is a performance optimization that I would avoid at nearly any cost,
and there are likely better ways to limit the processing scope without
having to trust the a cron job runs daily​

​in order to not lose data. Now, there are other points of failure here
that are of a similar nature already but still adding one for
(pre-mature...) optimization doesn't seem like a good move.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike 2015-03-27 16:24:17 Re: 9.4+ partial log-shipping possible?
Previous Message R Clarke 2015-03-27 12:04:33 Re: Could not read block of temporary files