Live data from Hacker News

Postgres.app

postgresapp.com

91–100 of 158 posts

Re: Postgres.app

#91
post #79

Earlier quoted context omitted.

No, Nix installed in your system.

I don't know much about Nix. But is there really any isolation if it's installed on your host os? I always thought Nix was primarily a package management tool. Like brew? Docker isolation is different.

Nix is primarily a package management tool, yes, but it provides isolation in the sense that you don't have to globally install anything (except for Nix, of course). A tool I use extensively when developing is a "nix shell", which is a shell that's configured with a `default.nix` file.

For example, in project A I use Node.js v12. The project root contains a `default.nix` file that says it needs the package `nodejs-12_x`. When I run `cd /project/root && nix-shell` I'm dropped into a shell that has `nodejs-12_x` along with the rest of my "normal" shell. Once I exit it, `nodejs-12_x` is no longer available. If in project B I use Node.js v14, all I have to do is declare in its `default.nix` file that it uses `nodejs-14_x` and there will be no conflicts whatsoever.

Of course this is different from the isolation Docker provides, but I find that for development it is the perfect middle-ground between "everything is installed globally and conflicts with each other" and "everything is so perfectly isolated I can't get anything done".

Re: Postgres.app

#92
post #74

Earlier quoted context omitted.

[see reply]~~~I'm sure it's done with the best of intentions, but, alternatively, it's squatting, MITMing, etc. and the server should probably be rejecting requests not for the official 'postgresapp.com' hostname? (Maybe there's not really any attack here - though downloads? - but imagine 'pay.pal' or something. AFAIK servers should be configured only to permit intended hosts, they allow '*' but I don't know when tha…

I'm not sure if it's changed since you commented, but it's just redirecting the URL to https://postgresapp.com for me.

I wanted to be sure here that there wasn't any room for confusion which is why I just had it redirect anyone who hit the domain to the correct url.

Re: Postgres.app

#93
post #61

Earlier quoted context omitted.

We do use it in production. Have been for years. We use it as part of the back-end of a business workflow automation system. Handles 100-1000 concurrent users without any issues.

Thanks for the details. I would be afraid to use SQLite over Postgres as SQLite is much more... flexible with it's database constraints (or at least, this used to be the case). Not knocking your engineering choices - if you've been running it in prod for years, then it's working for you - just interested. Do you lean into DB constraints much or do you do more application level checking/enforcement?

Not parent but mentioning nuget suggest parent is on dotnet, ie C/F# ergo semi-/typesafe. Parsing (not validating) at the edges should take care of it.

Re: Postgres.app

#94
post #68

I've always preferred Docker for setting up databases and database-like services on a development machine because then everything is nicely isolated. i.e no need to worry about random files in /etc/foo, easy to setup many versions per project etc. This is what I've been using for Postgres: docker volume create postgres docker run -d \ -p 127.0.0.1:5432:5432 \ -v postgres:/var/lib/postgresql/data \ --name postgres \ -…

I went down this road for a long time and eventually realised I was gaining very little from it and picking up a bunch of downsides. Obviously everyone’s experience is different because we’re all doing different things but I mostly work with Rust and Node, I use Postgres.app as a local dev database and just run the code natively, sometimes Node via nvm when I care about specific runtime versions. It works great. It p…

I love docker I just get really confused when the networking gets involved in the mix. Like I tried to make a airflow cluster with docker and I gave up.

Re: Postgres.app

#95
post #69

Earlier quoted context omitted.

I would recommend TablePlus as it supports more than just postgres, and is also on Windows if you need it. Not affiliated, just an extremely happy customer.

Wow, that looks very nice.

Keep in mind, Windows & Mac version require separate purchase

Re: Postgres.app

#96

I've always preferred Docker for setting up databases and database-like services on a development machine because then everything is nicely isolated. i.e no need to worry about random files in /etc/foo, easy to setup many versions per project etc. This is what I've been using for Postgres: docker volume create postgres docker run -d \ -p 127.0.0.1:5432:5432 \ -v postgres:/var/lib/postgresql/data \ --name postgres \ -…

