[GENERAL] Database recovery

2008-03-18 Thread veejar
Hello! My filesystem (UFS-FreeBSD) was crashed and I have lost files from PGSQL DATA DIR FOLDER after fsck-utility. I have lost files from directory "pg_xlog" I reset my pg_xlog. And now have such error by starting pgsql-server: LOG: database system was interrupted at 2008-03-18 22:29:48 EET L

[GENERAL] Join field values

2007-06-05 Thread veejar
Hello! I have such field in my table: field1 --- 1 2 3 4 5 I want to get such result from select: '1,2,3,4,5' - join all values in field1 with ',' // result must be varchar. Help to write SELECT-query for this task.

[GENERAL] Array extraction

2007-03-31 Thread veejar
Hi! I have such table: user_group - ug_id -> serial primary key ug_users -> int4[] For example table has such rows: ug_id | ug_users ---+-- 1| { 2,5,6 } 2| { 3,4,9 } I want to write SQL-query or write user defined function to get suc

[GENERAL] FreeBSD kernel configuration

2007-03-06 Thread veejar
Hi! I have server such configuration: 2 x Xeon LV DualCore 1.66GHz MEM 4Gb DDR2-400 2 x 250Gb SATA HDD I have 20 databases on PostgreSQL 8. 2 of them are more than 1GB. I have ~50 requests per second. What kernel setting can you recommend me? in /boot/loader.conf ??? kern.ipc.semmni= kern.ipc.

[GENERAL] LargeObjects Total Size

2007-01-04 Thread veejar
My pg_largeobject table filenode is 16404: (select relfilenode from pg_class where relname='pg_largeobject') Pages (record) count in table pg_largeobject: 73574 -> 144 MB (73574 * 2Kb) (select count(loid) from pg_largeobject) Relation pages count (in table pg_class) for table pg_largeobject: 237

[GENERAL] Restoring database from files on disk

2006-12-01 Thread veejar
Hello! I had problems with my HDD and i have lost many files. From my pgsql database files I have only "base"-folder. In this folder one is important database: base/45325101 I reinstall my postgresql-server. I have created new database with same name and have copied all files from my old folder