Re: [GENERAL] Improve MMO Game Performance

2012-10-27 Thread Torsten Zühlsdorff
Hello Arvind, the cyclic change idea is really marvellous , thank you You're welcome. :) but we store each round, because we need player actions for further analysis about game trends Normally the different analyze-forms and goals are known from the beginning. You could use a more compact

Re: [GENERAL] How to convert HEX to ASCII?

2011-12-03 Thread Torsten Zühlsdorff
Marti Raudsepp schrieb: On Fri, Dec 2, 2011 at 16:16, Torsten Zuehlsdorff wrote: But i clearly have a missunderstanding of other chars, like umlauts or utf-8 chars. This, for example, should return a 'ö': # SELECT chr(x'C3B6'::int); chr - 쎶 (1 row) That gives you the Unicode codepoint

Re: [GENERAL] Query runs in 335ms; function in 100,239ms : date problem?

2011-09-06 Thread Torsten Zühlsdorff
Rory Campbell-Lange schrieb: Try to run it as a prepared query - I guess you'll get about the same run time as with the function (i.e. over 100 seconds). The prepared query runs in almost exactly the same time as the function, but thanks for the suggestion. A very useful aspect of it is that I

Re: [GENERAL] PostgreSQL 'hosting'

2011-08-16 Thread Torsten Zühlsdorff
Dragan Zubac schrieb: Does anybody know if there're any companies offering PostgreSQL 'hosting' ? By 'hosting', I mean you get access to a database to which your application connects remotely and do sql stuff. 'Hosting' company takes care of database maintenance,backup,etc. Have a look at: htt

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-16 Thread Torsten Zühlsdorff
Josh Berkus schrieb: You do not have to be a C coder to be a patch reviewer. Pretty much all you need to know is: - how to checkout PostgreSQL from Git - how to build PostgreSQL from source - how to apply a patch If you know those three things, you can help with patch review. Of course, if yo

Re: [GENERAL] Changing SHMMAX

2011-02-02 Thread Torsten Zühlsdorff
Florian Weimer schrieb: Please guide me how to change it permanently and what is the correct value for it. I am going for 8GB . Usually, you can put these lines kernel.shmall = 90 kernel.shmmax = 90 into /etc/sysctl.conf. Run "sysctl -p" to activate them. However, this is

Re: [GENERAL] Problem with initdb: creates database which do not exists

2010-10-18 Thread Torsten Zühlsdorff
Thom Brown schrieb: initdb creates a database cluster, not a database. [..] Now i'm feeling like fool - this is so obviously. -.- I will stop posting stressed to the Usenet. I'm sorry. Thanks for your replies and time! Greetings, Torsten -- http://www.dddbl.de - ein Datenbank-Layer, der

[GENERAL] Problem with initdb: creates database which do not exists

2010-10-18 Thread Torsten Zühlsdorff
Hello, i'm using initdb of an PostgreSQL 8.4 installed over the port-system of FreeBSD: = > initdb foo --locale=de_DE.UTF-8 --lc-collate=de_DE.UTF-8 --lc-ctype=de_DE.UTF-8 --lc-messages=de_DE.UTF-8 --lc-monetary=de_DE.UTF-8 --lc-numeric=de_DE.UTF-8 --lc-time=de_DE.UTF-8 The files belon

Re: [GENERAL] InitDB: Bad system call

2010-08-16 Thread Torsten Zühlsdorff
Hello, ... The simplest explanation I can think of is that it's *only* shmctl that is malfunctioning, not the other SysV shared memory calls. Which is even weirder, and definitely seems to move the problem into the category of kernel bug rather than configuration mistake. Hmmm ... Google turn

Re: [GENERAL] InitDB: Bad system call

2010-08-15 Thread Torsten Zühlsdorff
Hello, Well, this seems to be clear proof for what everyone suspected all along: your kernel is rejecting SysV-shared-memory calls. I'm too tired to go check that that shmctl() is the first such syscall during the boot sequence, but it looks about right. So we're now back to the question of *w

Re: [GENERAL] InitDB: Bad system call

