{"id":20643976,"url":"https://github.com/adjust/pg_querylog","last_synced_at":"2026-04-21T14:34:16.033Z","repository":{"id":66825003,"uuid":"178403152","full_name":"adjust/pg_querylog","owner":"adjust","description":"Show queries running on PostgreSQL backends","archived":false,"fork":false,"pushed_at":"2020-07-24T19:33:16.000Z","size":29,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-09T14:41:57.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-29T12:40:42.000Z","updated_at":"2024-05-17T16:48:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb18c6ee-d77f-4c0d-ac61-66e6e53e154a","html_url":"https://github.com/adjust/pg_querylog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adjust/pg_querylog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_querylog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_querylog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_querylog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_querylog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/pg_querylog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_querylog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32095957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":"2024-11-16T16:14:26.668Z","updated_at":"2026-04-21T14:34:16.020Z","avatar_url":"https://github.com/adjust.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/adjust/pg_querylog.svg?branch=master)](https://travis-ci.org/adjust/pg_querylog)\n\npg_querylog\n===========\n\nShow queries running on PostgreSQL backends.\n\nInstallation\n------------\n\n\tmake \u0026\u0026 make install\n\techo \"shared_preload_libraries='pg_querylog'\" \u003e\u003e postgresql.conf\n\tpsql postgres -c \"create schema querylog; create extension pg_querylog schema querylog;\"\n\t\nAlso you can use `session_preload_libraries`, but then `enabled` option should be always `on` since each starting\nbackend will rewrite the value.\n\n\techo \"session_preload_libraries='pg_querylog'\" \u003e\u003e postgresql.conf\n\nUsing\n-----\n\nMake sure it's loaded:\n\n\tshow session_preload_libraries\n\nand enabled (by default it is disabled):\n\n\tshow pg_querylog.enabled\n\nGet all saved queries using `get_queries` function:\n\n\tselect * from querylog.get_queries()\n\nResult columns:\n\n* `pid` - backend process ID\n* `query` - running (or runned) query\n* `params` - query parameters in case of parametrized query\n* `start_time` - query start time\n* `end_time` - query end time (if `running` == false)\n* `running` - running status\n* `overflow` - shows that `buffer_size` is enough for this item\n\nParameters:\n\n* `pg_querylog.buffer_size` - buffer size for each saved query, calculated as sum of lenghts of query and its params.\n* `pg_querylog.enabled` - controls saving queries.\n\nFor only running queries `running_queries` use this view:\n\n\tselect * from querylog.running_queries;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fpg_querylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fpg_querylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fpg_querylog/lists"}