Giter Site home page Giter Site logo

Comments (7)

amartin96 avatar amartin96 commented on May 22, 2024

Postgres can be configured to allow passwordless login as well. It does, however, always require a username, as far as I've read.

from readyset.

amartin96 avatar amartin96 commented on May 22, 2024

In MySQL, you can create a superuser with no username or password:

CREATE USER ''@'%' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON *.* TO ''@'%';

When such a user exists, ReadySet will connect and replicate from a URL of the form:

mysql://<host>:<port>/<db>

So we don't want to require username + password for MySQL deployments.

from readyset.

amartin96 avatar amartin96 commented on May 22, 2024

Postgres username missing:

Error { kind: Db, cause: Some(DbError { severity: "FATAL", parsed_severity: Some(Fatal), code: SqlState(E28000), message: "no PostgreSQL user name specified in startup packet", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("postmaster.c"), line: Some(2268), routine: Some("ProcessStartupPacket") }) }

Postgres password missing:

Error { kind: Config, cause: Some("password missing") }

Postgres bad username/password:

Error { kind: Db, cause: Some(DbError { severity: "FATAL", parsed_severity: Some(Fatal), code: SqlState(E28P01), message: "password authentication failed for user \"postgress\"", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("auth.c"), line: Some(335), routine: Some("auth_failed") }) }

Conclusions:

It might be possible to differentiate between recoverable and unrecoverable errors based on this information, but it would involve matching on strings and/or opaque error codes, which is brittle. We should just check for these fields manually.

from readyset.

amartin96 avatar amartin96 commented on May 22, 2024

Blocked because I think the most robust way to handle these errors is to treat them as unrecoverable where they are now, rather than add logic elsewhere to try and catch them early.

from readyset.

amartin96 avatar amartin96 commented on May 22, 2024

Omitting the username or password also leads to a replicator failure loop.

from readyset.

amartin96 avatar amartin96 commented on May 22, 2024

https://gerrit.readyset.name/c/readyset/+/5197

from readyset.

amartin96 avatar amartin96 commented on May 22, 2024

Some discussion on whether readyset might ever want to deal with postgres upstream URLs that don't contain a database name:

https://readyset-workspace.slack.com/archives/C01HF1WTP6Y/p1686944393015599

from readyset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.