View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009865 | Taler | merchant backend | public | 2025-05-04 22:35 | 2025-05-10 04:10 |
Reporter | Florian Dold | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 1.0 | Fixed in Version | 1.0 | ||
Summary | 0009865: deleting (purging) a merchant instance fails with DB constraints and/or trigger warnings | ||||
Description | Deletion fails when there are inventory locks. It *also* sometimes fails in a trigger (see additional information). | ||||
Additional Information | May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: (CFSKHFCSH2SVP6E9YM1TZYKYG4) INFO Handling request (DELETE) for URL '/instances/sandbo x/private' May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: (CFSKHFCSH2SVP6E9YM1TZYKYG4) ERROR Query `purge_instance' failed with result: update o r delete on table "merchant_inventory" violates foreign key constraint "merchant_inventory_locks_product_serial_fkey" on table "merchant_invent ory_locks"/Key (product_serial)=(67) is still referenced from table "merchant_inventory_locks"./ERROR: update or delete on table "merchant_inv entory" violates foreign key constraint "merchant_inventory_locks_product_serial_fkey" on table "merchant_inventory_locks" May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: DETAIL: Key (product_serial)=(67) is still referenced from table "merchant_inventory_ locks". May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: /PGRES_FATAL_ERROR/ERROR: update or delete on table "merchant_inventory" violates for eign key constraint "merchant_inventory_locks_product_serial_fkey" on table "merchant_inventory_locks" May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: DETAIL: Key (product_serial)=(67) is still referenced from table "merchant_inventory_ locks". May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: (CFSKHFCSH2SVP6E9YM1TZYKYG4) INFO Executing command `NOTIFY XDQM4Z4N0D3GX0H9JEXH70EBC2 T3KY7HC0TJB0Z60D2H781RXR6AG, ''' May 04 20:06:15 e3ae7f19a352 taler-merchant-httpd[3282]: (CFSKHFCSH2SVP6E9YM1TZYKYG4) INFO Request for `/instances/sandbox/private' completed w ith HTTP status 500 (0) ------ taler-merchant=# delete from merchant.merchant_instances where merchant_id='sandbox'; ERROR: relation "merchant_webhook" does not exist LINE 6: FROM merchant_webhook ^ QUERY: SELECT webhook_serial, merchant_serial, url, http_method, body_template FROM merchant_webhook WHERE event_type = 'category_deleted' AND merchant_serial = my_merchant_serial CONTEXT: PL/pgSQL function merchant.handle_category_changes() line 104 at FOR over SELECT rows | ||||
Tags | No tags attached. | ||||
|
Looks like a CASCADE is missing on some constraints (on DELETE CASCADE)? |
|
Fix committed to master branch. |
|
Constraint fixed in f3ae00f1..76cb0387. Also added "merchant." in stored procedure to fix table lookup. |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-05-04 22:35 | Florian Dold | New Issue | |
2025-05-04 22:37 | Christian Grothoff | Note Added: 0024761 | |
2025-05-04 22:37 | Christian Grothoff | Status | new => confirmed |
2025-05-04 22:37 | Christian Grothoff | Product Version | => git (master) |
2025-05-08 16:01 | Christian Grothoff | Changeset attached | => merchant master 76cb0387 |
2025-05-08 16:01 | Christian Grothoff | Note Added: 0024836 | |
2025-05-08 16:01 | Christian Grothoff | Assigned To | => Christian Grothoff |
2025-05-08 16:01 | Christian Grothoff | Status | confirmed => resolved |
2025-05-08 16:01 | Christian Grothoff | Resolution | open => fixed |
2025-05-08 16:24 | Christian Grothoff | Note Added: 0024838 | |
2025-05-08 16:24 | Christian Grothoff | Fixed in Version | => 1.0 |
2025-05-08 16:24 | Christian Grothoff | Target Version | 1.1 => 1.0 |
2025-05-10 04:10 | Christian Grothoff | Status | resolved => closed |