I am trying to use the official way
to upgrade from PG 14 to 15 with Citus. If I would follow these instructions, I would have upgraded PG, but not citus, since nowhere the citus111_15 rpm is being installed (CentOS 7)? I am a little bit confused about this.
It says update citus first, then postgres...
I now installed postgres15 first and then did the pg_upgrade --check.
There is an error since the citus extension is missing.
So after installing citus111_15 the check looks ok.
So the citus-upgrades that have to be done first are to be done on the old major version of postgres - here 14.5.
e.g. from citus 11.0 to 11.1.4. Now the procedure is clear to me.
Related
Postgresql website says "A dump/restore is not required for those running 14.X." (https://www.postgresql.org/docs/14/release-14-2.html#id-1.11.6.5.4)
Do I still need to use pg_upgrade or there is any other way to upgrade?
You only need to update the binaries using Ubuntu's package manager and restart Postgres (apt update then apt install postgresql-14)
pg_upgrade is only needed to upgrade between major versions (e.g. from 13 to 14 or from 14 to 15). Upgrading 14.1 to 14.2 is a minor version upgrade.
As per the docs:
Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number.
You are moving from 14.1 to 14.2 so this applies to your situation. That means you can just upgrade the binaries (so usually apt-get update && apt-get upgrade assuming you are using a repo with the latest release) and restart the service. However, it is worth reviewing the release notes particularly:
some bugs have been found that may have resulted in corrupted indexes, as explained in the first two changelog entries. If any of those cases apply to you, it's recommended to reindex possibly-affected indexes after updating.
I have a production machine running debian strecth that I do not want to mess up. I have an app that requires postgres 11 and I'm not sure about a thing. Does the installation from the official postgres debian repo install as an extra server or does it replace the existing 9.6 verssion on debian?
I have tried to dump from version 11 and restore in 9.6 but it throws an error on creation of a sequence:
psql:fas-schema.sql:125: ERROR: syntax error at or near "AS"
LINE 2: AS integer
Just need to be sure 100%
If you want to run multiple versions of PostgreSQL one the same host, you should use official packages provided by PGDG. All the currently supported versions are available.
Though, these packages are not including tools provided by the Debian project, such as pg_ctlcluster or pg_lsclusters.
I have installed Postgres.app from here (http://postgresapp.com) a couple of days ago. It comes with Postgres 9.4.4.
Today I realised that the software I am using officially supports only Postgres 9.3. The 9.4.4 version works, but sometimes there are DB locks.
Is there a way to downgrade my current db (very small in size, created just for testing), which is version 9.4.4 to 9.3? Or is it possible to create another DB with version 9.3 without uninstalling current version of Postgres.app?
OS: OS X Yosemite 10.10.4
Thank you.
install postgres 9.3 server and client to your mac
run locate initdb
expected in /Library/PostgreSQL/9.3/bin/initdb let's assume it is there
create 9.3 instance /Library/PostgreSQL/9.3/bin/initdb -D /new_data_directory
export 9.4 db /Library/PostgreSQL/9.3/bin/pg_dump -U 94_username -d 94_database >somefile.dmp
shutdown old /Library/PostgreSQL/9.4/bin/pg_ctl stop -m fast
startup new /Library/PostgreSQL/9.3/bin/pg_ctl start
7.create 93 db /Library/PostgreSQL/9.3/bin/psql -U 93_superuser_user -c "create database IMPORT_DB"
import 93 db /Library/PostgreSQL/9.3/bin/psql -U 93_superuser_user -f somefile.dmp IMPORT_DB
I don't know if there are articles on this topic. I know I sound old fashion, but maybe manuals? :) and experience
If you need to downgrade the Postgres version but prefer to continue using Postgres.app, there are previous releases recorded at https://github.com/PostgresApp/PostgresApp/releases/ including links to the dmg or older zip installers.
For example in August 2017 the current Postgres.app (v2.0.4) uses Postgres version 9.6.4. However if you needed say Postgres 9.6.2 you could page back through the previous releases to find that the v.2.0.2 release from Feb 2017 uses Postgres 9.6.2.
https://github.com/PostgresApp/PostgresApp/releases/tag/v2.0.2
Older versions of Postgres are there too even back to the 9.3 series referenced in the original question.
I'm not sure if the old installers are "officially" provided by Postgres.app. I couldn't find any mention of them on http://postgresapp.com/. Just noticed the releases history on Github.
I upgraded my Ubuntu 8.04 To Ubuntu 10.04. Unfortunately, the upgrade process also updated the Postgres 8.3 install to a Postgres 8.4 install. My feeling is that although database engine binaries have been updated, the database itself was not migrated, hence it can not be loaded by the 8.4.
Since the 8.3 data format is not compatible with 8.4 format, altering postgresql.conf is not enough, nor can I use pg_dump with my 8.4 install.
I need a way to upgrade my previous base from 8.3 to 8.4, with no access to a 8.3 engine, only a 8.4.
Any clue?
The postgres packages in Debian, and hence, Ubuntu, has a very clearly defined way of upgrading from one Postgres version to another. The procedure is documented in /usr/share/doc/postgresql-common/README.Debian as follows:
Default clusters and upgrading
------------------------------
When installing a postgresql-X.Y package from scratch, a default
cluster 'main' will automatically be created. This operation is
equivalent to doing 'pg_createcluster X.Y main --start'.
Due to this default cluster, an immediate attempt to upgrade an
earlier 'main' cluster to a new version will fail and you need to
remove the newer default cluster first. E. g., if you have
postgresql-8.2 installed and want to upgrade to 8.3, you first install
postgresql-8.3:
apt-get install postgresql-8.3
Then drop the default 8.3 cluster:
pg_dropcluster 8.3 main --stop
And then upgrade the 8.2 cluster to 8.3:
pg_upgradecluster 8.2 main
The best time to do this is before ugrading to a version of Ubuntu where the version of Postgresql you're currently running has been removed, i.e. in this example, while on a version of Ubuntu that has the possibility to install both Postgres 8.3 and Postgres 8.4. In my case, I went from jaunty to karmic, upgraded 8.3 to 8.4 and then went from karmic to lucid.
The upgrade process as described above is very smooth. The *pg_upgradecluster* command will stop the old version, migrate data, then start the new version on the same port as the old version, finally starting the old version on a new port.
If you did not migrate your 8.3 postgres data before moving to an Ubuntu version that lacks postgres 8.3, migrating is still simple. Start by adding the karmic ubuntu repository to /etc/apt/sources.list:
deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe
Install postgresql-8.3:
apt-get update && apt-get install postgresql-8.3
Drop your 8.4 cluster. Warning: This will remove data in your postgresql 8.4 installation if you have any. But if you're only doing this because you need to upgrade your 8.3 to 8.4, you will have no data in your 8.4 cluster.
pg_dropcluster 8.4 main --stop
And then upgrade the 8.3 cluster to 8.4:
pg_upgradecluster 8.3 main
Finally, remove the postgresql-8.3 package, and remove the jaunty-line from /etc/apt/sources.list, then run apt-get update again.
As usual, taking a backup of your postgres directories before doing any of the above is always a good idea.
You'll have to install PostgreSQL 8.3 in temporary location from source, copy your old data there, start Pg, dump it's data using pd_dumpall and then import this data to new Postgres.
It's impossible without installing Pg 8.3.
Make sure you backup everything before you try anything.
There is the pg_migrator project which I think will do that for you, though I'm not sure whether it needs to 8.3 applications or source code.
I'm trying to install phpPgAdmin as an XAMPP addon when I encountered an error because the latest phpPgAdmin supports upto PostgreSQL version 8.3.x. So I decided to install PostgreSQL 8.3.11 instead of the latest (PGSQL 8.4.x). Will this matter to my OSM application? Thanks!
There are a lot of advantages to Postgres 8.4 over 8.3, and Open Street Map / PostGIS should work on it, so I'd recommend using 8.4 for the Postgres version, and instead grabbing the latest version of phpPgAdmin from the projects github repo (http://github.com/xzilla/phppgadmin), which fully supports 8.4. That will tide you over until the next official phpPgAdmin release, which is scheduled to happen in the next few weeks.
The only link between OSM and postgresql is probably postgis.
Postgis lastest version (1.5.1) requires postgresql >= 8.3, so the answer is no, it won't matter - if, of course, I understood your question correctly.