loading...

Is the database working as expected?

ben profile image Ben Halpern ・1 min read

If you are reading this, the answer is yes.

We just updated our Postgres version, so I'm thankful nothing went wrong.

Discussion

pic
Editor guide
Collapse
rhymes profile image
rhymes

I'm so happy we've upgraded to PostgreSQL 11, I can finally start using all the features under the sun β˜€οΈ

πŸ˜‚

Collapse
citizen428 profile image
Michael Kohl

You know that less than 2 weeks ago they released Postgres 12, so you'll have to do without some of the features under the sun 😜

Collapse
rhymes profile image
rhymes

I know, but Heroku prudently keeps that for 3 months in beta.

I guess we'll have to upgrade again next year :P

Collapse
byrro profile image
Renato Byrro

Some features were down (now good) for a few minutes:

  • Dashboard inaccessible
  • Wouldn't save changes to an article
  • Unpublished articles were not accessible (reading draft or editing)

Yes, guilty, I'm a heavy user and needed all this during your 2-minute migration window 😊

Collapse
ben profile image
Ben Halpern Author

We could have optimized for a time where we had less traffic, like late Friday night, but since we hadn't performed this kind of upgrade before we felt like optimizing for a time where most of the team could be online and alert made sense.

The next time we need scheduled downtime (or, gasp! face unscheduled downtime) we will likely have way more users online at all times. This kind of thing isn't getting easier.

Collapse
kayis profile image
K

Fortnite style!

Collapse
byrro profile image
Renato Byrro

No worries at all πŸ˜‰ πŸ‘

Was only reporting because I thought it could make it easier for you guys to track any improvement opportunities

Collapse
kp profile image
KP

Just curious why dev is using postgres vs mysql. What are the benefits?

Collapse
citizen428 profile image
Michael Kohl

You phrased this question like MySQL is some sort of standard and one needs a specific reason to use something else. It's not, and especially in the Ruby/Rails community many people tend to gravitate towards Postgres by default. That said for your average CRUD app written in MVC framework/language of choice, there probably isn't much practical difference between them.

You can find a relatively comprehensive comparison here:

postgresqltutorial.com/postgresql-...

For me the reasons I generally choose Postgres are:

  • Advanced data types (e.g. hstore, array)
  • More flexible default values (e.g. generating them from functions)
  • Materialized views (possible with workarounds in MySql/MariaDB, but I'd rather have them natively)
  • Better indexing options
Collapse
kp profile image
KP

Thanks for the detailed explanation! I don't come from the ROR community so Postgres is foreign to me...and I know a lot of people that fall inthe same boat. Your answer was helpful, so thanks.

Collapse
hexangel616 profile image
Collapse
stephanie profile image
Stephanie Handsteiner

I don't know, am I reading this? 🀨

Collapse
andrewbrown profile image
Andrew Brown πŸ‡¨πŸ‡¦

RDS DB Snapshot and then upgrade?

Collapse
rhymes profile image
rhymes

What Heroku's upgrade procedure essentially does it the following: create a follower, upgrade, switch over the follower as main DB

The downtime is required to disable processes that write to the main DB while the follower finalizes the sync and upgrades

Collapse
ben profile image
Ben Halpern Author

This was our process, pretty straightforward.

devcenter.heroku.com/articles/upgr...

Still happy it all worked as expected.

Collapse
jacobherrington profile image
Collapse
x82isaac profile image
Michael Isaac

β™₯️

Collapse
tuwang profile image
TuWang

Absolutely

Collapse
cwreacejr profile image
Charles Reace

Postgres...I've become a big fan of materialized views, lately. 😊

Collapse
felipperegazio profile image
Collapse
lukegarrigan profile image
Luke Garrigan

woo well done! πŸ₯³

Collapse
iarehilton profile image
Hilton Meyer

select 'yes';