-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot bulk insert from one local table to another local table if one has an identity #7887
Comments
@nick-oehmen we need to investigate and fix the error you are hitting in your first test, but as a workaround could you omit the |
Thank you for the response @colm-mchugh! The example I provided is a pretty simple one just to demonstrate the issue, the actual issue is occurring in a much larger DB as we're testing implementing distribution prior to pushing to the live production DB. The bulk insert operations occur throughout the DB in stored procedures and there's no way to prevent them from running after distribution is implemented, if anything this may just delay our implementation of table distribution until this issue is fixed. Do you happen to know a timeline for resolution? |
Do you happen to know a timeline for resolution? We will aim to fix this in Citus 13.0.1, so approx. 6-8 weeks from now. |
Analysis suggests that in Citus’s multi-copy logic, the row descriptor becomes mismatched for the identity column. Instead of allowing Postgres to handle the default identity value, Citus incorrectly maps the returning Actual Behavior Citus triggers a corruption in the row descriptor for the local table’s identity column. The code attempts to call Technical Analysis
Why SERIAL Works but IDENTITY Fails
Potential Fix Outline
References
|
Hello! While implementing Citus distributed and reference tables, we encountered an issue inserting data from one local table to another when the target local table has an identity. Repro steps below:
Citus version: Citus 12.1.6 on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
At first I assumed this might be an unsupported operation, but I tried it again in the exact same scenario in which the local table has a serial PK rather than an identity, and did not receive the error. As a result, I suspect this is a bug related to support of identities.
Successful test with serial instead:
The text was updated successfully, but these errors were encountered: