News for hackers. Stuff that matters.

zeroimpl

It’s pretty common for most SQL queries to be reading data that is entirely cached in memory. In these cases, the performance limitations often come from sorts or hash joins.
Re:The rule says, “No vehicles in the park” on Saturday June 24, 2023 @09:46PM (#36464439)
This is why you need a lawyer familiar with the local regulations, which clarify these things. Thus this test is invalid because there should be an “there is not enough information to answer” answer.
Re:PostgreSQL reconsiders its process-based model on Monday June 19, 2023 @03:50PM (#36395747)
However, it's already the case that if a postgres process crashes, the whole cluster gets restarted. I've occasionally seen this message:

    WARNING: terminating connection because of crash of another server process
    DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
    HINT: In a moment you should be able to reconnect to the database and repeat your command.
    LOG: all server processes terminated; reinitializing
Re:OpenAPI v4 Proposal on Wednesday May 31, 2023 @10:59PM (#36147131)
Agreed. I'm still using 2.0. I don't write the JSON directly (except for the JSON Schema part), nor do I look at it directly. These major backwards-incompatible changes don't seem like the right move to me, they fragment the tooling and make it difficult for a given library to support multiple versions.

This is almost like calling JSON as XML 2.0.

Re:Defining a new HTTP method: HTTP Search (2021) on Saturday May 27, 2023 @04:00PM (#36097709)
I think you’d have to have a fairly awkward API design in order for this to be an issue. For example, if “POST /posts” does something else, like flags a post for a moderator to review.

That being said, I don’t see this feature being particularly beneficial either. Only the caches which observed the request could know to purge the cache. So you can’t actually rely on it for cache invalidation.

Re:Defining a new HTTP method: HTTP Search (2021) on Saturday May 27, 2023 @01:13PM (#36096385)
TIL sending a POST request to a URL invalidates the cache for GET requests of the same URL.

Going to have to review my REST APIs to make sure that’s not a problem.

Re:PyPI will require 2FA by the end of 2023 on Friday May 26, 2023 @10:08AM (#36084362)
Authy also supports their own auth system that isn’t TOTP but rather a server-push model which requires your device to be online to receive the token.
Re:Go with PHP on Thursday May 11, 2023 @09:30PM (#35910755)
Comments can also be accessed at runtime :)
Might as well just use bash

    sleep $((RANDOM % 600)) && fetch-tcl-logs
Am I charged less for that data transfer when it’s 5G? To me the important consideration is the cost of the data. 1Gbps seems pointless if the cost is still $10+/GB.
> Oracle and MySQL do not have this problem in their MVCC implementation because their secondary indexes do not store the physical addresses of new versions. Instead, they store a logical identifier (e.g., tuple id, primary key) that the DBMS then uses to look up the current version’s physical address.

This doesn’t have anything to do with MVCC. I’m sure PostgreSQL could implement an index format that piggybacks on another index rather than pointing at the physical page directly, without overhauling MVCC.

Re:Nine ways to shoot yourself in the foot with PostgreSQL on Tuesday April 25, 2023 @08:11PM (#35708334)
I’m fully against using triggers to implement business logic, but find stored procedures can be great for encapsulating some elements of application/business logic. I’ve got several applications that access the same databases, and putting logic in the database avoids needing to duplicate it in clients.

Most comments about debugability are nonsense. It’s just different, with some pros and cons. One simple example - if you have a bug in production, you’re not going to attach a debugger to your production application. But you can absolutely open a readonly connection to the database and start running queries, invoking functions, etc. It helps if you can architect your functions to distinguish pure readonly functions from those with side effects, but you can still debug even if that’s not the case.

Re:90% of My Skills Are Now Worth $0 on Wednesday April 19, 2023 @07:33PM (#35634623)
I know it sometimes feels easier to just implement something than file a JIRA ticket with enough detail to describe what needs to be done.
Re:Irregular Expressions on Sunday April 09, 2023 @05:16PM (#35506547)
Ah I thought they meant flipping the finality of the final state, but I guess they said "states" so your interpretation makes more sense.
Re:Irregular Expressions on Sunday April 09, 2023 @03:19PM (#35505574)
That example doesn’t really fit since one easily could compute the negation of “a|(aa)+” in linear time by simply returning the opposite of the top-level node in the tree.

Perhaps something like “X|!Y” or similar might be impossible?

My point is mostly that the article implies Apple, Microsoft and Linux (or at least Linus) agree on using the term arm64, but the agreement doesn't seem to be too deep given that uname reports different values.

Btw in updating a Docker image to support multi-arch, I sometimes had to download binaries named with arm64 in the name, and sometimes with aarch64 in the name. But the previous version had the same issue with amd64 vs x86_64, so it's not a new issue.

So when I run “uname -m” on Mac it says “arm64”, but running it in a docker container on the Mac it says “aarch64”. Doesn’t seem like everybody is in agreement.
Re:My manager spent $1M on a backup server that I never used on Thursday March 02, 2023 @06:24PM (#35003518)
You likely made the same incorrect assumption from the title that I did. Replace “backup server” with “backup appliance” and it will be more clear.
Re:Features I'd Like in PostgreSQL on Saturday January 28, 2023 @07:29PM (#34563545)
Ha I had a need for this yesterday. Just added a timestamptz column and text column. In my use case the text column preserves the input value for display to the user while the timestamp itself is used programmatically. But a “TIMESTAMP WITH TIME ZONE PRESERVING TIME ZONE” data type would be cool.
Re:Features I'd Like in PostgreSQL on Saturday January 28, 2023 @06:47PM (#34563238)
I believe the metadata about them is still written to various system catalog tables. Creating lots of temp tables will cause autovacuum activity on tables like pg_attr, for example.
Is this from experience? From a quick google search it seems that’s not automatic, and they also have a documented process for how this works for 3rd-party sellers too, giving them the option to dispute or accept it.
Re:Directly Access Your Physical Memory (Dev/Mem) on Friday January 13, 2023 @05:59PM (#34375089)
I dunno, if you “echo foo > /dev/null” then “cat /dev/null” you won’t get foo back. Plenty of assumptions about filesystem behaviour don’t work in all cases.

That being said, I’d prefer if the symlink actually worked and sent the packet.

Re:My Coffee Maker Just Makes Coffee on Monday January 09, 2023 @07:45PM (#34318750)
While they are probably overpriced, if you buy from Dyson you know you are getting pretty good quality. My prior vacuums were from Shark and Hoover and they sucked in the wrong way. While I probably could have gotten a decent vacuum from one of those well-known generic vacuum companies, going with Dyson assured I'd get something much better than I previously had. If I saw a Miele vacuum on the shelf, I'd have no idea what to expect, given have never heard of the brand before.
That’s called a self-encrypting drive (SED) and is pretty common. It just costs more and/or is slower.
I didn’t even know <input type="date"> was a thing, I rely on JS datepicker libraries in various places. However there’s usually plenty of configuration that goes along with that, so I’m not surprised it isn’t optimal in all cases.
Re:Apple's Unique Device Curvature on Saturday December 24, 2022 @04:06PM (#34121083)
I recall this being annoying for me as an app developer trying to perfect the app icon. You upload the app icon as a square image, and Apple applies the round corners when they distribute it. I wanted to preview how it’d look on the App Store (back when every app submission would take weeks to get approved), but found the rounded corners from GIMP just didn’t match. At least they had stopped applying gloss effects by then which totally ruined the colors.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis on Wednesday December 21, 2022 @11:13PM (#34089716)
I know it’s referred to as film grain, but digital cameras also have grain, and the amount of grain will vary from shot to shot depending on lighting, shutter speed etc.

Adding extra fake noise to the movie solves a few problems such as ensuring a consistent look from scene to scene, as well as avoiding video artifacts like banding.

It’s also an artistic choice just like the choice to use telephoto lenses that blur backgrounds into fuzzy balls of light.

Re:Taming names in software development on Sunday December 11, 2022 @02:05PM (#33946294)
Also is it timeoutMs, timeoutMS, or timeoutMillis?
Re:Apple announces upgrade to App Store pricing on Tuesday December 06, 2022 @08:38PM (#33889699)
I’m confused because this is how it already worked. Unlike regular purchases, subscription pricing was always managed by choosing a price in one territory, letting it recommend prices for all the other territories (based on the exchange rate at that date) and giving you the option to make final adjustments. The prices never adjust for exchange rates afterwards unless you re-run the process manually. This was required because fluctuating prices are bad for subscriptions as customers get locked in.

So I don’t understand what’s different here.

Re:Friends Have More Friends Than You on Monday November 28, 2022 @06:35PM (#33781457)
How would the results differ if you looked at median instead of average? It seems like median would probably be about the same in many cases, when talking about # of friends.

Older »