Skip to content
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

Error Updating Product Categories: Missing Replica Identity in product_category_product Table #7056

Open
bqst opened this issue Apr 11, 2024 · 1 comment · May be fixed by #7057
Open

Error Updating Product Categories: Missing Replica Identity in product_category_product Table #7056

bqst opened this issue Apr 11, 2024 · 1 comment · May be fixed by #7057

Comments

@bqst
Copy link
Contributor

bqst commented Apr 11, 2024

Bug report

Describe the bug

When trying to delete or replace a category from a product using the product edit modal in the Medusa admin interface, the operation fails. The backend throws an error indicating that it cannot delete from the product_category_product table because it lacks a replica identity, even though it's configured to publish deletes. This issue prevents the successful updating of product categories through the UI, leading to data inconsistency and a degraded user experience.

System information

Medusa version (including plugins): 1.20
Node.js version: 18.17.1
Database: postgres (PostgreSQL) 14.9
Operating system: MacOS
Browser (if relevant): Chrome

Steps to reproduce the behavior

  1. Go to a product
  2. Click on 'Edit General Information'
  3. Try to edit / remove categories
  4. See error "An unknown error occurred."

Console:

error:   cannot delete from table "product_category_product" because it does not have a replica identity and publishes deletes

Expected behavior

The expected behavior is that when a category is deleted or replaced from a product in the edit modal, the changes should be reflected in the database without any errors. The product_category_product table should update accordingly to reflect the new product-category relationships.

Additional context

This issue may be related to the PostgreSQL configuration for the product_category_product table, particularly its replication settings and the lack of a defined replica identity. This table is likely involved in logical replication, and the inability to perform delete operations due to the missing replica identity complicates data management tasks through the Medusa admin interface.

@olivermrbl
Copy link
Contributor

Thanks for filing the issue. We'll attend to it asap. Curious, what does your database setup look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants