[GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Sidney Cadot
Dear all, As a hobby project, I am toying around with a database containing about 5 million chess games. On average, these games have about 80 positions (~ 40 moves by both black and white), which means there are about 400 million chess positions in there. I have written code to extract these pos

[GENERAL] Value to long for type ....: Columnname missing

2012-04-11 Thread Thomas Guettler
Hi, I think it would be very good, if postgresql reports which column is too small: Value to long for type character varying(1024) (message translated from german to english) Is there a reason not to report the column name? How can you report feature request? Thomas Güttler -- Thomas

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Alban Hertroys
On 11 April 2012 09:15, Sidney Cadot wrote: > Dear all, > > As a hobby project, I am toying around with a database containing > about 5 million chess games. On average, these games have about 80 > positions (~ 40 moves by both black and white), which means there are > about 400 million chess posit

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Gianni Ciolli
On Wed, Apr 11, 2012 at 09:15:59AM +0200, Sidney Cadot wrote: > Dear all, > > As a hobby project, I am toying around with a database containing > about 5 million chess games. On average, these games have about 80 > positions (~ 40 moves by both black and white), which means there are > about 400 m

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Bèrto ëd Sèra
> > Hi! > > As a hobby project, I am toying around with a database containing > about 5 million chess games. On average, these games have about 80 > positions (~ 40 moves by both black and white), which means there are > about 400 million chess positions in there. > What happens if you think of

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Ondrej Ivanič
Hi, On 11 April 2012 17:15, Sidney Cadot wrote: > I have written code to extract these positions, and now I want to put > them into a Postgres database. Specifically, I want to do this in a > way that allows *fast* lookups of positions, e.g. "give me all > positions that have a White King on c4 a

[GENERAL] Query optimization

2012-04-11 Thread nissyre
Hi, I'm looking for materials about query optimization in PostgreSQL. I read documentation but it doesnt contain much information. Can you recommend a good book or website when i could learn something about this? thanks in advance for your help -- Sent via pgsql-general mailing list (p

[GENERAL] OS authentication on Windows

2012-04-11 Thread Kuba
Hi All, I am trying to setup PostgreSQL 9.1.3 for OS authentication when connecting through jdbc driver. Correct me if I am wrong, but: - I cannot use SSPI, because current jdbc driver does not support it - I cannot use GSSAPI, because Windows binary is not built with this support and cannot afford

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Gavin Flower
On 11/04/12 19:15, Sidney Cadot wrote: Dear all, As a hobby project, I am toying around with a database containing about 5 million chess games. On average, these games have about 80 positions (~ 40 moves by both black and white), which means there are about 400 million chess positions in there.

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Cédric Villemain
Le mercredi 11 avril 2012 09:15:59, Sidney Cadot a écrit : > Dear all, > > As a hobby project, I am toying around with a database containing > about 5 million chess games. On average, these games have about 80 > positions (~ 40 moves by both black and white), which means there are > about 400 mill

Re: [GENERAL] PANIC: corrupted item pointer

2012-04-11 Thread Janning Vygen
Am 06.04.2012 23:49, schrieb Jeff Davis: >> No, i didn't found any in my postgresql dirs. Should i have a core file >> around when i see a segmentation fault? What should i look for? > > It's an OS setup thing, but generally a crash will generate a core file > if it is allowed to. Use "ulimit -

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Michael Nolan
On 4/11/12, 乔志强 wrote: > >> Yes, increase wal_keep_segments. Even if you set wal_keep_segments to 64, >> the amount of disk space for WAL files is only 1GB, so there is no need to >> worry so much, I think. No? > > But when a transaction larger than 1GB... Then you may need WAL space larger than

Re: [HACKERS] [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Kevin Grittner
Michael Nolan wrote: > On 4/11/12, 乔志强 wrote: >> But when a transaction larger than 1GB... > > Then you may need WAL space larger than 1GB as well. For > replication to work, it seems likely that you may need to have > sufficient WAL space to handle a row, possibly the entire > transaction..

Re: [HACKERS] [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Michael Nolan
On 4/11/12, Kevin Grittner wrote: > Michael Nolan wrote: >> On 4/11/12, 乔志强 wrote: > >>> But when a transaction larger than 1GB... >> >> Then you may need WAL space larger than 1GB as well. For >> replication to work, it seems likely that you may need to have >> sufficient WAL space to handle a

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Fujii Masao
On Wed, Apr 11, 2012 at 3:31 PM, 乔志强 wrote: > So in sync streaming replication, if master delete WAL before sent to the > only standby, all transaction will fail forever, > "the master tries to avoid a PANIC error rather than termination of > replication." but in sync replication, termination of

Re: [GENERAL] Multiple Slave Failover with PITR

2012-04-11 Thread Sergey Konoplev
On Wed, Mar 28, 2012 at 11:35 AM, Albe Laurenz wrote: >> 1. Master dies :( >> 2. Touch the trigger file on the most caught up slave If the master was stopped properly will the slaves be in sync to each other? >> 3. Slave is now the new master. >> 4. On the other slaves do the following: >> 5. Sh

Re: [HACKERS] [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Michael Nolan
On 4/11/12, Fujii Masao wrote: > On Wed, Apr 11, 2012 at 3:31 PM, 乔志强 wrote: >> So in sync streaming replication, if master delete WAL before sent to the >> only standby, all transaction will fail forever, >> "the master tries to avoid a PANIC error rather than termination of >> replication." but

Re: [GENERAL] Multiple Slave Failover with PITR

2012-04-11 Thread Ken Brush
On Wed, Apr 11, 2012 at 9:03 AM, Sergey Konoplev wrote: > On Wed, Mar 28, 2012 at 11:35 AM, Albe Laurenz > wrote: >>> 1. Master dies :( >>> 2. Touch the trigger file on the most caught up slave > > If the master was stopped properly will the slaves be in sync to each other? I don't think you ca

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Fujii Masao
On Thu, Apr 12, 2012 at 12:56 AM, Fujii Masao wrote: > On Wed, Apr 11, 2012 at 3:31 PM, 乔志强 wrote: >> So in sync streaming replication, if master delete WAL before sent to the >> only standby, all transaction will fail forever, >> "the master tries to avoid a PANIC error rather than termination

Re: [GENERAL] Multiple Slave Failover with PITR

2012-04-11 Thread Sergey Konoplev
On Wed, Apr 11, 2012 at 8:12 PM, Ken Brush wrote: 8. Copy the history file from the new master to the slave (it's the most recent #.history file in the xlog directory) >> >> It will work in the case of archive_command presence only and I will >> need to sync the whole pg_xlog content if

Re: [GENERAL] Multiple Slave Failover with PITR

2012-04-11 Thread Ken Brush
On Wed, Apr 11, 2012 at 9:50 AM, Sergey Konoplev wrote: > On Wed, Apr 11, 2012 at 8:12 PM, Ken Brush wrote: > 8. Copy the history file from the new master to the slave (it's the > most recent #.history file in the xlog directory) >>> >>> It will work in the case of archive_command presenc

Re: [GENERAL] Multiple Slave Failover with PITR

2012-04-11 Thread Sergey Konoplev
On Wed, Apr 11, 2012 at 9:08 PM, Ken Brush wrote: > On Wed, Apr 11, 2012 at 9:50 AM, Sergey Konoplev wrote: >> On Wed, Apr 11, 2012 at 8:12 PM, Ken Brush wrote: >> 8. Copy the history file from the new master to the slave (it's the >> most recent #.history file in the xlog directory) >>>

Re: [GENERAL] efficient trigger function selection?

2012-04-11 Thread Kenneth Tilton
On Tue, Apr 10, 2012 at 4:59 PM, Jeff Davis wrote: > On Tue, 2012-04-10 at 16:07 -0400, Kenneth Tilton wrote: > > Suppose I have an RDF-style table (with columns for subject, > > predicate, various object types, and graph) and want to have dozens or > > even hundreds of trigger functions defined

Fwd: [HACKERS] [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-11 Thread Michael Nolan
-- Forwarded message -- From: Michael Nolan Date: Wed, 11 Apr 2012 14:48:18 -0400 Subject: Re: [HACKERS] [GENERAL] [streaming replication] 9.1.3 streaming replication bug ? To: Robert Haas On Wed, Apr 11, 2012 at 2:14 PM, Robert Haas wrote: > > > We've talked about teaching the

[GENERAL] non-static LIKE patterns

2012-04-11 Thread patrick keshishian
Hi all, I'm sure this has been discussed before, but I am not too sure what key search-terms to use to find any potentially relevant discussions. Issue: I have two tables, each has a column that contains a directory path. First table contains a starting path and the second holds sub-paths (retain

Re: [GENERAL] non-static LIKE patterns

2012-04-11 Thread Tom Lane
patrick keshishian writes: > I need to match entries in second table to the first, so I use the > following in my WHERE clause: > ... WHERE second.path LIKE first.path||'%' > This seemed to work at first, but it fails if the paths use > back-slashes (like Windows paths). By default, back-sl

Re: [GENERAL] Pg 9.1.3 pg_crypto question

2012-04-11 Thread Dick Wieland
I had the same problem. I can confirm that changing to bytea_output = 'escape' restores the previous behavior. Regards, Dick Wieland On 04/10/2012 01:50 PM, Tom Lane wrote: Aaron Burnett writes: 9.1.3 is just not decrypting nor throwing errors. 9.1.3# select decrypt_iv(decode('rkMRWpnnbj

Re: [GENERAL] non-static LIKE patterns

2012-04-11 Thread patrick keshishian
On Wed, Apr 11, 2012 at 4:07 PM, Tom Lane wrote: > patrick keshishian writes: >> I need to match entries in second table to the first, so I use the >> following in my WHERE clause: >>       ... WHERE second.path LIKE first.path||'%' >> This seemed to work at first, but it fails if the paths use >

Re: [GENERAL] non-static LIKE patterns

2012-04-11 Thread Tom Lane
patrick keshishian writes: > Thanks for the quick reply. Would be tough choosing another > "reasonable" ESCAPE character while dealing with paths. Will think > more about this. If you want it to be bulletproof, what I'd think about is something like WHERE second.path LIKE quote_like(firs

[GENERAL] Any information about the PostgreSQL Certified Engineer program?

2012-04-11 Thread Albretch Mueller
You can't find any books and if you go to the company they tell you ~ sraoss.co.jp/index_en.php ~ all you find are commercial services offered. No mention of the exam ~ Any suggestions? ~ Thank you lbrtchx -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] non-static LIKE patterns

2012-04-11 Thread hamann . w
Tom Lane wrote: patrick keshishian writes: > Thanks for the quick reply. Would be tough choosing another > "reasonable" ESCAPE character while dealing with paths. Will think > more about this. If you want it to be bulletproof, what I'd think about is something like WHERE second.path LI