pgcopydb
pgcopydb copied to clipboard
Problem: `pgcopydb clone` fails to resume on docker
Running pgcopydb inside docker causes trouble while using pid to determine who is owning the table for copying. Docker container will be running on their own pid namespace causing it to allocate deterministic pids.
2024-03-04 17:43:57.496 50 ERROR table-data.c:831 Failed to start table-data COPY worker for table public.readings (63475), already being processed by pid 43
Workaround: Run the container with --pid=host
to make use of host's pid namespace. Otherwise don't run inside docker.
My question is, should we use the pid to determine the COPY owners of table or index object?
I think the problem might be that we fail to clean-up the process
table in some cases. We might also want to TRUNCATE said table at start-up when resuming operations?
@dimitri , I believe truncating the table on startup would be simple. Let me attempt a fix. Thank you.