2010-08-15 Thread Torsten Zühlsdorff
Alban Hertroys schrieb: Core was generated by `postgres'. Program terminated with signal 12, Bad system call. Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexe

Re: [GENERAL] InitDB: Bad system call

2010-08-14 Thread Torsten Zühlsdorff
Tom Lane schrieb: Hm... /path/to/postgres? Not initdb? Yes; it's postgres that is failing, not initdb. Ok. But regardless what i use, it looks like: #0 0x000800bb166c in ?? () #1 0x005b158f in ?? () ... I believe that is not very helpful, is it? Nope, it's not. Could you

Re: [GENERAL] InitDB: Bad system call

2010-08-14 Thread Torsten Zühlsdorff
Tom Lane schrieb: =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= writes: It's the same like before, but this time with core-file! :) I don't know why, but now there is one. You can find it here: http://www.dddbl.de/postgres.core (2,4 MB) That's good, but the core file is pretty much useless to anyon

Re: [GENERAL] InitDB: Bad system call

2010-08-13 Thread Torsten Zühlsdorff
Hello Tom, How annoying :-(. I think what you need to do is use truss or strace or local equivalent with the follow-forks flag, so that you can see what the stand-alone backend process does, not just initdb itself. Ok, next round. I just have truss as an option, because strace didn't work at

Re: [GENERAL] InitDB: Bad system call

2010-08-13 Thread Torsten Zühlsdorff
Hi Glen, How annoying :-(. I think what you need to do is use truss or strace or local equivalent with the follow-forks flag, so that you can see what the stand-alone backend process does, not just initdb itself. Ok, next round. I just have truss as an option, because strace didn't work at my

Re: [GENERAL] InitDB: Bad system call

2010-08-12 Thread Torsten Zühlsdorff
Hi Tom, Please notice, that after changing the IPC-Settings of the system, no core-file is dumped anymore. Quiet interessting. How annoying :-(. I think what you need to do is use truss or strace or local equivalent with the follow-forks flag, so that you can see what the stand-alone backend

Re: [GENERAL] InitDB: Bad system call

2010-08-12 Thread Torsten Zühlsdorff
Hello, Excerpts from Torsten ZÌhlsdorff's message of mié ago 11 02:52:34 -0400 2010: Bad system call (core dumped) I think you should try harder to generate the core file. Maybe you have too low an "ulimit -c" setting? The kernel message indicates that core *is* being dumped. Possibly

Re: [GENERAL] InitDB: Bad system call

2010-08-12 Thread Torsten Zühlsdorff
Hello, The first suspicious i can see are a lots of "ERR#32 'Broken pipe'" entries. This is the result of postgres crashing and thus initdb being unable to write any more data to it. I think you should try harder to generate the core file. Maybe you have too low an "ulimit -c" setting? The

Re: [GENERAL] InitDB: Bad system call

2010-08-10 Thread Torsten Zühlsdorff
Hi Tom, Bad system call (core dumped) Have you tried running the initdb with strace or truss? That might give you a clue as to exactly what system call is failing. Your jail isn't allowing something fundamental here, but it's hard to guess what. Or even easier, gdb the core file ... As

Re: [GENERAL] InitDB: Bad system call

2010-08-10 Thread Torsten Zühlsdorff
Reko Turja schrieb: i've just compiled a new Jail at my FreeBDS 7.0-STABLE machine and trying to get PostgreSQL 9.0 Beta 4 running. Compiling etc works fine. Is the machine really running a pre-RELENG 7.0? As far as i now, we used the 7.0 versions some month after their release. So: no. Wh

Re: [GENERAL] InitDB: Bad system call

2010-08-10 Thread Torsten Zühlsdorff
Torsten Zühlsdorff schrieb: i've just compiled a new Jail at my FreeBDS 7.0-STABLE machine and trying to get PostgreSQL 9.0 Beta 4 running. Compiling etc works fine. But when i call the initdb, i get "Bad System Call" messages. Here is the output: $ /usr/local/pgsql/bin

Re: [GENERAL] InitDB: Bad system call

2010-08-10 Thread Torsten Zühlsdorff
Hello Thom, See http://www.postgresql.org/docs/9.0/static/kernel-resources.html and the section under NetBSD/OpenBSD. I already know the FreeBSD section. My current values are: kern.ipc.shmall: 131072 kern.ipc.shmmax: 2684225436 kern.ipc.semmap: 4096 kern.ipc.semmnu: 512 kern.ipc.semmns: 102

[GENERAL] InitDB: Bad system call

2010-08-09 Thread Torsten Zühlsdorff
Hello, i've just compiled a new Jail at my FreeBDS 7.0-STABLE machine and trying to get PostgreSQL 9.0 Beta 4 running. Compiling etc works fine. But when i call the initdb, i get "Bad System Call" messages. Here is the output: $ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -d Runnin

Re: [GENERAL] MySQL versus Postgres

2010-08-08 Thread Torsten Zühlsdorff
Scott Frankel schrieb: On Aug 6, 2010, at 6:13 AM, Torsten Zühlsdorff wrote: John Gage schrieb: On reflection, I think what is needed is a handbook that features cut and paste code to do the things with Postgres that people do today with MySQL. Everyone of my trainees want such thing

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Torsten Zühlsdorff
John Gage schrieb: On reflection, I think what is needed is a handbook that features cut and paste code to do the things with Postgres that people do today with MySQL. Everyone of my trainees want such thing - for databases, for other programming-languages etc. It's the worst thing you can g

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Torsten Zühlsdorff
John Gage schrieb: So, perhaps what is needed in any sort of battle with MySQL is an introductory documentation that gives specific examples of how to achieve "oh wow!" worthwhile results quickly with Postgres. I receive my "oh wow" when i do the same things in Postgres like in MySQL: Writti

Re: [GENERAL] Cognitive dissonance

2010-06-09 Thread Torsten Zühlsdorff
Brian Modra schrieb: Personally I like to use html docs, and it would be good if the documentation were downloadable from the postgresql website in other formats, for convenience... But, what I use is this, which works pretty well: (e.g. to get the 8.1 dosc) mkdir postgresql cd postgresql wge

Re: [GENERAL] 110,000,000 rows

2010-05-27 Thread Torsten Zühlsdorff
John Gage schrieb: Herbert Simon must be spinning in his grave...or smiling wisely. What does a human do with a petabyte of data? for example i have a private search-engine for my most often used sites. google and the other ones always know just a part of the whole site, my own one knowns a

Re: [GENERAL] 110,000,000 rows

2010-05-27 Thread Torsten Zühlsdorff
John Gage schrieb: Please forgive this intrusion, and please ignore it, but how many applications out there have 110,000,000 row tables? I recently multiplied 85,000 by 1,400 and said now way Jose. I have two private applications with about 250,000,000 rows a table. I could cluster them, bu

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-11 Thread Torsten Zühlsdorff
Thom Brown schrieb: A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. This problem is solved since nearly 5 years with PDO. You can use an abstraction like DDDBL (see m

Re: [GENERAL] PHP and PostgreSQL boolean data type

2010-02-10 Thread Torsten Zühlsdorff
Thom Brown schrieb: A long-standing problem we've had with PostgreSQL queries in PHP is that the returned data for boolean columns is the string 'f' instead of the native boolean value of false. This problem is solved since nearly 5 years with PDO. You can use an abstraction like DDDBL (see my

Re: [GENERAL] masking the code

2009-06-29 Thread Torsten Zühlsdorff
Jasen Betts schrieb: I've wrote a PLPGSQL stored procedure for a DB I've to delivery to my customer. The problem is that I want to hide the code of the stored procedure. I don't want that my customer is able to read the code of the my sp. Do exist a way to mask the code of the store procedure s

[GENERAL] How to return SETOF RECORD?

2009-05-04 Thread Torsten Zühlsdorff
Hello, i'm writting some functions for parsing urls and handling strings. But i have problems with the result set. I already figured out how to return a single record/row. But i need more. A good example for what i want is ts_debug(); cse=> SELECT alias, token from ts_debug('http://www.pos

[GENERAL] Fulltext: problem with english words in german text

2009-03-24 Thread Torsten Zühlsdorff
Hello, i have a problem with understanding fulltext search in PG 8.3. Example: CREATE TABLE tfulltext (body text, fulltext tsvector); INSERT INTO tfulltext VALUES ('title und description sind wichtige grundlagen', to_tsvector('pg_catalog.german', 'title und description sind wichtige grundlag

Re: [GENERAL] Fulltext: problem with english words in german text

2009-03-24 Thread Torsten Zühlsdorff
[..] I've just noticed, that i forgot to change the subject. While writing i figured out, that the question is not the one, i want to ask. I am sorry for confusions. Greetings, Torsten -- http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8 verschiedenen Datenbanksystemen abstrahi

Re: [GENERAL] Fulltext: problem with english words in german text

2009-03-24 Thread Torsten Zühlsdorff
Torsten Zühlsdorff schrieb: Hello, i have a problem with understanding fulltext search in PG 8.3. [..] I solved it. I have to specify the language in to_tsquery(). -.- Greetings, Torsten -- http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8 verschiedenen Datenbanksystemen

Re: [GENERAL] question about performance

2008-07-21 Thread Torsten Zühlsdorff
A. Kretschmer schrieb: if I have a table, the_table, with a DATE field, i'll call it 'day', and I'd like to find all rows whos day falls within a given month, which of the following methods is faster/costs less: 1. SELECT * FROM the_table WHERE day LIKE '2008-01-%'; 2.

Re: [GENERAL] Persistent connections in PHP

2007-08-17 Thread Torsten Zühlsdorff
Hannes Dorbath schrieb: On 15.08.2007 10:53, Torsten Zühlsdorff wrote: If the dictionary is not too large, you should store it directly in the memory of the server. Therefore you can use Shared Memory (http://www.php.net/shmop, http://de3.php.net/manual/en/ref.sem.php). Uhm, but how does

Re: [GENERAL] Persistent connections in PHP

2007-08-17 Thread Torsten Zühlsdorff
Hannes Dorbath schrieb: On 14.08.2007 23:13, Dmitry Koterov wrote: Pconnects are absolutely necessary if we use tsearch2, because it initializes its dictionaries on a first query in a session. It's a very heavy process (500 ms and more). So, if we do not use pconnect, we waste about 500 ms on ea