zlacker

[parent] [thread] 9 comments
1. andrew+(OP)[view] [source] 2019-05-27 15:05:54
>>>> 2. Postgres preserves your data if it goes down

>>>Not if you're using a SKIP LOCKED queue,

Can you provide a reference for this? I'm not aware that using SKIP LOCKED data is treated any differently to other Postgres data in terms of durability.

replies(1): >>KirinD+j
2. KirinD+j[view] [source] 2019-05-27 15:08:55
>>andrew+(OP)
It's exactly the same case as SQS in that if your disk interface dies in mid write of a message you lose it the same as if your interface to SQS or SQS itself dies mid-write, you lose it.

The rest of the sentence is a challenge, "show me a data loss bug in SQS that extends beyond the failure cases you've already implicitly agreed to using postgres itself."

replies(2): >>gmueck+sc >>crypto+MQ
◧◩
3. gmueck+sc[view] [source] [discussion] 2019-05-27 16:48:04
>>KirinD+j
What possibilities are there for a write to fail that the database server cannot react to? I am under the impression that a write error like this would be reported as a failure to run the statement and the application is responsible for handling that.
replies(1): >>KirinD+Pi
◧◩◪
4. KirinD+Pi[view] [source] [discussion] 2019-05-27 17:35:04
>>gmueck+sc
The box turning off, the disk interface failing, and/or the link to the database failing in mid instruction.

Same as SQS.

replies(3): >>xyzzy_+Mv >>z3t4+Py >>mcquee+CD
◧◩◪◨
5. xyzzy_+Mv[view] [source] [discussion] 2019-05-27 19:22:29
>>KirinD+Pi
All of those would result in a write failure from the application's perspective, which is fine, and must be accounted for regardless (e.g. retry, two phase commit, log an error, whatever).
◧◩◪◨
6. z3t4+Py[view] [source] [discussion] 2019-05-27 19:53:24
>>KirinD+Pi
Also the FS might report the data as written but its actually in a write cache and will be lost if the plug is pulled.
replies(1): >>gmueck+oI
◧◩◪◨
7. mcquee+CD[view] [source] [discussion] 2019-05-27 20:44:33
>>KirinD+Pi
But you have to explicitly delete the message from SQS, right? You'd only delete after confirming you processed the message, right? So if you die mid-instruction in processing a message, the message just re-appears in the SQS queue after the visibility timeout.
replies(1): >>KirinD+0W
◧◩◪◨⬒
8. gmueck+oI[view] [source] [discussion] 2019-05-27 21:31:53
>>z3t4+Py
Not an issue if you follow th e recommendations in the PostgeSQL documentation. The way to comfigure write caches is described there.
◧◩
9. crypto+MQ[view] [source] [discussion] 2019-05-27 23:11:44
>>KirinD+j
SKIP LOCKED is a read-side feature. PG is a problem for u/andrewstuart because they have to manage it themselves (unless they're getting a PG service from a cloudy provider, say) and that's harder than it is for Amazon to manage SQS.
◧◩◪◨⬒
10. KirinD+0W[view] [source] [discussion] 2019-05-28 00:34:39
>>mcquee+CD
That's a feature, and one your have to replicate in your postgres queue.
[go to top]