Print

About
Install Tikiwiki with a PostgreSQL database (aka postgres or pgsql).
This small HowTo? is the start of my watch work on postgresql tikiwiki compliance. Environment is a GNU/Linux debian with 1.8.1 and with 1.9 versions.-- mose

Table Of Contents

Table of contents



Install & configure postgres


Make sure that the postgres module for php is installed, or things will silently fail later on.

Be sure that your postgres server is configured to accept password accounts :
root# vi /etc/postgresql/pg_hba.conf
...
local   all         all                                             password
host    all         all         127.0.0.1         255.255.255.255   password

Create a db user You may use any other auth scheme, that one is just easy and secure.
root# su - postgres
postgres$ createuser -P tikiwiki
Enter password for new user:
Enter it again:
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
postgres$ createdb -O tikiwiki tikiwiki
CREATE DATABASE
postgres$ exit
root# psql -U tikiwiki tikiwiki
Password:
Welcome to psql 7.4.1, the PostgreSQL interactive terminal.

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

tikiwiki=> \q
root#


Install Tikiwiki

Version 1.8.1 tarball

Get the tarball from http://sourceforge.net/project/showfiles.php?group_id=64258&release_id=193747 (external link)
mose$ tar xjf tikiwiki-1.8.1.tar.bz2
mose$ cd tikiwiki-1.8.1
mose$ psql -U tikiwiki tikiwiki < db/tiki-1.8-pgsql.sql
Password:

Version 1.9 cvs HEAD

mose$ cvs -z3 -d:ext:mose@cvs.sf.net:/cvsroot/tikiwiki co -d tiki19_psql tikiwiki
mose$ cd tiki19_psql
mose$ psql -U tikiwiki tikiwiki < db/tiki-1.9-pgsql.sql
Password:

Note: the pgsql output can generate some messages and say there were errors. You can ignore the errors sayingERROR: table "bla_bla" does not exist but if there are parsing errors it usually causes that some database tables are not to be created. It means the convertscripts/*.php file didn't worked properly and needs to be fixed to produce right syntax for PostgreSQL and then it must be run again (see below how to do it) to fix the tiki-1.9-pgsql.sql file.

Tikiwiki setup

You don't need to use tiki-install.php web install, the following manual install is enough
mose$ sudo ./setup.sh mose www-data 02777
mose$ vi db/local.php
<?php
$db_tiki     = 'pgsql';
$host_tiki   = 'localhost';
$user_tiki   = 'tikiwiki';
$pass_tiki   = '***';
$dbs_tiki    = 'tikiwiki';
?>

Then go to http://vhost/ (external link) or any url you configured in apache for going to tiki, connect as admin/admin, change admin password, and you can now configure tiki as any other tiki.

Regenerating the SQL file for latest features/bug fixes

When there's a change in db/tiki.sql file you can regenerate the tiki-<version>-pgsql.sql file yourself (if it wasn't done by someone else already) using the following commands (example, versions can differ):
cd db/convertscripts/
php mysql3topgsql72.php
mv 1.9.to_pgsql72.sql ../tiki-1.9-pgsql.sql

Do not edit the tiki-1.9-pgsql.sql file manually when it's not really needed ! If you don't backup the file it can be overwritten next time you update your Tiki

Known Issues

Store on disk not on db

As there are problems for handling binaries in tiki with postgres it's better to always choose storage on filesystem for file galleries, image galleries, forum attachments as well as for trackers and wiki.

No possibility to update DB without loose of data (?)

There's still no DB upgrade script written like for MySQL (tiki-1.8to1.9.sql)

Tiki User Tasks

They don't save. Only the following message appears:
Sorry, there was an error while trying to write data into the database


Saving large amounts of text.

This will generate a postgres error because the size of the text generates a btree index on the row which is too large for postgres. The error says something to the extent:
ERROR: index row requires XXXX bytes...

There is a sort of backdoor workaround and that is to modify two indices manually in postgres on the data column and put a where clause to limit the indexing size. Eg. where char_length("data") < 1000.

... gather here more information about specific needs with pgsql use ...




Contributors to this page: skeet0230 , luci1446 puntos  , rlpowell74 points  and mose2820 points  .
Page last modified on Tuesday 06 September 2005 23:33:59 CET by skeet0230.

Search Wiki PageName [toggle]

What theme do you use the most? [toggle]

To help determine the themes to include in the next Tiki release, please indicate what theme you now use (or use most). (Login necessary to vote.)

What theme do you use?
  • Bluegreen
  • Boreal
  • Codex
  • Damian
  • Dblue
  • Default
  • Elegant
  • Fmsc
  • Gemsi
  • Geo
  • Hec
  • Jalist
  • Lesjetesdelencre
  • Moreneat
  • Mose
  • Mozilla
  • Neat
  • Olive
  • Simple
  • Smartiki
  • Subsilver
  • Tceti
  • Tikigod
  • Tikineat
  • Tranquil
  • Trollparty
  • Whitebluegrey
  • (Other)
View Results
(Votes: 70)
Cookies must be allowed to vote

Menu [toggle]

Chatroom [toggle]

Click here to login to the TikiWiki IRC chatroom


Pop ups must be allowed by your browser.

Shoutbox [toggle]

chibaguy1239 points : New themes available to logged-in users: go to your MyTiki user prefs page. :-)
Darkbee50 points : Woohoo, 2.0 is here and it's looking good. Great work ladies and gents!
SEWilco37 points : Today's date is 2008-07-28.
Darkbee50 points : Apparently there was a power outage that caused some down-time.
Darkbee50 points : Has there been problems with the tikiwiki.org site? I haven't been able to get on all morning.
amateurathlete5 points : I have 1.9.10.1 now, should I bother upgrading to 1.9.11 before 2.0 is officially released?
Darkbee50 points : Have I missed an announcement about 1.10 becoming 2.0?
Frodoger2 points : twversion.class.php how to disable? Our tikiwiki don#t has internet access
CodyLoco23 points : @marclaporte: Is this a finished feature in 1.10? I'm running 1.10 on my site: www.clipsharewiki.com
marclaporte6764 points : CodyLoco: coming soon (1.10), yes
Powered by Tikiwiki Powered by PHP Powered by Smarty Powered by ADOdb Made with CSS Powered by RDF powered by The PHP Layers Menu System
RSS feed Wiki RSS feed Blogs RSS feed Articles RSS feed Image Galleries RSS feed File Galleries RSS feed Forums RSS feed Directories