Hacker Newsnew | past | comments | ask | show | jobs | submit | xandrius's commentslogin

I think you might need to use Nightly version for this.

There are literally less than 20 top level comments and this one is (at least for me) the 2nd or 3rd.

Instead of a nothingburger, you could have used your academic prowess to break down the top 1/2 misconceptions with expertise.

You might not have time to respond to all the comments but a couple of clarifications could have helped anyone else who doesn't comment without experience.

Just saying that next time you can be the change you want to see in HN instead of wasting text telling us how ignorant we are.


I'm already seeing this and it's only a few years old.

I like the metaphor of burning wood, I also think it's going to be left for fun.


I think you say that so easily because it doesn't actually impact you. It'd be absolutely pissed off if I had to constantly watch out how I naturally write because otherwise people will shame me for thinking I had used AI.

Put a tpyo in — that’ll keep them guessing.

This is an ad-hominem attack, not cool.

To summarise the article: in PG, prefer using UUIDv7 over UUIDv4 as they have slightly better performance.

If you're using latest version of PG, there is a plugin for it.

That's it.


You might have missed the big H2 section in the article:

"Recommendation: Stick with sequences, integers, and big integers"

After that then, yes, UUIDv7 over UUIDv4.

This article is a little older. PostgreSQL didn't have native support so, yeah, you needed an extension. Today, PostgreSQL 18 is released with UUIDv7 support... so the extension isn't necessary, though the extension does make the claim:

"[!NOTE] As of Postgres 18, there is a built in uuidv7() function, however it does not include all of the functionality below."

What those features are and if this extension adds more cruft in PostgreSQL 18 than value, I can't tell. But I expect that the vast majority of users just won't need it any more.


Sticking with sequences and other integer types will cause problems if you need to shard later.

Especially in larger systems, how does one solve the issue of reaching the max value of an integer in their database? Sure for unsigned bigint thats hard to achieve but regular ints? Apps quickly outgrow that.

OK... but that concern seems a bit artificial.. if bigints are appropriate: use them. If the table won't get to bigint sizes: don't. I've even used smallint for some tables I knew were going to be very limited in size. But I wouldn't worry about smallint's very limited number of values for those tables that required a larger size for more records: I'd just use int or bigint for those other tables as appropriate. The reality is that, unless I'm doing something very specific where being worried about the number of bytes will matter... I just use bigint. Yes, I'm probably being wasteful, but in the cases where those several extra bytes per record are going to really add up.... I probably need bigint anyway and in cases where bigint isn't going to matter the extra bytes are relatively small in aggregate. The consistency of simply using one type itself has value.

And for those using ints as keys... you'd be surprised how many databases in the wild won't come close to consuming that many IDs or are for workloads where that sort of volume isn't even aspirational.

Now, to be fair, I'm usually in the UUID camp and am using UUIDv7 in my current designs. I think the parent article makes good points, but I'm after a different set of trade-offs where UUIDs are worth their overhead. Your mileage and use-cases may vary.


Idk I use whatever scales best and that would be an close to infinite scaling key. The performance compromise is probably zeroed out once you have to adapt ur database to a different one supporting the current scale of the product. Thats for software that has to scale. Whole different story for stuff that doesnt have to grow obviously. I am in the UUID camp too but I dont care whether its v4 or v7.

It's not like there are dozens of options and you constantly have to switch. You just have to estimate if at maximum growth your table will have 32 thousand, 2 billion or 9 quintillion entries. And even if you go with 9 quintillion for all cases you still use half the space of a UUID

UUIDv4 are great for when you add sharding, and UUIDs in general prevent issues with mixing ids from different tables. But if you reach the kind of scale where you have 2 billion of anything UUIDs are probably not the best choice either


There are plenty of ways to deal with that. You can shard by some other identifier (though I then question your table design), you can assign ranges to each shard, etc.

I’m really no expert on sharding but if you’re using increasing ints why can’t you just shard on (id % n) or something?

Because then you run into an issue when you 'n' changes. Plus, where are you increasing it on? This will require a single fault-tolerant ticker (some do that btw).

Once you encode shard number into ID, you got:

- instantly* know which shard to query

- each shard has its own ticker

* programatically, maybe visually as well depending on implementation

I had IDs that encode: entity type (IIRC 4 bit?), timestamp, shard, sequence per shard. We even had a admin page wher you can paste ID and it will decode it.

id % n is fine for cache because you can just throw whole thing away and repopulate or when 'n' never changes, but it usually does.


