{"id":16750846,"url":"https://github.com/ildus/logical_helpers","last_synced_at":"2025-09-11T16:36:42.009Z","repository":{"id":27369509,"uuid":"30845017","full_name":"ildus/logical_helpers","owner":"ildus","description":null,"archived":false,"fork":false,"pushed_at":"2015-02-15T22:57:20.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-15T08:03:56.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ildus.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}},"created_at":"2015-02-15T22:38:37.000Z","updated_at":"2015-02-15T22:57:20.000Z","dependencies_parsed_at":"2022-07-24T15:01:55.273Z","dependency_job_id":null,"html_url":"https://github.com/ildus/logical_helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ildus%2Flogical_helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ildus%2Flogical_helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ildus%2Flogical_helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ildus%2Flogical_helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ildus","download_url":"https://codeload.github.com/ildus/logical_helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826826,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-10-13T02:42:25.054Z","updated_at":"2025-03-16T04:28:26.397Z","avatar_url":"https://github.com/ildus.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Logical decoding helper functions\n\n## pg_logical_slot_confirm_lsn\n\nRemoves (confirms) all records from logical slot until specified LSN\n\n### Installing\n\n```\nmake \nsudo make install\n```\n\n### Using\n\n```\ndlr=# create function confirm_lsn(cstring, pg_lsn) returns pg_lsn as 'logical_helpers.so', 'pg_logical_slot_confirm_lsn' language c strict;\nCREATE FUNCTION\ndlr=# insert into test1 values (46, 'bb');\nINSERT 0 1\ndlr=# insert into test1 values (47, 'bb');\nINSERT 0 1\ndlr=# select * from pg_logical_slot_peek_changes('custom_slot', NULL, NULL, 'include_transaction', 'on');\n location  | xid  |                         data                         \n-----------+------+------------------------------------------------------\n 0/2E8BF90 | 3568 | begin\n 0/2E8BF90 | 3568 | {\"a\":0,\"d\":{\"id\":46,\"name\":\"bb\"},\"r\":\"public.test1\"}\n 0/2E8C078 | 3568 | commit\n 0/2E8C078 | 3569 | begin\n 0/2E8C078 | 3569 | {\"a\":0,\"d\":{\"id\":47,\"name\":\"bb\"},\"r\":\"public.test1\"}\n 0/2E8C148 | 3569 | commit\n(6 rows)\n\ndlr=# select confirm_lsn('custom_slot', '0/2E8C148');\n confirm_lsn \n-------------\n 0/2E8C148\n(1 row)\n\ndlr=# select * from pg_logical_slot_peek_changes('custom_slot', NULL, NULL, 'include_transaction', 'on');\n location | xid | data \n----------+-----+------\n(0 rows)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fildus%2Flogical_helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fildus%2Flogical_helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fildus%2Flogical_helpers/lists"}