I am continuously getting a 1023 error (Serializable isolation violation) on Redshift.
I have a stored procedure which reads several table and writes the query result to a destination table.
There is only one stored procedure writing to this table (INSERT only). Usually, tens of thousand rows inserted per one execution. This procedure is launched consequently, I mean there is no cases when more than one instance of this procedure work at the same time.
Also, there are no sessions which read the destination table during the procedure execution.
When I launch this procedure, I check the STV_SESSIONS and there is only one session under my username there.
So, what is the reason of the error and how can I avoid it?