^ This

This is mentioned, and in many applications you can safely say you will never need to shard.

Yes, but if you do need to, it's much simpler if you were using UUID since the beginning. I'm personally not convinced that any of the tradeoffs that comes with a more traditional key are worth the headache that could come in a scenario where you do need to shard. I started a company last year, and the DB has grown wildly beyond our expectations. I did not expect this, and it continues to grow (good problem to have). It happens!

With the latest Postgres version (>= 18) you do NOT need a plugin

Not to disagree with your point but why does literally any discussion must have a mention of AI/LLMs?

Is it possible not to bring them up and still have a deep conversation?


I guess the whole discussion (in 1963, in 2025), is about 'knowledge acquisition' (or lack thereof). He mentions the Brazilian students memorising 'stuff' without understanding - as a former Brazilian educator, I can tell you that when I was working there in 2010-2020, it hadn't changed, and, to my point, got worse in late years. I think a lot of students care about 'getting a diploma' without actually learning something, but my main concern is about fairness: how could I praise good students from 'devious' students altogether?

The education system is a prime example of Goodhart's Law and I'm so surprised how little it's done to avoid that.

I guess that as long as possessing a piece of paper stating "Mr. White passed all hoops we put in front of them" is a baseline requirement for many jobs nowadays, we will always have this problem.

At least in tech, the piece of paper helps but it's mostly about hobby projects, external contributions, past job experiences and referrals which matter the most.

But in more and more countries even just working at a supermarket requires a high degeee, so the non-academically inclined people will try to keep finding ways to pass with as little effort as possible (and any learning takes effort). So, I can't really blame them.


> why does literally any discussion must have a mention of AI/LLMs?

Your sentiment is right but in this case not applicable.

A Teacher who did not really understand what he was teaching can easily have LLMs generate lectures/notes/etc. and pass it along to students without any thought put into it. A Student on his part can simply have LLMs generate answers for all of his problem sets and pass it along to the teacher.

The above would be a disaster for the overall spread of Science in the Society.


A teacher who doesn't understand what they teach. Who put that teacher there in the first place?

That is one of the points of the essay. You just need the appropriate credentials to qualify as a Teacher (i.e. passing B.Ed/M.Ed etc.) and not necessarily "domain understanding" in the Feynman sense.

I'd say the extent and duration of the disruption between Latin America and the counties you mentioned are quite different.

LATAM started from the get go being awfully disrupted from the 1500s and in catastrophic ways. Also, we don't call any of those areas Latin X. It shows how much impact the conquerors had that it even defines how we can the region to this day.


> I'd say the extent and duration of the disruption between Latin America and the counties you mentioned are quite different.

I don't think it is. Europe was full of wars, civil wars, conquest, occupation, and suppression and destabilization of competing nations for all that time, for example.


If you tried to back up your assumption with figures or with specific historical facts, you would see that it is wrong. It's not just about the fact that there was instability somewhere at some point, but about how it is being perpetuated. The countries you list above are very diverse. But what they all have in common, and what distinguishes them from countries in Latin America, is that there is a lot of ocean between them and the US. Admittedly, this also applies to Afghanistan, Iraq, and Syria. But if we examine the question of what distinguishes these countries from the ones you list, it brings us back to the connection that was already pointed out above. I live in Germany and have had access to toothpaste my whole life. People my age in Cuba can still remember very well what it was like to have to do without toothpaste. Now ask your favorite LLM who temporarily prevented toothpaste from being imported into Cuba.

The topic is about Latin America in general. Cuba is a very small and extreme outlier for several reasons so not very representative, I would say. It's certainly true that communist regimes from Cambodia to North Korea to Cuba have often been horrible for their people, whatever the root causes might be.

No, I'm talking about Latin America in general though. And yes it is certainly true there was colonialism, destabilization, economic coercion, and all that from large powers. I don't deny that. The examples I gave fit exactly the same description though. There was no "vast ocean" between the Ottoman Empire and Europe where it was throwing its weight around for centuries. Nor was there a vast (or any) ocean between China and colonial European powers, or later Japan.

So if "vast oceans" are part of your thesis, you are going to have to explain and define that far better, with a lot more supporting evidence and reason for your claims.

You can vaguely handwave and pontificate about differences between other examples and just assert without any real evidence or reasoning that must have been the cause of it. But like I said, that's just not scientific or even compelling in the slightest, really.


