Re: [GENERAL] How to add conversion between LATIN1 and WIN1251 ?

2011-11-25 Thread Condor
On 26.11.2011 00:42, Adrian Klaver wrote: On Friday, November 25, 2011 1:19:29 am Condor wrote: Hello, early postgresql versions (< 9.1) did not show this error message: FATAL conversion between LATIN1 and WIN1251 is not supported and connect to db. I access server over the network and every tim

[GENERAL] CPU choice for postgreSQL

2011-11-25 Thread Allan Kamau
Hello, I do have a read-only table having a field having long varbit data (of length 6000). And I have a function that performs various aggregate bitAND and bitOR operations on this field and other fields of this table. This function does not explicitly write any data to disk (here is hardly any d

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Tomas Vondra
Dne 26.11.2011 00:17, Cédric Villemain napsal(a): > Le 25 novembre 2011 23:47, Gaëtan Allart a écrit : >> Hello Tomas and Cédric, >> >> Right now, the server is not all right. Load is above 30 and queries are >> slow like hell. >> >> >> Here's the complete iotop. Note the 71 MB/s writes (apparentl

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Gaëtan Allart
Here are the latest checkpoint logs : LOG: checkpoint complete: wrote 842 buffers (0.1%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=168.970 s, sync=0.005 s, total=168.977 s LOG: checkpoint starting: time LOG: checkpoint complete: wrote 318 buffers (0.0%); 0 transaction log f

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Cédric Villemain
Le 25 novembre 2011 23:47, Gaëtan Allart a écrit : > Hello Tomas and Cédric, > > Right now, the server is not all right. Load is above 30 and queries are > slow like hell. > > > Here's the complete iotop. Note the 71 MB/s writes (apparently on SELECT > queries). > > Total DISK READ: 633.35 K/s | T

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Gaëtan Allart
Hello Tomas and Cédric, Right now, the server is not all right. Load is above 30 and queries are slow like hell. Here's the complete iotop. Note the 71 MB/s writes (apparently on SELECT queries). Total DISK READ: 633.35 K/s | Total DISK WRITE: 71.06 M/s TID PRIO USER DISK READ DISK WRI

Re: [GENERAL] How to add conversion between LATIN1 and WIN1251 ?

2011-11-25 Thread Adrian Klaver
On Friday, November 25, 2011 1:19:29 am Condor wrote: > Hello, > early postgresql versions (< 9.1) did not show this error message: > FATAL conversion between LATIN1 and WIN1251 is not supported > and connect to db. I access server over the network and every time when > I try to login because I wor

Re: [GENERAL] .dmp files in postgresql

2011-11-25 Thread Adrian Klaver
On Friday, November 25, 2011 12:04:38 pm Alpha Beta wrote: > Hi list, > > I have got two files (template1.dmp, example1.dmp) and I want to open them > in postgresql, I tried the following commands: > > - Import *template1 *: > * createdb -U postgres template1 > * psql -U postgres template

Re: [GENERAL] .dmp files in postgresql

2011-11-25 Thread Thom Brown
On 25 November 2011 20:31, Alpha Beta wrote: > While you say, I opened the file with bloc note and I noticed that it's not > a binary file but plain with SQL commands and so on. > I tried what you said also but didn't work. > Any suggestion? or maybe the commands I'm using doesn't find the path fo

Re: [GENERAL] .dmp files in postgresql

2011-11-25 Thread Alpha Beta
While you say, I opened the file with bloc note and I noticed that it's not a binary file but plain with SQL commands and so on. I tried what you said also but didn't work. Any suggestion? or maybe the commands I'm using doesn't find the path for the 2 files? 2011/11/25 Thom Brown > On 25 Novemb

Re: [GENERAL] Recommended Protocol: Adding Rows to Table

2011-11-25 Thread Rich Shepard
On Fri, 25 Nov 2011, Scott Mead wrote: Why don't you first load the data into a table (no primary key), then use SQL to find your dups? once loaded: SELECT , count(1) from group by 1 having count(1) > 1; At least then, you'll really know what you're in for. You can either script a DELETE or

Re: [GENERAL] .dmp files in postgresql

2011-11-25 Thread Thom Brown
On 25 November 2011 20:04, Alpha Beta wrote: > Hi list, > I have got two files (template1.dmp, example1.dmp) and I want to open them > in postgresql, I tried the following commands: > - Import template1 : >     * createdb -U postgres template1 >     * psql -U postgres template1 < template1.dmp > -

[GENERAL] .dmp files in postgresql

2011-11-25 Thread Alpha Beta
Hi list, I have got two files (template1.dmp, example1.dmp) and I want to open them in postgresql, I tried the following commands: - Import *template1 *: * createdb -U postgres template1 * psql -U postgres template1 < template1.dmp - Create the sample of the database: * createdb -U p

Re: [GENERAL] Recommended Protocol: Adding Rows to Table

2011-11-25 Thread Scott Mead
On Fri, Nov 25, 2011 at 11:05 AM, Rich Shepard wrote: > The data originated in a spreadsheet and, based on my experience, contains > duplicate records. After reformatting there are 143,260 rows to insert in > the table. The approach I tried seems to have problems (explained below) > and > I would

Re: [GENERAL] Recommended Protocol: Adding Rows to Table

2011-11-25 Thread Adrian Klaver
On 11/25/2011 08:49 AM, Rich Shepard wrote: On Fri, 25 Nov 2011, David Johnston wrote: Simplistically you load all the data into a staging table that has no natural primary key and then write a query that will result in only a single record for whatever you define as a primary key. Insert the r

Re: [GENERAL] Recommended Protocol: Adding Rows to Table

2011-11-25 Thread Rich Shepard
On Fri, 25 Nov 2011, David Johnston wrote: Simplistically you load all the data into a staging table that has no natural primary key and then write a query that will result in only a single record for whatever you define as a primary key. Insert the results of that query into the final table.

Re: [GENERAL] error when defining a search configuration named "default"

2011-11-25 Thread Tom Lane
robert rottermann writes: > Now when I try to create such a configuration using: > CREATE TEXT SEARCH CONFIGURATION default ( DEFAULT is a fully reserved word. If you insist on naming your configuration (or any other kind of SQL object) that, you'll need to double-quote the name ... not only her

Re: [GENERAL] Recommended Protocol: Adding Rows to Table

2011-11-25 Thread David Johnston
On Nov 25, 2011, at 11:05, Rich Shepard wrote: > The data originated in a spreadsheet and, based on my experience, contains > duplicate records. After reformatting there are 143,260 rows to insert in > the table. The approach I tried seems to have problems (explained below) and > I would like to

[GENERAL] Recommended Protocol: Adding Rows to Table

2011-11-25 Thread Rich Shepard
The data originated in a spreadsheet and, based on my experience, contains duplicate records. After reformatting there are 143,260 rows to insert in the table. The approach I tried seems to have problems (explained below) and I would like to learn the proper way to insert rows in either an empty

Re: [GENERAL] Recommendations for SSDs in production?

2011-11-25 Thread Yeb Havinga
On 2011-11-24 14:20, Yeb Havinga wrote: I really wonder at which point SSD life left will change to 99 on this drive.. Bingo! On the OCZ Vertex 2 PRO, SSD life left to 99 after just over 100PB written. 230 Life_Curve_Status 0x0013 100 100 000Pre-fail Always - 1

Re: [GENERAL] Hashing text in hexadecimal

2011-11-25 Thread Tomas Vondra
On 25 Listopad 2011, 15:15, mephysto wrote: > Hello to everyone, > I would need to hash some text and I would to produce an hexadecimal value > as result. > > Is there a postgres function to achieve this goal? What about md5(text)? If you need better hashing (e.g. sha-1), check pgcrypto contrib mo

[GENERAL] Hashing text in hexadecimal

2011-11-25 Thread mephysto
Hello to everyone, I would need to hash some text and I would to produce an hexadecimal value as result. Is there a postgres function to achieve this goal? Thank you very much. Mephysto -- View this message in context: http://postgresql.1045698.n5.nabble.com/Hashing-text-in-hexadecimal-tp50228

Re: [GENERAL] error when defining a search configuration named "default"

2011-11-25 Thread Szymon Guz
On 25 November 2011 14:34, robert rottermann wrote: > Hi there, > I inherited the support of a database with the ancient tsearch2. > > I uses a search configuration named "default" > > Now when I try to create such a configuration using: > CREATE TEXT SEARCH CONFIGURATION default ( > PARSER = "d

[GENERAL] error when defining a search configuration named "default"

2011-11-25 Thread robert rottermann
Hi there, I inherited the support of a database with the ancient tsearch2. I uses a search configuration named "default" Now when I try to create such a configuration using: CREATE TEXT SEARCH CONFIGURATION default ( PARSER = "default" ); I get an error: postgres=# CREATE TEXT SEARCH CONFIGUR

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Tomas Vondra
On 25 Listopad 2011, 12:43, Cédric Villemain wrote: > Le 25 novembre 2011 11:25, Tomas Vondra a écrit : >> On 24 Listopad 2011, 23:19, Cédric Villemain wrote: >>> >>> It seem you have an issue with your checkpoint syncing time, it is >>> fixed in 9.1 and backported in 9.0 here : >>> http://project

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Cédric Villemain
Le 25 novembre 2011 11:25, Tomas Vondra a écrit : > On 24 Listopad 2011, 23:19, Cédric Villemain wrote: >> Le 24 novembre 2011 20:38, Gaëtan Allart a écrit : >>> Finally, it "crashed" againŠ :-( >>> >>> Here's the output of iotop while databased was inaccessible : >>> >>> 32361 be/4 postgres    0

Re: [GENERAL] General performance/load issue

2011-11-25 Thread Tomas Vondra
On 24 Listopad 2011, 23:19, Cédric Villemain wrote: > Le 24 novembre 2011 20:38, Gaëtan Allart a écrit : >> Finally, it "crashed" againŠ :-( >> >> Here's the output of iotop while databased was inaccessible : >> >> 32361 be/4 postgres    0.00 B/s    0.00 B/s  0.00 % 99.99 % postgres: >> mydb >> my

[GENERAL] How to add conversion between LATIN1 and WIN1251 ?

2011-11-25 Thread Condor
Hello, early postgresql versions (< 9.1) did not show this error message: FATAL conversion between LATIN1 and WIN1251 is not supported and connect to db. I access server over the network and every time when I try to login because I work on latin1 I should export LANG="ru_RU.CP1251" for example