Better HN
topnewbestaskshowjobs
Log inSign up

mfalcao

198 karma · joined May 19, 2023 (3y ago) · 24 submissions

Submissions

comment 11mo ago · link · parent

The most common way to achieve HÁ is using Patroni. The easiest way to set it up is using Autobase (https://autobase.tech).

CloudNativePG (https://cloudnative-pg.io) is a great option if you’re using Kubernetes.

There’s also pg_auto_failover which is a Postgres extension and a bit less complex than the alternatives, but it has its drawbacks.

comment 1y ago · link · parent

Yes, I’ve done it using StreamingHttpResponse. You’ll want to use an asynchronous worker type though.

comment 2y ago · link · parent

Can you explain how the encryption works, who holds the keys, etc in detail? Your website seems to be very light on details.

comment 2y ago · link · parent

Not sure if it will help in this particular situation, but this driver has worked great for me when using Sunshine on a VM without a dummy plug: https://github.com/itsmikethetech/Virtual-Display-Driver

comment 2y ago · link · parent

That’s insanely low! In Portugal the minimum required by law is 6.45 million for victims and 1.30 for property damage, per accident. A policy like this can cost as little as 250€ / year.

I assume these low limits in US insurance also affect material damages so that if you crash into an expensive car you just get a bunch of debt you need to pay off?

comment 2y ago · link · parent

50 is literally faster than Tour de France pros maintain on flat ground. A regular person on a normal bike will have a hard time even doing 30.

comment 3y ago · link · parent

Ah yes I forgot about Ireland! It’s the only one though

comment 3y ago · link · parent

I disagree that it’s common practice or standard. The W3C never even standardized it, mainly because of low adoption: https://github.com/w3c/dnt/commit/5d85d6c3d116b5eb29fddc6935...

comment 3y ago · link · parent

I’d have to read this specific decision but my opinion is that while the GDPR says the user can refuse consent “by automated means” it doesn’t specify what those means are, thus making it quite hard to follow, enforce and therefore likely that other courts will decide differently on similar cases. E.g. would my own “X-Tracking-Is-Stupid: don’t track me” header be valid as refusing consent? What if I add it as a query parameter in the URL? And so on - DNT is not special in the eyes of the law.

comment 3y ago · link · parent

Germany is not a common law country and neither are any other EU countries. Higher court decisions (which I don’t think is the case here) can set jurisprudence but it’s not the same thing as in a common law system.

Also national court decisions do not apply to other member states.

comment 3y ago · link · parent

I made a couple thousand when I was 14 making and selling cheats for online games. I blew most of it on games and computer parts, which were things that as a kid from a poor family I would have never been able to have otherwise.

I’m not proud of the mayhem that my cheats caused, but it was a defining moment in my life - I learned a lot and soon started doing small jobs for various companies, starting a career in software before I was even an adult.

comment 3y ago · link · parent

Interesting. Does the state charge for the collection service? And what if you declare yourself a member of the church but do not want to contribute - can you opt out or do you just have to lie?

comment 3y ago · link · parent

Doesn't it benefit AirBnb indirectly though? Lower taxes -> AirBnb is more attractive for owners -> more properties on the platform -> more profit for AirBnb

comment 3y ago · link · parent

If that is actually him and he doesn't want to be associated with that persona then making this video [0] was a weird choice... But in any case it seems natural that people are curious about this, after all it's a popular project and listing virtual avatars as members is strange.

At this point he should probably just own it if it is indeed him.

[0]: https://www.youtube.com/watch?v=effHrj0qmwk

comment 3y ago · link · parent

Here's a quick benchmark with pgbench:

  $ pgbench -h localhost -p 5432 -b select-only -T 60 -c 10 -j 2 bench
  Password: 
  pgbench (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
  starting vacuum...end.
  transaction type: <builtin: select only>
  scaling factor: 1
  query mode: simple
  number of clients: 10
  number of threads: 2
  maximum number of tries: 1
  duration: 60 s
  number of transactions actually processed: 10370147
  number of failed transactions: 0 (0.000%)
  latency average = 0.058 ms
  initial connection time = 54.881 ms
  tps = 172993.008029 (without initial connection time)

  $ pgbench -h /var/run/postgresql -p 5432 -b select-only -T 60 -c 10 -j 2 bench
  pgbench (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
  starting vacuum...end.
  transaction type: <builtin: select only>
  scaling factor: 1
  query mode: simple
  number of clients: 10
  number of threads: 2
  maximum number of tries: 1
  duration: 60 s
  number of transactions actually processed: 16890415
  number of failed transactions: 0 (0.000%)
  latency average = 0.036 ms
  initial connection time = 7.186 ms
  tps = 281540.260418 (without initial connection time)
YMMV depending on your workload, but Unix sockets should always be significantly faster.

comment 3y ago · link · parent

In my experience they are 30 to 40% faster

comment 3y ago · link · parent

Starts at $3499... I don't think this will be successful.

comment 3y ago · link · parent

Just watched this while eating. It's half an hour long, so here's a summary:

- He owns a 2022 Hyundai ioniq 5, USA version

- The brake lights generally work fine, however when in one-pedal mode (i.e. accelerator does regenerative braking for the first X% of travel) they only activate when the vehicle is about to stop so long as the driver has the accelerator ever slightly depressed

- This is a problem because the regenerative braking is quite strong - he goes from 60 mph/96 kph to 0 in 13 seconds and the stop lights never illuminate

- He thinks this should not be allowed and Hyundai should recall the cars to fix this

- However, in the US this is perfectly legal - regenerative braking is not considered as part of the "service brake", so illuminating the stop lights is not required

- The EU on the other hand just fixed this gap in the law in March, by requiring that stop lights be illuminated whenever the deceleration exceeds 1.3 m/s^2

comment 3y ago · link · parent

Indeed - one of the great changes in v15. (for any folks on previous versions, you need to change the view owner to a non-superuser role without the bypassrls attribute).

Thanks for all your work on PostgREST, Steve! Do you think we'll see relational inserts in the near future, or is that still a bit down the road?

comment 3y ago · link · parent

RLS is great, but it's not that hard to shoot yourself in the foot or miss stuff. E.g.:

  ALTER TABLE bookmarks ENABLE ROW LEVEL SECURITY;
  CREATE POLICY bookmarks_owner ON bookmarks USING (owner_id = auth.uid());
  CREATE VIEW recent_bookmarks AS SELECT * FROM bookmarks ORDER BY created_at DESC LIMIT 5;
The above may look fine at first glance, but recent_bookmarks actually bypasses RLS.