Code Monkey home page Code Monkey logo

sprout-postgresql's People

Contributors

cbguder avatar cunnie avatar hiremaga avatar wendorf avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

julioalucero

sprout-postgresql's Issues

Database Destroyed Every Run

Hi @codeword and @cbguder!

This is looking awesome. We were having some problems where our default database encoding was ASCII, and we couldn't figure out where that was coming from so I absolutely welcome the addition of this cookbook.

I've been testing it out on our machines over here at wanelo and are noticing that our databases get dropped everytime that be soloist runs. Are you planning on changing that default?

It seems like the first run it should delete the initially incorrectly encoded database and then recreate it, but not each subsequent run.

Thanks!
James

Postgres fails to start on OS X El Capitan 10.11.3

The recipe sprout-postgresql::create_current_user_db fails to connect to postgres:

  * execute[create a database for the current user] action run[2016-02-01T17:14:09-07:00] INFO: Processing execute[create a database for the current user] action run (sprout-postgresql::create_current_user_db line 5)
[2016-02-01T17:14:09-07:00] INFO: Processing execute[Guard resource] action run (dynamically defined)
createdb: could not connect to database template1: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Because the postgres process failed to start using launchctl load -w /Users/pivotal/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

When this command was executed, there was no reported failure, so sprout proceeded to run, but the postgres process actually failed to come up.

The contents of /usr/local/var/postgres/server.log include the following errors:

LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.5.0.
LOG:  skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"

Cookbook does an insufficient job of explaining failures due to mismatched postgres versions

If a machine has previously had an older version of postgres (e.g. 9.4) installed, and a newer one (e.g. 9.5) is being installed by the cookbook, attempts to use postgres will likely fail with an error like:

createdb: could not connect to database template1: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

The logs in /usr/local/var/postgres/server.log will likely say something like:

FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.4.

We don't want to take the unexpected action of emptying /usr/local/var/postgres or migrating the database on behalf of the user, but we should detect this state and fail with a clear explanation of what is happening, and maybe include potential solutions such as outlined in this upgrading guide.

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.