Conversation
50fea81 to
bb9f502
Compare
|
b1e9cb9 to
a4474fa
Compare
|
Should we just create/enable amcheck as a default extension in our installations? |
We can do that, sure. Having it here made it easier to test the whole thing on an existing (old) box. |
ekohl
left a comment
There was a problem hiding this comment.
Just noting for myself: we don't need to install postgresql-contrib on external DBS because this check is only executed locally.
| def amcheck_installed? | ||
| sql = "select 'amcheck_installed' from pg_extension where extname='amcheck'" | ||
| result = query(sql) | ||
| !result.nil? && !result.empty? |
There was a problem hiding this comment.
Should it check for the column we want to be present instead of just non-empty?
| !result.nil? && !result.empty? | |
| !result.nil? && result.include?('amcheck_installed') |
There was a problem hiding this comment.
Right now result is something like [{"?column?"=>"amcheck_installed"}], so the include? would need to be a tad more smart, but it's really not necessary, as the result will be empty if the extensions is not there.
this ensures that the database is restorable or if it isn't (when there are index issues) the user knows at the time of the backup
this ensures that the database is restorable or if it isn't (when there are index issues) the user knows at the time of the backup