dahlia / hollo

Federated single-user microblogging software
https://docs.hollo.social/
GNU Affero General Public License v3.0
222 stars 14 forks source link

postgres.js does not correctly parse URLs containing unix sockets #56

Open honnip opened 6 days ago

honnip commented 6 days ago

Related:

The library does not correctly parse URLs containing unix sockets.

I confirmed that https://github.com/porsager/postgres/issues/484#issuecomment-1732123538 solves it. (https://github.com/honnip/hollo/commits/db/unix-socket/)

ThisIsMissEm commented 6 days ago

@dahlia is there a reason we're using postgres instead of pg?

dahlia commented 6 days ago

@ThisIsMissEm It's because @fedify/postgres depends on postgres.js.

ThisIsMissEm commented 6 days ago

Could @fedify/postgres depend on pg instead?

dahlia commented 6 days ago

It can switch over to pg if pg supports NOTIFY/LISTEN. However, I think it will require a whole rewrite. 🤔

ThisIsMissEm commented 6 days ago

Ah, ick, okay. I can't recall if pg does explicitly support those but I think so?

dahlia commented 5 days ago

Maybe it would be better to create a separate package called @fedify/pg. 🤔