Re: Ghost data from failed FDW transactions?
От | Rob Sargent |
---|---|
Тема | Re: Ghost data from failed FDW transactions? |
Дата | |
Msg-id | 1568BE1C-261C-474A-803F-66B8B757F1B1@gmail.com обсуждение исходный текст |
Ответ на | Re: Ghost data from failed FDW transactions? (Jacob Biesinger <jake.biesinger@gmail.com>) |
Ответы |
Re: Ghost data from failed FDW transactions?
|
Список | pgsql-general |
On Aug 28, 2024, at 10:18 AM, Jacob Biesinger <jake.biesinger@gmail.com> wrote:But to go deeper, we use the javascript knex adapter and some application-level transaction management that automatically retries a transaction N times when it encounters serialization errors. On this particular endpoint, the emitted SQL for the full transaction looks something like:BEGIN;INSERT INTO "devices" ("orgId", "patientId", "deviceId", "data")VALUES ('org1','patient1','device1','{"id": "device1", "patientId": "patient1", "serialNumber": "12345", "status": "active" }');INSERT INTO "devices" ("orgId", "patientId", "deviceId", "data")VALUES ('org1','patient1','device2','{"id": "device2", "patientId": "patient1", "serialNumber": "67890", "status": "active" }');SELECT * FROM "rootDb"."assets";-- execute some logic client-side, nothing touching the DBUPDATE "rootDb"."assets" WHERE ...;COMMIT;
BEGIN;
INSERT INTO "devices" ("orgId", "patientId", "deviceId", "data")
VALUES (
'org1',
'patient1',
'device1',
'{"id": "device1", "patientId": "patient1", "serialNumber": "12345", "status": "active" }’),
(
'org1',
'patient1',
'device2',
'{"id": "device2", "patientId": "patient1", "serialNumber": "67890", "status": "active" }'
)
В списке pgsql-general по дате отправления: