mobigroup <pechnikov@xxxxxxxxxxxx> writes: >> Perhaps you didn't define it as PARALLEL SAFE. > The function is marked as "PARALLEL RESTRICTED” because it’s uses temp tables (and I tested it as PARALLEL SAFE with the same result… parallelisation doesn’t work anyway). If it writes into temp tables then it can't be run in a worker anyway. regards, tom lane