PostgreSQL v8.0?

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
acidbox
Forum User
Forum User
Posts: 75
Joined: Sat Aug 27, 2005 12:27 pm

Unread post by acidbox »

Scott,

First of all, I'm happy to say that I got this working after a grueling weekend :)

To get it working I did the following:

1.) installed the rpms and compat rpm.
Note: If you need to uninstall the compat rpm, you'll need to use rpm -e --nodeps in order to make it work.

2.) created a smylink from postgresql service to rhdb (this maintains backward compatibility with the plesk interaction to pgsql)

Code: Select all

ln -s /etc/init.d/postgresql /etc/rc.d/init.d/rhdb
3.) Backed up my packagemng utility

Code: Select all

cp /usr/local/psa/admin/sbin/packagemng /usr/local/psa/admin/sbin/packagemng.bak
4.) Created a new packagemng utility in /usr/local/psa/admin/sbin/packagemng

Code: Select all

#!/bin/bash

MYSQL_BIN_D=`grep MYSQL_BIN_D /etc/psa/psa.conf | awk '{print $2}'`

params=$*
pgsql_version=`rpm -q postgresql-server | sed 's/postgresql-server-//g'`

/usr/local/psa/admin/sbin/packagemng.orig ${params} | sed "s/^postgresql-server:.*/postgresql-server:${pgsql_version}/g"

echo "update Components set version='${pgsql_version}' where name='postgresql-server'" | $MYSQL_BIN_D/mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa
4.) Ran the new utility (i.e. /usr/local/psa/admin/sbin/packagemng)

5.) deleted my existing postgresql config from the database. To do this, I logged in to mysql and went to the psa db and then the misc table. Then from inside there, I deleted the postgresql_admin_login and postgresql_admin_passwd records.

Now, I was able to log into plesk and set a new root username and pw from the control panel. After this, Plesk 8.0.4 was completely working with the control panel.


Scott,

For your question yes, there are quite a few changes in the way that it accesses the database, which will break plesk compatibility.

Here's some vital information about it:
Also some keys of PgSQL utilities were change. For example 'createuser' utility:

# createuser --help
createuser creates a new PostgreSQL user.

Usage:
createuser [OPTION]... [USERNAME]

Options:
-a, --adduser user can add new users
-A, --no-adduser user cannot add new users
-d, --createdb user can create new databases
-D, --no-createdb user cannot create databases
-P, --pwprompt assign a password to new user
-E, --encrypted encrypt stored password
-N, --unencrypted do no encrypt stored password
-i, --sysid=SYSID select sysid for new user
-e, --echo show the commands being sent to the server
-q, --quiet don't write any messages
--help show this help, then exit
--version output version information, then exit

for PgSQL 7.4.3
and

$createuser --help
createuser creates a new PostgreSQL role.

Usage:
createuser [OPTION]... [USERNAME]

Options:
-s, --superuser role will be superuser
-S, --no-superuser role will not be superuser
-d, --createdb role can create new databases
-D, --no-createdb role cannot create databases
-r, --createrole role can create new roles
-R, --no-createrole role cannot create roles
-l, --login role can login (default)
-L, --no-login role cannot login
-i, --inherit role inherits privileges of roles it is a
member of (default)
-I, --no-inherit role does not inherit privileges
-c, --connection-limit=N connection limit for role (default: no limit)
-P, --pwprompt assign a password to new role
-E, --encrypted ??????????? ??????????? ??????
-N, --unencrypted ?? ????????? ??????????? ??????
-e, --echo ?????????? ??????? ???????????? ???????
-q, --quiet ?? ???????? ??????? ?????????
--help ???????? ??? ??????? ? ?????
--version ???????? ?????? ? ?????

for PgSQL 8.1

PosgreSQL hasn't 'user' objects but it has 'role' objects. Also there are a lot of other changes from PgSQL 7.x to
8.x.
Hope that helps anyone else who wasted their whole weekend on this :)
Later,

acidbox

Plesk 7.5.4 RHEL3
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

I mean new feature wise, you know to sort of let people know why they might want to run 8.1. I probably get more emails from people asking me why they should upgrade to mysql 4.1 than the ones asking how they could go about it.

Anyway great work! This should be very helpful for anyone doing a similar upgrade
acidbox
Forum User
Forum User
Posts: 75
Joined: Sat Aug 27, 2005 12:27 pm

Unread post by acidbox »

If you're looking for new features, check this article:

http://www.postgresql.org/docs/whatsnew
Later,

acidbox

Plesk 7.5.4 RHEL3
Post Reply