Of course it's not scientific. I don't wear a lab coat, and neither do you. You should take a look at yourself in that regard. You can't accuse me of lacking standards that you yourself don't live up to.

Ecuador 2010, Honduras 2009, Venezuela 2002, Haiti 1994, Nicaragua, Guatemala, and El Salvador until 1990, Panama 1989, Grenada 1983, Bolivia 1980, Chile 1973, Dominican Republic 1965, Cuba 1961, Guatemala 1954, and so on until the territorial destruction of Mexico in 1848: all of them wars, coup attempts, occupations, protection of U.S. corporate interests, installation of military dictatorships, attempted assassinations of heads of government, etc.

These are recent events that naturally have a massive impact on the political and economic development of the nations concerned. And you want to equate that with the fact that the Turks were in Vienna at some point or that a nation of 1.41 billion Chinese has now recovered somewhat from European colonialism. Sorry, but that's ridiculous. The US bears significant responsibility for the poor political and economic situation in many Latin American countries. You don't have to agree with this assessment. But to pretend that there aren't a multitude of valid arguments for it is either ignorant or disingenuous.


Blaming Cubas struggles on the US without acknowledging that Cuba, for example, has labor camps for children, is kinda silly imo.

It's a brutal dictatorship very similar to Iran. Let's all keep that in mind.


I can find nothing to support the claim that Cuba allegedly has labor camps for children. As far as I can see, this is an unsubstantiated propaganda claim. It is well known that the US is currently having ICE round up people off the streets and imprison them throughout the country. There is evidence that five-year-old children are being detained separately from their parents. The ability of people to apply double standards is always astonishing.

https://www.amnesty.de/sites/default/files/2025-03/030_2025_...

And it is simply irrational not to link Cuba's problems with the US embargo.


Weird. You seem pretty bad at searching: https://en.wikipedia.org/wiki/Military_Units_to_Aid_Producti...

> The ages of the inmates ranged from 16 to over 60


I will read the article and incorporate it into my view of things. I don't get the impression that you are prepared to evaluate information in a similarly open-minded way. You remain silent on all the points I have raised. This makes it clear to me that you are an ideologue.

I already knew about US immigration services abuse. It's absolutely a problem. It seems like a non sequitur in the discussion though. The actions of ICE in the US since Trump was elected don't seem like they have any relevance to the educational problems in Latin America in the 60s though? I mean, unless ICE now has time machines. If that's the case, I will absolutely start worrying. A lot.

I mentioned ICE because you mentioned something about child labor camps in Cuba. You have to keep things in context when you make non sequitur insinuations. I don't share the view that ICE is the first problematic development and that everything was fine in the US before that. We can end the exchange here. Nothing positive will come of it.

Attacking a country's people because the government is a dictatorship makes no sense. Especially when we were just fine with the brutal dictatorship that preceded the one we hate, because that one was capital-friendly and didn't try to give white man's money to brown people.

I mean, if your argument is that sanctions never work and are useless, then that's a position that we can argue, but I guess that means you also would support lifting all sanctions against Russia, Iran, Afghanistan, etc?

Sanctions don't never work, but they certainly must be used judiciously. They can and will be anticipated and countered, as Russia has shown. Their overuse has pushed the intended victims into a trading bloc rather than isolating them. I want a competent and effective government, even if it's one that kills innocent people for profit and destroys democracy in other countries. Instead we just get sanctions that do nothing and evil for profit.

> [Sanctions] can and will be anticipated and countered, as Russia has shown.

How have they shown that? I think they've showed that they won't stop the war, but that's not at all the same as anticipating or countering the sanctions. Since they couldn't anticipate the war lasting longer than a week I think we can safely say they didn't anticipate having an ongoing war AND sanctions.


That really downplays the turmoil China has gone through. It’s at least equal.

China's external turmoil can be boxed within the 1800s and I don't think it included: 80+% of casualties, forced religious conversion, forced language conversion, wholesale destruction of books and culture, etc.

>China's external turmoil can be boxed within the 1800s

Yeah except for that time that Japan tried to conquer them while they were in a civil war.


True but do you really think, all summed up, they had it worse than LATAM?

Given that the worst of colonialism happened in 16th and 17th centuries and by the 1930s, China was in a worse position than much of Latin America (e.g. Argentina), I would say that they had a harder go of things more recently than Latin America.

No it really _really_ cannot be. Go read a history book.

Graceful arguing right there.

If you feel like enlightening us how China fared worse than LATAM or you can avoid being all snarky like that.


