{"id":37200052,"url":"https://github.com/nigelramsay/tgres","last_synced_at":"2026-01-14T23:01:23.504Z","repository":{"id":57608242,"uuid":"65048754","full_name":"nigelramsay/tgres","owner":"nigelramsay","description":"Time Series in PostgreSQL","archived":false,"fork":true,"pushed_at":"2016-08-03T21:37:55.000Z","size":207,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T16:51:50.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"tgres/tgres","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelramsay.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-05T21:01:12.000Z","updated_at":"2016-08-05T21:01:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nigelramsay/tgres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nigelramsay/tgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelramsay%2Ftgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelramsay%2Ftgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelramsay%2Ftgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelramsay%2Ftgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelramsay","download_url":"https://codeload.github.com/nigelramsay/tgres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelramsay%2Ftgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28437916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T23:01:22.497Z","updated_at":"2026-01-14T23:01:23.386Z","avatar_url":"https://github.com/nigelramsay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\nGetting Started:\n\n$ go get github.com/tgres/tgres\n\nNow you should have a tgres binary in $GOPATH/bin. Look in\n$GOPATH/src/github.com/tgres/tgres/etc for a sample config file. The\nuser of the PostgreSQL database needs CREATE TABLE permissions.\n\nMore about Tgres:\n\nTgres is a \"Time Series Database\" which uses PostgreSQL for\nstorage, written in Go.\n\nIt is presently work-in-progress, still under development, things in\nflux.\n\nAs of Jul 2016, Tgres is clustered. I'll be describing it in more\ndetail in a blog post.\n\nTgres can receive data using Graphite Text, UDP and Pickle\nprotocols, as well as Statsd (counters, gauges and timers). It\nsupports enough of a Graphite HTTP API to be usable with\nGrafana. Tgres implements the majority of the Graphite functions.\n\nTgres places emphasis on accuracy and stores data similarly to\nRRDTool, using a weighted average of points that arrive within the\nsame step rather than discarding them.\n\nInternally a datapoint refers to a time interval rather than a point\nin time. This is a more accurate and flexible representation which\nshould also allow correct updates of past data (NIY).\n\nTgres stores data in a round-robin database split over a number of\nPostgreSQL rows of arrays. This means that a series occupies a\nconstant number of rows in a database and can be updated in single row\nchunks for IO efficiency. The number of datapoints per row is\nconfigurable for each series individually. Tgres provides two\nPostgreSQL views to make time series appear as a regular table.\n\nTgres caches datapoints in memory until a certain number of\ndatapoints has accumulated or a certain time period has been reached\nto reduce IO.\n\nTgres relies on goroutines heavily and will take advantage of\nmultiple CPU's on SMP architectures.\n\nOne of the main goals of Tgres is to address the data isolation\nproblem with most of the TS databases out there. Your TS data can reside\nin the same PostgreSQL database as other data and can be easily\njoined, analyzed, etc.\n\nOther (future) goals/notes:\n\nIt has to be simple. There shouldn't be many daemons/components - just\nthis one process to receive and serve the data and the database server.\n\nPresently Tgres does not store the original datapoints as they\ncome in, data is always aggregated. This may change.\n\nGraphite API was used only as a starting point, to be able to prove the\nconcept and test against existing tools (mostly Grafana). Longer term\nthere may be more interesting methods of exchanging data, e.g. gob or\nRedis protocol, etc.\n\nSome terminology:\n\nRRD - Round Robin Database. This is the \"technology\" that makes it\n      possible, it doesn't referer to any specific.\n\nDS -  Data Source. This is your temperature in the room or bytes per\n      second passing through, etc. A data source has a name. At a very\n      high level it is a \"time series\" (only calling it that would be\n      confusing with respect to RRA's).\n\nRRA - Round Robin Archive. An RRA is an actual series. A DS has at\n      least one RRA, usually more than one. For example if we store 60\n      points at 1 minute resolution, that's one RRA, and if we store\n      12 points at 1 hour resolution, that's another RRA. An RRA is a\n      fixed size array of floats.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelramsay%2Ftgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelramsay%2Ftgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelramsay%2Ftgres/lists"}