Better HN
topnewbestaskshowjobs
Log inSign up

svenklemm

5 karma · joined Oct 27, 2017 (9y ago) · 7 submissions

Submissions

1.

Show HN: Pgspot – Find vulnerabilities in Postgres SQL scripts(github.com ↗)

13 points · by svenklemm · 2y ago · discuss

2.

How We Fixed Long-Running PostgreSQL Now() Queries(timescale.com ↗)

18 points · by svenklemm · 4y ago · discuss

comment 6y ago · link · parent

To get graphs for this week and the last 3 weeks in the same panel you could use something like this:

  SELECT i::text as metric, l1.*
    FROM 
    (SELECT
    g1 AS i,
    g1 * '1week'::interval AS interval,
   '1 week'::interval AS span,
    now() AS start
  FROM generate_series(0,3) g1) g1
  JOIN LATERAL (
    SELECT
   time + interval AS time,
   value
  FROM metrics
  WHERE time > start - (span+interval) AND time < start - 
  interval
  ) l1 ON TRUE
  ORDER BY time;

comment 8y ago · link · parent

There is a patch for telegraf to support writing to postgres (https://github.com/influxdata/telegraf/pull/3428). Grafana 5.3 (currently in beta) has support for filling in previous values for postgres datasource.

comment 8y ago · link · parent

I use stars as bookmarks, but i also use the watch feature to keep track of stuff i find interesting.

comment 8y ago · link · parent

Does nuitka build a static executable or do you still need to supply shared libraries with the executable?