Chef Server. Upgrade embedded PostgreSQL 9.2 - postgresql

I need to upgrade PostgreSQL that comes with Chef Server.
/opt/opscode/embedded/postgresql/9.2
It's been installed from binaries, not apt, and the installation directory path suggests that it's an embedded version. Although I'm able to access it remotely just fine.
Has anyone tried patching the built-in PostgreSQL that comes with Chef?
My target version is 9.5 as I need support of json functions available in 9.5.

Related

AWS RDS PostgreSQL Upgrade from 9.6.22 to 10.17

Good day. I just finished upgrading my AWS RDS database engine from 9.6.22 to 10.17. I used these steps to make the upgrade using the AWS Console:
Create snapshot of target database to upgrade
Restore snapshot
Upgrade the restored snapshot's (which is now a new instance) DB Engine version.
After I did all of this, everything seems fine but when I access the database, this warning message appears
WARNING: psql major version 9.6, server major version 10.
Some psql features might not work.
I did not continue on my testing because I want to know what is the meaning of this first. Because I am fairly new in AWS as a whole. Thanks!
The meaning is that just because you are connecting to an upgraded database on some machine run by Amazon, the PostgreSQL installation on your local machine was not magically updated. psql from version 9.6 doesn't know what metadata tables were changed in v10, what features were removed and so on.
It would be a good idea to install a more recent version of PostgreSQL on your machine. By the way, upgrading to v10 was not the smartest move, as that version will go out of support in less than a year. You should upgrade to the latest version that your service provider offers.
The client program psql you are using to connect to the database is from an older version than the database it is connecting to. Some of the introspection features might not work. For example, psql from 9.6 won't know how to do tab completion for commands that were added to the server after 9.6.
This is generally not a major problem for psql (unless the server wants to use SCRAM authentication), but for optimal experience it would be good to install a newer client. Other tools like pg_dimp might not with at all against a server newer than they are.

PostGis Extension Installed in AlFresco PostgreSQL

