pgcopydb icon indicating copy to clipboard operation
pgcopydb copied to clipboard

Problem: `pgcopydb clone` fails to resume on docker

Open arajkumar opened this issue 11 months ago • 2 comments

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?

arajkumar avatar Mar 04 '24 18:03 arajkumar

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 avatar Mar 04 '24 22:03 dimitri

@dimitri , I believe truncating the table on startup would be simple. Let me attempt a fix. Thank you.

arajkumar avatar Mar 05 '24 04:03 arajkumar