rake db:migrate fails when working with pg 0.18.1 and PostgreSQL 8.4

Issue #200 resolved
Joe Pasqualetti created an issue

When using pg with a postgres 8.4 server database migrations fail. 8.4 is the highest version provided by yum and 9 is the lowest supported by pg.

I would like pg to display a message on postgres version mismatches.

The exact version of PostgreSQL installed is 8.4.20. Attached is the stack trace. (0.18 does not seem to be in the issue tracker, filing as 0.17.1 for now). The schema is:

def change
create_table :articles do |t|
  t.string :title
  t.text :body
  t.string :author


Comments (3)

  1. Joe Pasqualetti reporter

    My thought on implementing this is to add a rake task or test that performs a system call to check what version psql is. Obviously this would not cover network databases.

    After a connection on a remote database I think I found two possible methods:

  2. Lars Kanis

    Although PostgreSQL-8.4 is no longer supported by the PostgreSQL team and hence not from us, it should still work for most cases. Looking at the stacktrace and into rails-4.1.7 sources, shows that the statement_limit is probably not correctly set in the database.yml. Could you please check this?

  3. Joe Pasqualetti reporter

    You are correct. I had an erb and was making double-use of it to debug what environment variables were loaded. Thank you.

  4. Log in to comment