I am working in a project that uses AlFresco-4.2.c as the main program in Ubuntu 16.04, and also uses geoserver in tomcat configured with PostgreSQL.
The problem is that I have been searching for a week about how to install the postgis extension in the own postgresql of alfresco. I have searched in the official documentation of alfresco(http://docs.alfresco.com/4.0/tasks/postgresql-config.html) and other forums, but I have found nothing about extensions.
Do you know a way of installing it?
I have tried to use apt-get and the installer of DBEnterprises, but none of that worked.
I'm not sure what you've followed, but here is what I would have done.
As quickly read from the PostGis page, it's a separate extension on PostgreSQL.
So you'll need to forget about Alfresco for one second, find your local PostgreSQL installation.
It's mostly bundled by Alfresco in the alfresco folder, so e.g. /opt/alfresco-4.2.c/postgresql and the data resides /opt/alfresco-4.2.c/alf_data/postgresql.
If this doesn't work for you, just do the following:
Create a dump file from the current PostgreSQL
Install a PostgreSQL distro from Ubuntu (check the version numbers)
Install the PostGIS extension
Import the dump file

How to fix pg_dump version mismatch errors?

When trying to get local data to Heroku, I am encountering a version mismatch between two different versions of pg_dump.
Specifically, I am getting this message:
pg_dump: server version: 9.2.2; pg_dump version: 9.1.4
pg_dump: aborting because of server version mismatch
I have found others with this problem, but do not know enough to implement the proposed solutions. (I am new to Ruby on Rails, PostgreSQL, Heroku, and the Mac! Very much at the stage of playing around the picking things up as I go.)
I was thinking I might simplify my life if I uninstalled all PostgreSQL on my local machine and started again with a clean install of PostgreSQL 9.2.2 from http://postgresapp.com/, but I don't know how to go about doing the uninstall.
I'm running Mac OS X Mountain Lion 10.8.2.
OS X 10.8 comes with pg_dump version 9.1.4 in the /usr/bin directory, along with psql and other programs that are client-side PostgreSQL tools. It does not mean that PostgreSQL as a server is installed (unless you have OS X Server Edition).
So you don't have to uninstall PostgreSQL because it's not installed and it's better not to remove these postgres client tools in /usr/bin because they belong to the system as shipped by Apple. They just need to be side-stepped.
The package provided by postgres.app comprises both the PostgreSQL server and the client-side tools of the same version as this server. These tools get installed in /Applications/Postgres.app/Contents/MacOS/bin
To use these instead of the 9.1 ones from Apple when you work in a Terminal, postgres.app documentation says to do:
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
and put it in your .profile file.
Once you have done that and you run pg_dump, you should no longer get the error that's it's the wrong version, because it would be the one that ships with postgres.app (currently 9.2.2).
I have this setup and it works OK for me.
If you only need to upgrade your pg_dump to the latest version and you have homebrew and mac, if the app has the latest version and your local pg doesn't:
brew upgrade postgresql
If you're using postgresapp 9.3.x, the path is different. The following worked for me (courtesy of http://sigmyers.com/blog/2013/3/12/postgres-pgdump-version-mismatch-error-postgresapp-postgresappcom)
export PG_BIN_PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin/"
PATH=$PG_BIN_PATH:$PATH
Check here for the latest path: http://postgresapp.com/documentation/cli-tools.html
I'm running Mountain Lion Server. My PostgeSQL server is at version 9.2.1 and the default tools are at 9.1.5.
I had to use:
PATH="/Applications/Server.app/Contents/ServerRoot/usr/bin:$PATH"
to make it work.
Yep, sometimes if you run Postgres.app this may happen after upgrade. Make sure you restart your Postgres.app - it will update your PATH.
In my case I have postgresql installed via homebrew and the executables are here: /usr/local/opt/postgresql#9.6/bin
Or you copy the dump and restore executions to the /Applications/Postgres.app/Contents/SharedSupport folder
or in PdAgmin you point the PG bin Path (in properties -> binary Path) to the path of the executables of your postgre

upgrade database postgresql on jira confluence astlassian application 64bit .

I want to upgrade database postgresql from version 8.3 to 9.0 on Jira application.
Which RPM should be used to work with Suse SLES10.3 64bit?
How to install Postgresql 9.0 in parallel to Postgresql 8.1?
The best bet to find packages for SUSE distributions is the openSUSE Build Service. The direct links there are a bit of a pain, so please look for yourself.
Parallel installation of multiple major PostgreSQL versions is not yet possible using SUSE RPMs. If you need to do that, you will probably need to build from source.

How can I access two Oracle databases with different versions (8i and 9) using perl?

I'm currently accessing an Oracle database version 9i (9.2.0.8.0) using perl modules DBI (1.613) and DBD::Oracle (1.26). The current scope of the project now requires that I access a version 8i (8.1.7.4.0 ) Oracle database and, according to the DBD::Oracle project, I can only access this second database with a DBD::Oracle version 1.20 or below.
I know I could possibly use the DBD version 1.20 to access both databases, but I was wondering if its possible to have installed the two versions of the DBD module and use the acceptable version for each database (less prone to errors).
I don't believe that the server version has any bearing on the DBD::Oracle version you can use, only the version of the client libraries that you install. The 9.2, 10.1, and 10.2 versions of the Oracle client libraries support connecting to Oracle server 8.1.7.4, and the latest version of DBD::Oracle remains compatible with all client libraries from 9.2 up, so I don't think that you will actually have any problem at all. However, if you install the version 11 client, you will lose the ability to connect to server versions below 9.2.0.
Install the different versions of DBI/DBD::Oracle into two different places, see INSTALL_BASE/--install_base. Access them seperately by setting PERL5LIB appropriately.
local::lib helps you automate this whole affair.
If you want to access the two database versions from the same program run you can do as follows:
install both versions in your system using local::lib
run a DBD::Proxy server with #LIB configured to load one version of DBD::Oracle
run your script with #LIB configured to load the other version of DBD::Oracle
in your script connect to one database using DBD::Oracle as usual and to the other one through the proxy.