Postgresql tools
1, pgpool
2, pgtop
[box]:#pgtop -u DBUSER -d DATAB ASE -s 1
3, pgtune
4, pgfouine
5, phppgadmin
6, MicroOLAP Database Designer for PostgreSQL
7, pg_controldata
Tíz technológia amit mindenképp ismerned kell
1, OOP PHP
2, FreeBSD
3, SQL (MySQL, Postgresql)
4, Memcached
5, ZFS
6, HTTP (apache, lightthpd)
7, Smarty
9, PEAR
10, SVN, (git, cvs)
how to pear mdb2 statement prepare, execute, free
mdb2 = new &MDB2::factory($dsn, $options);
$sql = 'SELECT * FROM schema.table WHERE valueinteger = ? AND valuetext = ? AND valueboolean = ?';
$types = array('integer', 'text', 'boolean');
$statement = $mdb2->prepare($sql, $types);
$data = array('integer', 'text', true);
$resultset = $statement->execute($data);
$statement->free();
while ($rows = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC)) {
//todo
}
how to get back new value postgresql after insert
INSERT INTO distributors (did, dname) VALUES (DEFAULT, 'XYZ Widgets') RETURNING did;
how to dump postgresql pg_dump
pg_dump -U dbuser -d databasetodump -Fc -f /pathtodumpdir/dumpfilename.sql
Failed system call was shmget postgresql freebsd
DETAIL: Failed system call was shmget(key=xxx, size=xxx, xxx).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently xxxxxx bytes), reduce PostgreSQL's shared_buffers parameter (currently xxxxx) and/or its max_connections parameter (currently xxx).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
solution: raise semaphores number
$ sysctl -w kern.ipc.shmall=32768 $ sysctl -w kern.ipc.shmmax=134217728 $ sysctl -w kern.ipc.semmap=256
more info
edit sysctl.conf:kernel.shmall = xxxx kernel.shmmax = xxxx
The database cluster was initialized without HAVE_INT64_TIMESTAMP but the server was compiled with HAVE_INT64_TIMESTAMP.
FATAL: database files are incompatible with server
DETAIL: The database cluster was initialized without
HAVE_INT64_TIMESTAMP but the server was compiled with
HAVE_INT64_TIMESTAMP.
HINT: It looks like you need to recompile or initdb.
solution: deinstall postgre, reinstall postgre without
"INTDATE Builds with 64-bit date/time type (server)"