I would be very happy to discuss the matter with you but there seems to be some hostility and edge in the way you argue your point which makes it hard to engage with.

Anyway, in short, everything you said applies to literally any human or even animal: if you give them something for free and then take it away unless they pay for it, they won't accept it (google maps). On the other hand, if you provide something for a price, and it's needed, people will pay even if there is an alternative (e.g. Netflix).

The difference is that many/most people are ok with ads as a form of payment for the free services, while others (including Europeans) are not ok with the additional hidden clauses regarding how their personal data is used. Is that wrong? I don't think so.

To make it more realistic, imagine getting a TV for free because it will insert ads every X minutes. The tradeoffs are pretty clear: Good TV for my time/attention.

But if someone then started also recording from said TV the inside of my room, my and my family's faces to be sold to unknown parties for unknown uses (and sometimes even to antagonists) then I don't think anyone would believe it is a fair implementation of the original and presented "agreement" (even if it is stated in their 1000 pages ToS).

Now, if Europeans start being vocal politically that such an invasion of privacy is not acceptable, does that make their claims invalid because there is no valid alternative to such services?

I'm pretty sure today's tech giants would be profitable even without the privacy invasion and the selling of the data; furthermore if their premium versions did not actually show you ads (some show you ads even if you pay), I'm sure people will slowly start gravitating there as they stop being ok trading their attention/time for money.

But if Facebook explicitly told you "pay us X/mo or we will sell your personal data to Russia", would people actually pay them or, perhaps, would they start considering other saner alternatives? I guess we'll never know.


I've been party to exactly these types of policy discussions in Europe and elsewhere for a couple decades now.

The consistent political pushback against mandatory paid options that are ad-free is that it excludes people that can't afford them. It is unfair because it only advantages people with money. Therefore "free" is the only valid policy choice because there is always someone who can't pay. This limits what is possible as a practical matter.

The obvious alternative to an ad-funded model within these constraints is for the government to pay the companies for the service on condition that they remove ads from their country. Needless to say, the idea of paying "taxes" to Google et al to remove the ads is offensive to many of the same people.

So we are stuck with the status quo of "free" ad-funded services because people aren't willing to accept the necessary tradeoffs to change the situation.


The topic here is not ads vs not-ads. It's "why are companies who are already paid via ads also want to make extra money selling personal data to third parties?".

I think the ideal solution is forcing companies to offer privacy focused ad-free options as a subscription, with a cost calculated from the average revenue per fully tracked/ad-riddled user, maybe plus some small premium.

Of course, this would likely receive a lot of blow-back in the form of "Looks like now you have to be rich to not get your life sold to third parties" and "Google used to be equal for all and now they are just going to prey on the most vulnerable in society"

The only way to win in this situation is for people to understand that things cost money. They probably cost more than you expect, and you probably will want your ads and tracking back once you see the true cost. After all, at the end of the day, the downside to these decades of tracking to most people has been "Damn, how does google know I buy Tide detergent!".


I had to add my two cents here because of my username... A problem I have is that Facebook spent a mint getting everyone on board, so a lot of folks I know use it. Myself being die-hard about not using Facebook has probably cost me a lot of network opportunities (also linked-in) people don't see me there and the hiring folks throw my resume to /dev/null The advice I receive is "give in". I pay for my email provider, but the only way into these walled gardens is be on the wrong side of the fence.

This is a false dichotomy: it's not a given that companies must make money out of personal data.

There are things which shouldn't be for sale, and I believe personal information is one of those.

Even though we don't have another universe to compare ours to, I believe companies started selling personal data not because people didn't want to pay for their services (since they do that even if you DO pay for them) but mainly because it is profitable. End of the story.

I am always surprised why people here attach so much humanity and conventional logic to huge international for-profit VC-backed companies: they will do literally anything if at the end of the day they come out in the green (aka profitable). Even illegal things, if the expected payout is lower than profits created.

I also believe that if literally killing people made some company $X and their analysts predict having to pay $Y to governments (with $Y substantially lower than $X) once in a while, someone would eventually decide to do that. And such a company wouldn't have trouble finding shareholders and employees.


I'm not siding with the author for any interest in CMS but that comment is natural for anyone who thinks someone made a good enough short term decision which might backfire after the realities settle in.

And they didn't threat anything, they simply said: your simple system won't be too simple anymore as you keep on using it. To me it's a fair comment.

Of course, it might not backfire but predictions are personal and not always correct.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: