vcswatch reports that
this package seems to have new commits in its VCS but has
not yet updated debian/changelog. You should consider updating
the Debian changelog and uploading this new version into the archive.
Here are the relevant commit logs:
commit 25295926f189d02343df0a04cdd326e313094fb7
Author: Jeff Mealo <jeffreymealo@gmail.com>
Date: Tue May 5 13:12:44 2026 -0400
Fix build failure with PostgreSQL 18 (#938)
PostgreSQL 18 removed the HAVE_LONG_INT_64 and HAVE_LONG_LONG_INT_64
macros from pg_config.h, switching to standard C int64_t types.
This patch updates snprintf.c to use SIZEOF_LONG and SIZEOF_LONG_LONG
comparisons instead, matching PostgreSQL 18's src/port/snprintf.c.
Fixes: #916
Co-authored-by: Dimitri Fontaine <dim@tapoueh.org>
commit a542c9dcc6768e1186d47fcd941032635a18c4ff
Author: Scott Jacobsen <scottericjacobsen@gmail.com>
Date: Tue May 5 09:45:50 2026 -0600
Fix test_decoding parser for REPLICA IDENTITY USING INDEX (#946)
When a table uses REPLICA IDENTITY USING INDEX with a non-primary-key
unique index, UPDATE messages from test_decoding failed to parse with
"Failed to parse decoding message for UPDATE on table X: WHERE clause
columns not found".
Root cause: prepareUpdateTuppleArrays in ld_test_decoding.c determined
whether each column belonged to the WHERE clause key by checking only
attisprimary. That flag was populated from a SQL query joining pg_index
on indisprimary, so when the replica identity was a non-PK unique
index, every column of the incoming UPDATE got sorted into the "new
tuple" bucket and oldCount stayed zero.
Fix: also track attisreplident on SourceTableAttribute, populated from
pg_index.indisreplident. In the parser, treat a column as a WHERE-key
column when it is either the primary key (REPLICA IDENTITY DEFAULT) or
marked as the replica identity (REPLICA IDENTITY USING INDEX). This
leaves attisprimary semantically unchanged for other callers.
Touchpoints:
- schema.h: add attisreplident to SourceTableAttribute
- schema.c: left-join pg_index a second time on indisreplident in all
five attribute-fetch variants, and include attisreplident in the
JSON payload that gets persisted alongside the schema
- catalog.c: add attisreplident column to s_attr (3 catalog variants),
update INSERT/SELECT/hydration for catalog_add_attributes,
catalog_lookup_s_attr_by_name, and catalog_s_table_attrs_fetch
- progress.c: include attisreplident in the progress JSON
- ld_test_decoding.c: use attisprimary OR attisreplident when deciding
which columns go into the WHERE clause for UPDATE
Also adds tests/cdc-replica-identity-index, a docker-based regression
test that creates a table with REPLICA IDENTITY USING INDEX on a non-PK
unique index, streams INSERT/UPDATE/DELETE through test_decoding, and
asserts that source and target rows match after catchup. The test
fails without this fix with exactly the same "WHERE clause columns not
found" error seen against real-world partitioned tables.
Co-authored-by: Dimitri Fontaine <dim@tapoueh.org>
commit d9343c48b32521eb4c4e79f37894e291aa27ed9d
Author: Dimitri Fontaine <dim@tapoueh.org>
Date: Tue May 5 17:27:07 2026 +0200
Add maintenance and support options to the main README. (#948)
commit a4280a0b9e4545dfe47cc7eb81b49df2236890a4
Author: Dimitri Fontaine <dim@tapoueh.org>
Date: Tue May 5 17:24:15 2026 +0200
Pr 925 fix syntax error (#947)
* Fix Syntax error at or near "\"
Postgres 17.6 added \restrict and \unrestrict metacommands to pg_dump to
mitigate a security issue. This code skips these lines when restoring
roles.
17.6 release: https://www.postgresql.org/docs/17/release-17-6.html#RELEASE-17-6-CHANGES
CVE: https://www.postgresql.org/support/security/CVE-2025-8714/
* Install proper comments for escaping \restrict and \unrestrict.
* Reformat.
Blind attempt with a broken dev env locally, it seems that uncrustify
current versions are parsing namespace as C++ keyword in .h files.
---------
Co-authored-by: Ahmad Sanad <ams.sanad@gmail.com>
commit ab7e808f447d17fe49f61ded8df15af53842c322
Author: sminux <espin55@yandex.ru>
Date: Tue May 5 16:51:12 2026 +0300
SAST Bad-copy-paste (#935)
In function 'compare_fetch_schemas': Value 'dbs' might be 'dbt
Co-authored-by: smarchenkov <smarchenkov@astralinux.ru>
commit c1e07da3d257d0d3a1fc321f3c7e1a4063eed6bd
Author: Dhanush Reddy <76517652+dhanushreddy291@users.noreply.github.com>
Date: Mon Apr 28 17:32:20 2025 +0530
add arm64 build for docker image (#911)
* add multi arch docker image builds
* Update docker-publish.yml
* Update docker-publish.yml
commit 080e7c25f8c19a8051ade838f3b85f0be63b5188
Author: Peter Bendel <peterbendel@neon.tech>
Date: Tue Apr 1 13:33:29 2025 +0200
Use our own memory area for editing libpq static error messages (#903)
* fix https://github.com/dimitri/pgcopydb/issues/901
* review comments
* adjust comment style
* Update pgsql.c
* make indent
---------
Co-authored-by: Dimitri Fontaine <dim@tapoueh.org>
commit d10558a8b783ee87d6129105725289b9a794db9b
Author: SergeyLubimov <92313382+SergeyLubimov@users.noreply.github.com>
Date: Sun Feb 23 19:12:22 2025 +0700
Fix typo in copydb.sh for timescaledb test (#909)
commit 309c70bee9b81ade7ac74ee9739ff9c0f258e3a8
Author: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
Date: Sun Feb 23 15:01:26 2025 +0300
Remove one double free (#908)
pgcopy_log_error contains a PQclear call, so we don't need to do it
again.
Note: PQClear is smart enough to not free a null pointer, and thus this
change is not really critical.
commit b983211431e911b1e6e243dd30f3829c3cc3ed65
Author: Peter Bendel <Fach1@familie-bendel.de>
Date: Thu Feb 20 17:21:11 2025 +0100
Set idle_in_transaction_session_timeout to zero on the target. (#904)
commit fbeba57c115f2e849ca5f6ea1df14a49b5c4e0ac
Author: Peter Bendel <Fach1@familie-bendel.de>
Date: Thu Feb 20 16:03:45 2025 +0100
Fix a segfault when SQL state is NULL (#902)
commit ac625783e85be0fb99f8b21a282438ea3f7de22c
Author: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
Date: Fri Dec 13 17:35:06 2024 +0530
Fix zero allocation during "pgcopydb list progress" (#891)
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
commit 24d8b18f4ce59e416ba2ff868cb2f64978cf115a
Author: VaibhaveS <56480355+VaibhaveS@users.noreply.github.com>
Date: Wed Dec 11 15:54:27 2024 +0530
Fix pipe done read condition. (#890)
commit 8361a93a0db42c8683c9979b411b5b13c74582d4
Author: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
Date: Fri Oct 4 16:23:54 2024 +0530
Fix invalid UPDATE stmt when none of the columns change (#883)
We need at least two columns to be able to skip a column
if the value is the same in the old and new rows.
Otherwise, we would end up with an invalid UPDATE statement
like below:
```
UPDATE table SET WHERE "id" = 1;
```
Usually, the above could happen when REPLICA IDENTITY is set
to FULL, and the UPDATE statement executed with the same
values as the old ones.
For e.g.
```
UPDATE table SET "id" = 1 WHERE "id" = 1;
```
Solution: Skip the update when all columns in SET clause is equal to the WHERE clause.
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
commit 903162691a3a1cbd6c8edbe65312090cf834eabe
Author: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
Date: Thu Oct 3 19:43:40 2024 +0530
Tests are broken after PG17 release (#886)
We do not pin the postgresql-client causing the test failures after PG17
release due to the issue discussed here in the PG mailing list[1].
This commit pins the postgresql-client version as per the docker env variable PGVERSION.
[1] https://postgrespro.com/list/thread-id/2693550
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
commit 0f79684606bcb23d9edabd867ec3f4260b4008a7
Author: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
Date: Wed Sep 18 17:08:52 2024 +0300
Remove unused functions and structs (#882)
* Remove unused functions and structs
Co-authored-by: Hanefi Onaldi <hanefi@citusdata.com>
* Reintroduce one declaration that should not be removed
---------
Co-authored-by: Cem Eliguzel <cemeliguzel@microsoft.com>
commit 38b2c8f91a773a0ae58885380f002f46c1d81a17
Author: Dimitri Fontaine <dim@tapoueh.org>
Date: Wed Sep 11 17:14:00 2024 +0200
Fix docker compose external volume (#860)
* Fix docker-compose volume sharing between services.
In unit tests where we use both an inject and a test services, we need the
inject service to access the same pgcopydb work directory as the test
service. For that we use an external docker volume.
The previous implementation of that idea was found to be wrong, this is
fixing it by properly using docker APIs for shared "external" volumes.
* Attempt to fix github action errors.
On my local environment docker volume create turned out to not be necessary,
which is good news because we can (and probably want to) keep the volumes
around between test rounds. A cleanup script has even been implemented to
restart fresh.
On GitHub actions, it looks like we might need to first create the docker
volume to then be able to use it. The error message is not very helpful (it
just says: docker-compose: no such file or directory), but it's worth trying
that.
* Add `make attach` to tests using a docker volume.
This runs an interactive docker container (bash) with the volume mounted for
exploration / debug / inspect.
* Refrain from re-assigning the PATH variable in Makefiles.
* The make fix-volume operation does not need an interactive terminal.
* Fix `docker compose version` command.
commit ac1c1930b06210cc3f68975757075d76cf942932
Author: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
Date: Thu Sep 5 14:49:41 2024 +0300
test_decoding transform: skip toast columns with unchanged values (#877)
test_decoding plugin may not include the value of a TOAST column if it
has not changed. In that case, instead of the value of the column the
string "unchanged-toast-datum" is included in the output. In that case,
we should remove the column from the range table entry list in the
generated SQL queries instead of including it and setting that column to
the value "unchanged-toast-datum".
There is one strange case that if a table has only toast columns, and an
update query that does not update any value is executed, we end up
filtering all the range table entries and skip executing any sql queries
as it will be no-op.
commit 36ab63c7107fd4b56ad92a30bd4982f9573c63de
Author: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
Date: Thu Sep 5 15:47:56 2024 +0530
Fix deadlock during pipeline sync (#880)
* Fix deadlock during pipeline sync
Prior to the fix, `pgsql_sync_pipeline` implementation calls
`PQpipelineSync` followed by single `PQconsumeInput` and reads the
results using `PQgetResult` until we get `PGRES_PIPELINE_SYNC`.
However, `PQgetResult` would block when there are not enough data already consumed
according to[1],
> Note that PQgetResult will block only if a command is active and the
necessary response data has not yet been read by PQconsumeInput.
The default read buffer for libpq connection is 16K. When the result
size exceeds 16K[2], the `PQgetResult` would block forever unless we
consume for input using `PQconsumeInput`.
This commit attempts to fix the problem by reintroducing the socket read
readiness, but also uses `PQisBusy` to decide whether to consume input
using `PQconsumeInput`.
The the new implementation consumes the data in a loop until it
receives the `PGRES_PIPELINE_SYNC` on the condition `PQisBusy(conn) == 1` or the connection's socket read readiness. When the the command is not busy i.e. `PQisBusy(conn) == 0`, the results will be read. The changes are inspired from the libpq pipeline integration test [3].
[1] https://www.postgresql.org/docs/current/libpq-async.html#LIBPQ-PQGETRESULT
[2] https://github.com/postgres/postgres/blob/a68159ff2b32f290b1136e2940470d50b8491301/src/interfaces/libpq/fe-connect.c#L4616
[3] https://github.com/postgres/postgres/blob/a68159ff2b32f290b1136e2940470d50b8491301/src/test/modules/libpq_pipeline/libpq_pipeline.c#L1967-L2023
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
* Add test
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
---------
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
commit a53c0903d412f580789a321bc789fdec9cea53c8
Author: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
Date: Mon Sep 2 16:17:46 2024 +0300
Fix bug in passing logSQL from spec to context (#878)
* Pass logSQL from spec to context
* Remove unused function argument
Co-authored-by: Cem Eliguzel <cemeliguzel@microsoft.com>
commit 575b7ddcf24175cd15f18a57b0f28bebdd14eae1
Author: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
Date: Mon Sep 2 13:01:46 2024 +0300
Increase max allowed chars in Archive TOC lines (#867)
* Testcase with a function with a long signature
* Increase max allowed chars in Archive TOC lines
The maximum line length for an Archive TOC entry is currently limited to
1024, which is too short for some objects such as functions and
procedures with a high number of parameters.
Increase the maximum line length to 8 kilobytes, which should be enough
for all objects.
* Fix tests
* Improve jq scripts
* Revert "Fix tests"
This reverts commit ab267434057a7aa5ebb84554af205ee1d46580b4.
commit 6bdcbee620e5142a8e89b4382ea61a9c84189fa1
Author: Aditi Kesarwani <104135148+Kesarwani-aditi@users.noreply.github.com>
Date: Thu Aug 8 18:39:34 2024 +0530
Add support for the timescaledb extension. (#849)
This extension requires specific pre and post pg_restore steps to be
implemented, and also seems to require pgcopydb to use a superuser role to
be able to fetch the data and use pg_dump.
Co-authored-by: Aditi Kesarwani <aditi.kesarwani2022@gmail.com>
Co-authored-by: VaibhaveS <vaibhavedavey@gmail.com>
Co-authored-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
commit 64ca602343a30cdb04f37a76ce749e1b40a0ecae
Author: Dimitri Fontaine <dim@tapoueh.org>
Date: Wed Aug 7 16:12:33 2024 +0200
Change the version string in the docs setup. (#865)