boulder-food-rescue / food-rescue-robot

A Rails App for Managing "Just in Time" Food Rescue, Developed by/for Boulder Food Rescue in Boulder, CO, USA
49 stars 56 forks source link

Monkey Patch Postgres to fix Panic string issue. #182

Open rylanb opened 3 years ago

rylanb commented 3 years ago

Overview

Heroku upgraded our Postgres version today via regular maintenance (12-10-2020) and it brought down with a message PG::InvalidParameterValue: ERROR: invalid value for parameter “client_min_messages”: “panic”

Found a way to monkey patch and get the app back up via: https://stackoverflow.com/questions/58763542/pginvalidparametervalue-error-invalid-value-for-parameter-client-min-messag

I think a better option would to re-provision to postgres 9.6 specifically. I couldn't check the version this AM, but best guess is that we are on 10 or 11 version that dropped the support for 'panic'. I don't have a ton of knowledge about this as of now

phyninja commented 3 years ago

Hey,

I pulled this PR to test the fix, but found that the error remained upon running the command

bundle exec bin/setup

Did you run a command before the one above, for the app to 'apply' the fix?

rylanb commented 3 years ago

Probably have to run bundle update pg ?

phyninja commented 3 years ago

Sorry, that didn't work for me; running bundle update pg resulted in this message being displayed:

Bundler attempted to update pg but its version stayed the same
Bundle updated!

For now, I have used this workaround.