7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions
comment 6y ago · link · parent
How did you come to that conclusion? What about the Democrats in New York, which is the epicenter of the virus outbreak right now (certainly the US and probably the world)? I remember hearing someone on TV (probably DeBlasio or Cuomo) saying that public schools were not going to close.
comment 6y ago · link · parent
It looks like California and Texas are making better choices than NY or Florida. Trump was too slow to act on testing, but was criticized for acting too quickly with the travel bans. The most credible and forward-thinking leaders on pandemics include George W Bush[1] and Arnold Schwarzenegger[2]; and their best-laid plans crumbled under later Democratic administrations.
Credibility is a funny thing. For some things, people are very credible but still drop the ball in big ways. Honestly it's just hard to know how someone is going to act in a major disaster. I would have guessed that if anyone were to overreact on a Chinese virus pandemic, it would be Trump. And people that are highly competent during normal situations might start behaving strangely and lose credibility quickly during more interesting times (like lying about masks not helping ordinary people).
There isn't a magic team of scientists that has all the answers. There is a science to pandemics, but there's a fair amount of guesswork, as well, especially when China was hiding so much information. Politicians need to make decisions based on incomplete information. So do doctors, for that matter.
So let's have some humility and realize that a lot of formerly-credible people are also in the process of screwing this up. It's not just the shoot-from-the-hip politicians.
[1] https://georgewbush-whitehouse.archives.gov/homeland/pandemi... [2] https://www.politico.com/states/california/story/2020/03/31/...
comment 6y ago · link · parent
So his solution is contracts. The fact that people aren't signing them shows their true intentions.
What I can't quite figure out is why, during the good times, a $0.10 consumable for a $4000 operation needs to be made more efficient so badly that the only way to produce the thing is in a communist country with no environmental controls.
comment 6y ago · link · parent
Maybe you should learn and understand why people are happy with postgres in the first place, and then understand your complaints in that broader picture. Then you wouldn't resort to mockery and other unproductive comments.
comment 6y ago · link · parent
[1] https://www.postgresql.org/docs/current/app-pgchecksums.html
comment 6y ago · link · parent
Extra layers are always good, but since I was one of the main authors of checksums in Postgres, I'd like to know if there's room for improvement. (Aside: the page checksum is only 16 bits, so if you have frequent corruption it's entirely believeable that a few sneak past. But I haven't seen it personally.)
comment 6y ago · link · parent
Is hardware corruption really happening and making it into the WAL stream with checksums on?
The next point, on planner hints: it's really just something that hasn't been done. If a few engineers made plans to tackle the problem, a lot could be done in a couple releases' worth of work. In the mean time, people are getting by with various half-measures anyway, such as extensions[1], planner tunables[2], and statistics tweaks[3].
The only dogma is that a half-baked solution isn't wanted. It's got a lot of architectural impact and long-term supportability implications. And a lot of different use cases that need to be considered that may drive different technological solutions. "Make plans stable/managable" is a different use case than "I know something the planner doesn't" which is different from "Make the planner do this thing because I said so".
[1] https://github.com/ossc-db/pg_hint_plan/blob/master/doc/pg_h...
[2] https://www.postgresql.org/docs/current/runtime-config-query...
[3] https://www.postgresql.org/docs/12/sql-createstatistics.html
comment 6y ago · link · parent
Obviously there are ways to prepare yourself, and rules to follow, and red flags to watch for. But you won't really follow the rules unless you believe that "yes, it can happen to me". It might be when you are busy or fatigued or in the middle of a big transaction or whatever.
comment 6y ago · link · parent
For all-binary, the client would have to know about all data types and how to represent them in the host language. But that seems clunky. Consider NUMERIC vs. float vs. int4 vs int8: should the client really know how to parse all of those from binary? It makes more sense to optimize a few common data types to be transferred as binary, and the rest would go through text. That also works better with the extensible type system, where the client driver will never know about all data types the user might want to use. And it works better for things like psql, which need a textual representation.
The main problem with binary is that the "optimize a few columns as binary" can't be done entirely in the driver. The driver knows which types it can parse, but it doesn't know what types a given query will return. The application programmer may know what types the query will return, in which case they can specify to return them in binary if they know which ones are supported by the client driver, but that's ugly (and in libpq, it only supports all-binary or all-text). Postgres could know the data types, but that means that the driver would need to first prepare the query (which is sometimes a good idea anyway, but other times the round trip isn't worth it).
"Not having an inline cancellation (in same TCP/IP connection)"
This is related to another problem, which is that while a query is executing it does not bother to touch the socket at all. That means that the client can disconnect and the query can keep running for a while, which is obviously useless. I tried fixing this at one point but there were a couple problems and I didn't follow through. Detecting client disconnect probably should be done though.
Supporting cancellation would be trickier than just looking for a client disconnect, because there's potentially a lot of data on the socket (pipelined queries), so it would need to read all the messages coming in looking for a cancellation, and would need to save it all somewhere in case there is no cancellation. I think this would screw up query pipelining, because new queries could be coming in faster than they are being executed, and that would lead to continuous memory growth (from all the saved socket data).
So it looks like out-of-band is the only way cancellation will really work, unless I'm missing something.
"Multiple Result Sets... you just call the database alot"
Do pipelined queries help at all here?
"Named parameters are extremely useful for building up query parameters"
+1. No argument there.
"Protocol level language selection"
I'm still trying to wrap my head around this idea. I think I understand what you are saying and it sounds cool. There are some weird implications I'm sure, but it sounds like it's worth exploring.
comment 6y ago · link · parent
A lot of users case mostly about accessibility, simplicity, integration with existing experience/tools (e.g. JSON), managability, ecosystem, etc. Those users might be happy from the start; or if they aren't happy, they complain for a while until their problem is solved, and then go silent.
comment 6y ago · link · parent
I'm also curious how much it really helps health (and maybe even financial health) overall. Real home cooking is good compared to burgers and fries. But frozen pizzas are not great compared with some healthier restaurant options. And some restaurant food is pretty cheap and some packaged food surprisingly expensive.
comment 6y ago · link · parent
Let's not let the media tear us apart. Not everything is Trump's fault. Not everything is America's fault. And sometimes people who are not Trump or countries that are not America make bad decisions that cost lives. Let's acknowledge these basic facts and work together.
California and Texas seem to be making better choices than NY and Florida. America seems to be doing better than Italy and Spain but worse than Germany. It's not really a partisan thing and it's not really a national identity thing. It's an issue of who in what regions acted strongly enough, and when.
America is a federal system, so we would expect variance between the states, and that's what we're seeing. Same as in Europe. The federal government plays an important role (like preventing test kits from being developed outside the CDC -- bad -- and early travel restrictions -- probably good), but not the only role, and it shows.
comment 6y ago · link · parent
Exactly.
There's something that's always bothered me about the "evolution by natural selection is science and everyone who doesn't immediately buy into every aspect of it is an idiot".
I personally believe in evolution. It probably makes quite a few good predictions. And I'm sure some experiments have rigor.
But a lot of it seems pretty untestable. Add a stress to a population, and it will either die off or evolve to improve fitness. If it dies off, does that contradict the theory because no evolution happened? If it evolves, how much will it evolve? Will the population reach a smaller equilibrium, larger, or the same? Does any change count as "evolution" or is someone quantifying which ones actually improve fitness? What about changes that don't seem obviously connected to fitness, like ridiculous peacock feathers, would those be predicted? Are we coming up with falsifiable predictions before the tests, or just explanations afterward?
I'm sure someone with more knowledge of the field has answers to all of these questions. But my guess is that they are more nuanced than the "evolution is science and if you question any aspect you are an idiot".
comment 6y ago · link · parent
Clarification: the memory layouts between C++ dynamic dispatch and rust dynamic dispatch are very different.
Rust imposes no requirements on the structure layout, whereas C++ adds some magic data. The magic data means it's awkward to make C++ do dynamic dispatch on a C struct pointer; but rust can do dynamic dispatch on a C struct pointer with no problem.
comment 6y ago · link · parent
Unix is a reasonable example of a polyglot environment, but at a high cost. Lots of serialization/deserialization through text. That has a high cost in terms of bugs, complexity, lines of code, and inefficiency.
comment 6y ago · link · parent
That's actually a great way to learn. I do that intentionally sometimes to force myself to understand a problem better. Sometimes it even works[1]!
I'm half serious here. Clearly when something is important and needs to be timely, choosing the right tool is important. But my comment is not sarcastic, either: choosing the wrong tool really is a great way to understand your tools and the problem more deeply.
comment 6y ago · link · parent
Technically, you are supposed to use unions for that, though it's a pain. The PostgreSQL codebase is compile with -fno-strict-aliasing so that a simple cast will get the job done, but obviously that's technically out of spec.
comment 6y ago · link · parent
Have a gnarly problem in a Python program that Haskell would be perfect for? Too bad. You'll spend more time figuring out how to transform the data and get the Python code to call into Haskell than you'll save by using the right tool. And in the process, the overhead, complexity, and bugs introduced in this process turn the right tool into the wrong tool.
And that's the reason why C is so important. It actually does work with pretty much any language, because it has a defined ABI, simple data types, minimal runtime, can work on any data formats unmodified, no GC. Very few languages have this superpower.
C++ mostly has that superpower, but some features don't entirely work with unmodified structures (RTTI and virtual functions both require adding magical fields to the class structure). Rust seems to have this superpower (does dynamic dispatch a different way than C++, so can always work on unmodified structures).
The JVM is an interesting case and the ecosystem of languages built on it do work better together because they have the exact same runtime (GC, etc.).
To summarize: we'd all like to use the right tool for the job. But we can't, except for the languages that go out of their way to make this effective, and that list of languages is very short.
comment 6y ago · link · parent
Fact checkers who publish on their own are a problem. They can't resist bringing their own perspectives and arguments into the dicussion.
A lot of stuff is technically true but misleading. So the fact-checkers write something of the form:
"Pants on fire: technically true, but [inject rebuttal essay here]."
That's all fine except that it's done under the moral banner of correcting lies. People who disagree with the viewpoints of the fact checker are understandably put off when they to take this moral high ground.
comment 6y ago · link · parent
Maybe the message should be: healthcare workers get the real masks, but the public still needs a covering (bandana or whatever)?