Describe the bug
We can see sporadic pre-agg refresh error caused by duplicate attempts to refresh the same main pre-agg table at the same time.
error: relation "org_b_main_22w1fioj_1rxs3lep_1hot17r" already exists
at Parser.parseErrorMessage (/cube/node_modules/pg-protocol/src/parser.ts:369:69)
at Parser.handlePacket (/cube/node_modules/pg-protocol/src/parser.ts:188:21)
at Parser.parse (/cube/node_modules/pg-protocol/src/parser.ts:103:30)
at Socket.<anonymous> (/cube/node_modules/pg-protocol/src/index.ts:7:48)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Describe the bug We can see sporadic pre-agg refresh error caused by duplicate attempts to refresh the same main pre-agg table at the same time.
Version: 0.31.20
Additional context
CUBEJS_CONCURRENCY: 8