support postgres 9.2 for vagrant/puppet/dev (vagrant broken on master)

RESOLVED FIXED

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: rhelmer, Assigned: rhelmer)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

6 years ago
Two things are keeping this from working:

1) 9.0 was removed from the postgres backports PPA, and socorro doesn't work on > 9.0 yet
2) the schema dump for 18 hasn't been generated yet

I think I know what we need to do to fix these now. We've been stuck since we depend on the schema dump to bootstrap the DB, but this comes from postgres 9.0 and we are having CITEXT problems when loading that as-is on postgres 9.2 (the migration scripts that run with "CREATE EXTENSION citext FROM unpackaged" don't seem to work, we get collation errors when running Socorro unit tests)

Josh suggested having the setupdb script do "CREATE EXTENSION citext" first, then loading the schema and ignoring the errors.. the script is already able to detect postgres version and can ignore specific errors, so as long as this approach works it should be easy to do.

I'll test this and put up a PR if it works.
(Assignee)

Updated

6 years ago
No longer blocks: 757274
(Assignee)

Updated

6 years ago
Blocks: 757274
Depends on: 771237, 771243
(Assignee)

Comment 1

6 years ago
(In reply to Robert Helmer [:rhelmer] from comment #0)
> Josh suggested having the setupdb script do "CREATE EXTENSION citext" first,
> then loading the schema and ignoring the errors.. the script is already able
> to detect postgres version and can ignore specific errors, so as long as
> this approach works it should be easy to do.
> 
> I'll test this and put up a PR if it works.

So this does work, but it generates so many errors that it's not worth making the script handle this. Instead I will do this process manually and then pg_dump the result, which gives us a clean 9.2 schema.

This means that you probably won't be able to use sql/schema.sql to load anything less than 9.2 ... I think this is probably ok until we have a new solution for bootstrapping new DBs.
(Assignee)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.