Alex Gleason on Nostr: Been feeling frustrated by the lack of high quality database libraries in TypeScript. ...
Been feeling frustrated by the lack of high quality database libraries in TypeScript.
Then I discovered that Postgres ITSELF does not support query cancellation properly:
"Query cancellation works by opening a new connection [...] That means there is no guarantee that the query will be canceled, and due to the possible race conditions it might even result in canceling another query."
You cannot actually cancel a query. You can only cancel a connection. 🤦 Race conditions are inherent to the design.
Wow! Postgres sucks. How is it so popular? MySQL is looking better and better. It's like the bell curve meme with Postgres in the middle and MySQL on the outside. Nothing is ever easy, everything is hard.
Published at
2024-07-31 19:10:56Event JSON
{
"id": "436a9b7271d8d74e4624860339dd5cfdd41adc274da88679392b0ef71dfb21c7",
"pubkey": "0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd",
"created_at": 1722445856,
"kind": 1,
"tags": [
[
"zap",
"781a1527055f74c1f70230f10384609b34548f8ab6a0a6caa74025827f9fdae5",
"wss://gleasonator.dev/relay",
"5"
],
[
"zap",
"0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd",
"wss://gleasonator.dev/relay",
"95"
]
],
"content": "Been feeling frustrated by the lack of high quality database libraries in TypeScript.\n\nThen I discovered that Postgres ITSELF does not support query cancellation properly:\n\n\"Query cancellation works by opening a new connection [...] That means there is no guarantee that the query will be canceled, and due to the possible race conditions it might even result in canceling another query.\"\n\nYou cannot actually cancel a query. You can only cancel a connection. 🤦 Race conditions are inherent to the design.\n\nWow! Postgres sucks. How is it so popular? MySQL is looking better and better. It's like the bell curve meme with Postgres in the middle and MySQL on the outside. Nothing is ever easy, everything is hard.",
"sig": "9bc11da66a95493deb8dfd48b0707f8ec79e141effac981b15d41a840c3e09fc3cea7151fd1be2e3d3307b0151c8935471630c9646b312c0f1b9a0a22ad5bc1e"
}