ERROR: cannot start subtransactions during a parallel operation
I'm using the latest docker image of postresql_anonymizer with postgresql_faker installed in it.
I'm anonymizing a dump with:
cat my-dump.sql | cat - $RULES | docker run --rm -i --network none postgresql_anonymizer_faker /anon.sh > anon_dump.sql
It worked greate with small amount of SECURITY LABELs.
Using around 35 faker.xxx() methods together with some anon.xxx() methods I'm getting following error:
2023-08-02 09:53:20.539 UTC [251] ERROR: cannot start subtransactions during a parallel operation
2023-08-02 09:53:20.539 UTC [251] CONTEXT: PL/Python function "text"
2023-08-02 09:53:20.539 UTC [251] STATEMENT: BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;SET TRANSACTION SNAPSHOT '00000003-0000069F-1';COPY (SELECT id,journalized_id,journalized_type,user_id,CAST(faker.text() AS text) AS notes,created_on,private_notes FROM public.journals ) TO STDOUT WITH CSV;ROLLBACK;
2023-08-02 09:53:20.544 UTC [252] ERROR: could not attach to dynamic shared area
2023-08-02 09:53:20.574 UTC [35] LOG: background worker "parallel worker" (PID 252) exited with exit code 1
2023-08-02 09:53:20.574 UTC [35] LOG: background worker "parallel worker" (PID 253) exited with exit code 1