{"id":29028012,"url":"https://github.com/misachi/pg_wal_ext","last_synced_at":"2026-04-28T17:01:26.791Z","repository":{"id":251952366,"uuid":"828832364","full_name":"misachi/pg_wal_ext","owner":"misachi","description":"Read WAL files and possibly  generate the SQL","archived":false,"fork":false,"pushed_at":"2024-10-09T14:01:37.000Z","size":4237,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T07:05:20.159Z","etag":null,"topics":["postgres","postgresql-extension","wal","write-ahead-log"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misachi.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-15T08:10:02.000Z","updated_at":"2025-03-18T23:12:24.000Z","dependencies_parsed_at":"2024-09-17T03:10:03.047Z","dependency_job_id":"31f30d97-1092-4e6b-a835-22a8562d60b4","html_url":"https://github.com/misachi/pg_wal_ext","commit_stats":null,"previous_names":["misachi/pg_wal_ext"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/misachi/pg_wal_ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misachi%2Fpg_wal_ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misachi%2Fpg_wal_ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misachi%2Fpg_wal_ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misachi%2Fpg_wal_ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misachi","download_url":"https://codeload.github.com/misachi/pg_wal_ext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misachi%2Fpg_wal_ext/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"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":["postgres","postgresql-extension","wal","write-ahead-log"],"created_at":"2025-06-26T07:05:19.215Z","updated_at":"2026-04-28T17:01:26.734Z","avatar_url":"https://github.com/misachi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg_wal_ext\nRead WAL files and generate SQL from WAL\n\nThe extension has been ran on Postgres v16(both compiled from source and other from Ubuntu/APT upstream packages). ~~PG17 still has an issue with the hash table implementation.~~\nRuns on Postgres v17 as well.\n\nA Postgres extension to read logged WAL records and attempt to decode the records and generate SQL for DML operations. One possible use case would be for database restoration(has limitations) or audit purposes.\n\n# Installation\nBy default, it uses PGXS for installation. Set `OLD_INSTALL` to any value if this is not desired.\n\n### Postgres [Only applies if you don't have Postgres installed already]\nUpdate APT repository\n```\nsudo sh -c 'echo \"deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main\" \u003e /etc/apt/sources.list.d/pgdg.list'\nwget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc \u0026\u003e/dev/null\n```\n\ninstall Postgres with its headers\n```\nsudo apt update\nsudo apt install postgresql postgresql-server-dev-XXX\n```\nReplace the XXX in `postgresql-server-dev-XXX` with your Postgres version\n\n### Install Extension\nRun these inside the directory you cloned the repository in:\n\n```\nmake PG_CONFIG=/usr/bin/pg_config\nmake PG_CONFIG=/usr/bin/pg_config install\n```\nNote you might need to run above two commands using `sudo`\n\nNext log in to your database and create the extension:\n```\nCREATE EXTENSION pg_wal_ext;\n```\n\n# Usage\nPass in the WAL file(to replace \"path/to/wal/file\" as shown) to be decoded: `select * from pg_xlog_records(\"path/to/wal/file\");`\n\n# Demo\n![Usage Demo](assets/sql-from-wal.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisachi%2Fpg_wal_ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisachi%2Fpg_wal_ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisachi%2Fpg_wal_ext/lists"}