Re: [GENERAL] Improve MMO Game Performance

2012-10-18 Thread Albe Laurenz
Chris Angelico wrote: >> - Set fsync=off and hope you don't crash. > > Ouch. I might consider that for a bulk import operation or something, > but not for live usage. There's plenty else can be done without > risking data corruption. I didn't mean that to be an alternative that anybody should con

Re: [GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-18 Thread Albe Laurenz
Craig Ringer wrote: > > Why? They can be serialized. The outcome would be exactly the same > > if session 2 completed before session 1 began. > > Hmm. Good point; so long as *either* ordering is valid it's fine, it's > only when *both* orderings are invalid that a serialization failure > would occ

Re: [GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-18 Thread Chris Angelico
On Thu, Oct 18, 2012 at 3:08 PM, Craig Ringer wrote: > BTW, the issue with the underlying question is that their "name" column is > unique. They expected to get a serialization failure on duplicate insert > into "name", not a unique constraint violation. The question wasn't "why > doesn't this fai

Re: [GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-18 Thread Kevin Grittner
Chris Angelico wrote: > Craig Ringer wrote: >> BTW, the issue with the underlying question is that their "name" >> column is unique. They expected to get a serialization failure on >> duplicate insert into "name", not a unique constraint violation. >> The question wasn't "why doesn't this fail" bu

Re: [GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-18 Thread Chris Angelico
On Thu, Oct 18, 2012 at 11:26 PM, Kevin Grittner wrote: > updating a "last_used" number in a table and > using the result (if it is *is* critical that there are no gaps in > the numbers). Correct me if I'm wrong, but wouldn't: update some_table set last_used=last_used+1 returning last_used simp

Re: [GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-18 Thread Kevin Grittner
Chris Angelico wrote: > Correct me if I'm wrong, but wouldn't: > > update some_table set last_used=last_used+1 returning last_used > > simply block until the other transaction is committed/rolled back? Only at the READ COMMITTED transaction isolation level. > That avoids all the issues of ser

Re: [GENERAL] Improve MMO Game Performance

2012-10-18 Thread Alvaro Herrera
Albe Laurenz wrote: > Arvind Singh wrote: > > Are there any particular settings or methods available to improve Just > insert_table operations > > The obvious ones: > - Wrap several of them in a transaction. > - Increase checkpoint_segments. > - Set fsync=off and hope you don't crash. I think it

Re: [GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-18 Thread Chris Angelico
On Fri, Oct 19, 2012 at 1:22 AM, Kevin Grittner wrote: > Now, if no records are inserted or deleted by another connection, how > many rows will be deleted by this statement?: > > delete from rc where id = (select min(id) from rc); > > It's a trick question; the answer depends on a race condition.

Re: [GENERAL] Improve MMO Game Performance

2012-10-18 Thread Albe Laurenz
Alvaro Herrera wrote: >>> Are there any particular settings or methods available to improve Just >>> insert_table operations >> >> The obvious ones: >> - Wrap several of them in a transaction. >> - Increase checkpoint_segments. >> - Set fsync=off and hope you don't crash. > > I think it would work

[GENERAL] postgresql error while connecting to cluster with pgadmin

2012-10-18 Thread GMAIL
i have created two cluster in the same host the first called "main" with port 5432 the second called "remote" with port 5433. but when i try to connect with pgadmin3 to the second cluster i get the error "authentication failed". if i try to connect to the first cluster i don't have any kind of p

Re: [GENERAL] postgresql error while connecting to cluster with pgadmin

2012-10-18 Thread Raymond O'Donnell
On 18/10/2012 15:47, GMAIL wrote: > i have created two cluster in the same host the first called "main" with > port 5432 the second called "remote" with port 5433. > but when i try to connect with pgadmin3 to the second cluster i get the > error "authentication failed". > if i try to connect to the

[GENERAL] retrieving keys from a GIN index on a tsvector column in Postgres 9.1?

2012-10-18 Thread Chris Esposito
Hi, I've got a collection of documents that I'd like to do some full text searching on in Postgres 9.1, so adding them as the contents of a tsvector and then creating a GIN index on this column seems straightforward enough. My understanding of the GIN index is that the keys used are (depedning

Re: [GENERAL] pg_stats in 9.2

2012-10-18 Thread Guillaume Lelarge
On Wed, 2012-10-17 at 11:57 -0400, Tom Lane wrote: > Guillaume Lelarge writes: > > Anyone care to explain all this to me? :) > > Try the stats-slot type specifications in > src/include/catalog/pg_statistic.h > Oh, OK, got it. The three more values are, in order, the smaller frequency, the bigg

[GENERAL] oracle_fdw

2012-10-18 Thread hartrc
Environment: PostgreSQL 9.1.6 SLES 11 SP2 Oracle_fdw 0.9.7 I am trying to implement the use of oracle_fdw. So far I have installed an oracle client on my postgres server. I can connect to the oracle environment from the postgres server (as postgres os user) by navigating to $ORACLE_HOME/bin then

Re: [GENERAL] retrieving keys from a GIN index on a tsvector column in Postgres 9.1?

2012-10-18 Thread Tom Lane
Chris Esposito writes: > I've got a collection of documents that I'd like to do some full text > searching on in Postgres 9.1, so adding them as the contents of a tsvector > and then creating a GIN index on this column seems straightforward enough. > My understanding of the GIN index is that t

Re: [GENERAL] retrieving keys from a GIN index on a tsvector column in Postgres 9.1?

2012-10-18 Thread Craig Ringer
On 10/19/2012 03:13 AM, Chris Esposito wrote: Hi, I've got a collection of documents that I'd like to do some full text searching on in Postgres 9.1, so adding them as the contents of a tsvector and then creating a GIN index on this column seems straightforward enough. Is this your SO ques