Let's see... the user could download an app, click it, and run Postgres. Or they could figure out how to install Docker, then run a terminal, then type two obscure and inscrutable commands into it. Perhaps administrator privileges are required along the way.

Sure, the Docker route is better in many ways. But perhaps you're not understanding the audience for a packaged Mac application.

Re: Postgres.app

#97

Earlier quoted context omitted.

A slight tangent, but what kind of hardware are you using for this kind of home lab setup?

I have 2x Dell R720's and a consumer-grade i7-3770k box, some shiny ubiquity gear mixed with ugly network gear, and a Synology DS918+ for personal storage. I tend to lean on straight up Debian linux for most things. One of the R720's is a VMWare ESXi host, the other is a k0s box running on Debian Buster, and the 3770k runs Fedora because I wanted to taste the redhat/dnf fruit but I am diehard Debian. Pic: https://s3.…

I've seen that book case before. Is it IKEA?

Re: Postgres.app

#98
post #97

Earlier quoted context omitted.

I have 2x Dell R720's and a consumer-grade i7-3770k box, some shiny ubiquity gear mixed with ugly network gear, and a Synology DS918+ for personal storage. I tend to lean on straight up Debian linux for most things. One of the R720's is a VMWare ESXi host, the other is a k0s box running on Debian Buster, and the 3770k runs Fedora because I wanted to taste the redhat/dnf fruit but I am diehard Debian. Pic: https://s3.…

I've seen that book case before. Is it IKEA?

Yep. https://www.ikea.com/us/en/p/hejne-shelf-unit-softwood-s7903...

Re: Postgres.app

#99
post #68

Earlier quoted context omitted.

I went down this road for a long time and eventually realised I was gaining very little from it and picking up a bunch of downsides. Obviously everyone’s experience is different because we’re all doing different things but I mostly work with Rust and Node, I use Postgres.app as a local dev database and just run the code natively, sometimes Node via nvm when I care about specific runtime versions. It works great. It p…

I love docker I just get really confused when the networking gets involved in the mix. Like I tried to make a airflow cluster with docker and I gave up.

I’ve been burned by using Docker’s networking directly too many times to count, especially in the context of Docker for Mac (where “the host” sometimes means “your computer”, while other times meaning “the VM Docker runs in”, arbitrarily.)

However, Kubernetes on Docker (microk8s or whatever it’s called) has always been extremely predictable in its (development-time, single-node) networking behaviour for me. Set up the right Deployment + Service + Ingress resources, ask kubectl(1) for the external IP and port to talk to, curl it—just works. Does the same externally-observable thing on your workstation that it does in prod.

Of course, that requires you to learn Kubernetes… which is a much bigger pain than it should be. But once you've got it, it's pretty simple/lightweight to wield Kubernetes at a problem; and the results are much more widely-applicable to everywhere you'd want to deply than e.g. Docker Compose is.

Re: Postgres.app

#100

I've always preferred Docker for setting up databases and database-like services on a development machine because then everything is nicely isolated. i.e no need to worry about random files in /etc/foo, easy to setup many versions per project etc. This is what I've been using for Postgres: docker volume create postgres docker run -d \ -p 127.0.0.1:5432:5432 \ -v postgres:/var/lib/postgresql/data \ --name postgres \ -…

I love using Docker Compose in theory, but I've found it really difficult to do local development with a "Docker only" setup on Mac, due to the performance issues with the filesystem layer (even when using cached volumes, etc). Ruby gemfiles and node_modules are big culprits here, since they involve a lot of filesystem accesses to load/install dependencies. It might be more manageable if I was just using Postgres fro…

Using docker-sync helps alot, and then using it's ability to ignore certain folders (like folders with high churn like tmp and log folders) helps even more. Over time the performance story has improved, but I still find docker-sync to be the best approach for me, and I've been 100% Docker Compose for about 4 years now (even on projects that don't deploy to Docker)
Post reply on HN