I am getting FailedAssertion while executing the attached script.However,I am not able to produce the core dump for the same,the script runs in background and takes around a day time to produce the mentioned error.
"TRAP: FailedAssertion("!(TransactionIdPrecedesOrEquals(oldestXact, ShmemVariableCache->oldestXid))", File: "clog.c", Line: 683) 2017-07-19 01:16:51.973 GMT [27873] LOG: server process (PID 28084) was terminated by signal 6: Aborted 2017-07-19 01:16:51.973 GMT [27873] DETAIL: Failed process was running: autovacuum: VACUUM pg_toast.pg_toast_13029 (to prevent wraparound)"
What are the starting conditions of your postgres instance? Does your script assume a newly initdb'd instance with no custom configuration? If not, what setup steps/configuration precede your script run?