PostgreSQL 9.0.2 released

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video. It has native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others


The 9.0.2 update also contains several fixes for issues with features introduced or changed in version 9.0:

  • Fix low-risk potential denial of service against RADIUS login.
  • Make OFF keyword unreserved.
  • Fix bug in tracking of latest removed WAL segment in streaming replication.
  • Fix for buffer overrun in pg_upgrade.
  • Fix memory leak in autovacuum launcher.
  • Fix for race condition in transaction ID assignment and lock acquisition in hot standby.
  • Improve performance for parallel restore with many blobs.


Install Postgrsql Server  ON  Fedora/Centos

Login as the root user and enter the command:
# yum install postgresql postgresql-server



Start at boot Postgrsql

# chkconfig postgresql on

Start  Postgrsql  Service

# service postgresql start

Initializing database:                                     [  OK  ]
Starting postgresql service: [ OK ]


Connect Postgresql Server

psql: FATAL:  Ident authentication failed for user "postgres"
[root@centos5-unixmen ~]# su - postgres
-bash-3.2$ psql -d template1 -U postgres
Welcome to psql 8.1.22, the PostgreSQL interactive terminal.

Type:  copyright for distribution terms
h for help with SQL commands
? for help with psql commands
g or terminate with semicolon to execute query
q to quit

template1=#

Add a database with name alfa


template1=# CREATE DATABASE  alfa;
CREATE DATABASE


Add a database user James

template1=# CREATE USER zz WITH PASSWORD 'pass';
CREATE ROLE
template1=#

Now grant all privileges on database alfa for user James

template1=# GRANT ALL PRIVILEGES ON DATABASE alfa to zz;
GRANT
template1=#

Test if user zz can connect to the Database
add user James to the system first

[root@centos5-unixmen ~]# adduser   James
[root@centos5-unixmen ~]# passwd  James
Changing password for user James.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully


Connect the database alfa with user zz

#su - zz

[zz@centos5-unixmen ~]$ psql  alfa
Welcome to psql 8.1.22, the PostgreSQL interactive terminal.

Type:  copyright for distribution terms
h for help with SQL commands
? for help with psql commands
g or terminate with semicolon to execute query
q to quit

alfa=#


show the users and tables

alfa=# du
List of roles
Role name | Superuser | Create role | Create DB | Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
james     | no        | no          | no        | no limit    |
postgres  | yes       | yes         | yes       | no limit    |
zz        | yes       | yes         | yes       | no limit    |
(3 rows)

alfa=#




ENJOY





For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg