Skip to content

persist/materialized: default to using postgres for consensus#12420

Closed
ruchirK wants to merge 1 commit into
MaterializeInc:mainfrom
ruchirK:default-pg-consensus
Closed

persist/materialized: default to using postgres for consensus#12420
ruchirK wants to merge 1 commit into
MaterializeInc:mainfrom
ruchirK:default-pg-consensus

Conversation

@ruchirK

@ruchirK ruchirK commented May 12, 2022

Copy link
Copy Markdown
Contributor

This commit also changes testdrive to use Postgres during CI.

Motivation

Tips for reviewer

Testing

  • This PR has adequate test coverage / QA involvement has been duly considered.

Release notes

This PR includes the following user-facing behavior changes:

This commit also changes testdrive to use Postgres during CI.
@benesch

benesch commented May 12, 2022

Copy link
Copy Markdown
Contributor

👍🏽 on the idea, but I don't think it's going to be nearly this simple! The default PostgreSQL URL needs to be something that works on your local machine if you've got PostgreSQL running locally and configured with trust authentication (postgres://$USER, basically). We can resurrect the old logic from sqllogictest that handled this, because rust-postgres doesn't quite cut it out of the box. Then we'll need to install postgres in the materialized Docker image (not the materialized-slim Docker image), and override the --persist-consensus-url in the Docker image's CMD.

Does that make sense? I've got to run for the next hour, can explain more later!

@ruchirK

ruchirK commented May 12, 2022

Copy link
Copy Markdown
Contributor Author

I think the first part makes sense, but the second part is a bit unclear to me because I don't understand why we need postgres in the mz docker container itself. Per our conversation in the meeting I'll wait for you to pick off these three pieces, and I'll prep the pr that gets rid of the sqlite consensus impl after that

@benesch

benesch commented May 12, 2022

Copy link
Copy Markdown
Contributor

I think the first part makes sense, but the second part is a bit unclear to me because I don't understand why we need postgres in the mz docker container itself.

The materialize/materialized container needs to continue to work as a standalone container. Can't rely on it being run in mzcompose where every composition turns on a sidecar PostgreSQL container!

benesch added a commit to benesch/materialize that referenced this pull request May 12, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
@ruchirK ruchirK closed this May 12, 2022
benesch added a commit to benesch/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
benesch added a commit to benesch/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
benesch added a commit to benesch/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
benesch added a commit to benesch/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
benesch added a commit to benesch/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
benesch added a commit to benesch/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
benesch added a commit that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes #12420.
danhhz pushed a commit to danhhz/materialize that referenced this pull request May 16, 2022
Default the persist consensus URI to use a local PostgreSQL instance via
a Unix domain socket.

Supersedes MaterializeInc#12420.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants