gpcopy reports error "relation "gpcopy_temp_2" already exists (SQLSTATE 42P07)“
search cancel

gpcopy reports error "relation "gpcopy_temp_2" already exists (SQLSTATE 42P07)“

book

Article ID: 416377

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

In some extremely rare scenarios, we may got below error when running two or more gpcopy operations in parallel:

gpcopy_temp_2" already exists (SQLSTATE 42P07)“

 

Cause

Normally this issue should not happen because the temp tables created by each gpcopy operation only exist in a specific session where this gpcopy is run. Therefore, there should be no chance of such temp table name conflict issue unless two gpcopy operations are run in parallel in the same session.

However, we do have some cases that two gpcopy operations are exected in parallel in the same session using some 3rd party tools or scripts although it's not recommended. So in that case, this issue may happen when the second gpcopy fails to create a temp table as another temp table with the same name has already been created by the first gpcopy.

Resolution

The fix is being conducted, which is expected to be released with an upcoming gpcopy version.

As a workaround for now, please ensure those gpcopy operations are run in separate sessions.