Re: [GENERAL] Improve MMO Game Performance

2012-10-17 Thread Chris Angelico
On Mon, Oct 15, 2012 at 7:16 PM, Albe Laurenz 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. ChrisA -- Sent via pgsql-general mail

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

2012-10-17 Thread Craig Ringer
On 10/17/2012 04:16 PM, Albe Laurenz 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 failu

Re: [GENERAL] database corruption questions

2012-10-17 Thread Craig Ringer
On 10/18/2012 01:06 AM, Daniel Serodio wrote: Craig Ringer wrote: On 10/14/2012 05:53 AM, Heine Ferreira wrote: Hi Are there any best practices for avoiding database corruption? * Maintain rolling backups with proper ageing. For example, keep one a day for the last 7 days, then one a week fo

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Craig Ringer
Please reply to the mailing list, not directly to me. Reply follows below. On 10/17/2012 10:46 PM, GMAIL wrote: i want that the main pc save two identical databases, the first database will be saved on local hard drive and the second database will be saved on a nas. if the main pc has a failov

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread Chris Angelico
On Thu, Oct 18, 2012 at 2:32 AM, John Beynon wrote: > I just managed to solve the problem infact. > > The trailing 'e' character on the name was different for one row. All > my tools, (pgadmin and the source data in openoffice) showed the same > 'e' character but psql showed it as different charac

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Daniel Serodio (lists)
Shaun Thomas wrote: On 10/17/2012 12:53 PM, Daniel Serodio (lists) wrote: I've come across a few mentions of Heartbeat being used for PostgreSQL failover, do have any links to more information about this? This was the subject of my talk at PG Open this year. I've got the entire PDF of slides

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread John Beynon
I just managed to solve the problem infact. The trailing 'e' character on the name was different for one row. All my tools, (pgadmin and the source data in openoffice) showed the same 'e' character but psql showed it as different character... Thanks for all taking the time to read / answer. It st

Re: [GENERAL] database corruption questions

2012-10-17 Thread Daniel Serodio
Craig Ringer wrote: On 10/14/2012 05:53 AM, Heine Ferreira wrote: Hi Are there any best practices for avoiding database corruption? * Maintain rolling backups with proper ageing. For example, keep one a day for the last 7 days, then one a week for the last 4 weeks, then one a month for the

Re: [GENERAL] PostgreSQL training recommendations?

2012-10-17 Thread Vincent Veyron
Le jeudi 18 octobre 2012 à 01:42 +1100, Chris Angelico a écrit : > Is it possible somehow to claim that reading this list is > vital to your work, and therefore the 5 hours a week you spend > answering other threads (in order to repay the community) is a > legitimate work expense? :) > The rati

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Shaun Thomas
On 10/17/2012 12:53 PM, Daniel Serodio (lists) wrote: I've come across a few mentions of Heartbeat being used for PostgreSQL failover, do have any links to more information about this? This was the subject of my talk at PG Open this year. I've got the entire PDF of slides, liner notes, and in

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Alan Hodgson
> is it that you want? > I've come across a few mentions of Heartbeat being used for PostgreSQL > failover, do have any links to more information about this? If you're going to use Heartbeat on a 2-server setup, you should use DRBD for the replication, not the PostgreSQL replication. DRBD basical

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Tulio
Sorry Daniel, but I don't have.. and I was needing test this I was searching other tutorial... and was configuring ans testing.. are you brazilian.. not? read this.. http://www.hardware.com.br/tutoriais/drbd-heartbeat-samba/pagina2.html can be usefull for you..

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread Merlin Moncure
On Wed, Oct 17, 2012 at 5:48 AM, John Beynon wrote: > I have a pretty basic query; > > select distinct on (name) name, length(name) from > drugs > where customer_id IS NOT NULL > order by name; > > which I'd expect to only return me a single drug name if there are > duplicates, yet I get > > name

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Daniel Serodio (lists)
Tulio wrote: You can use a stream replication in hot standby (native) to have the same data and access in both (but not update and insert in the slave, just select) and create a virtual IP using heartbeat.. configuring a master to use some IP (virtual) and when this lost the IP, the second serv

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of John Beynon > Sent: Wednesday, October 17, 2012 6:48 AM > To: pgsql-general@postgresql.org > Subject: [GENERAL] problem with distinct not distincting... > > I have a

Re: [GENERAL] database corruption questions

2012-10-17 Thread Daniel Serodio (lists)
Craig Ringer wrote: On 10/14/2012 05:53 AM, Heine Ferreira wrote: Hi Are there any best practices for avoiding database corruption? * Maintain rolling backups with proper ageing. For example, keep one a day for the last 7 days, then one a week for the last 4 weeks, then one a month for the

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread Tom Lane
John Beynon writes: > I have a pretty basic query; > select distinct on (name) name, length(name) from > drugs > where customer_id IS NOT NULL > order by name; > which I'd expect to only return me a single drug name if there are > duplicates, yet I get > name | length > == > Roaccutane |

Re: [GENERAL] transaction log file "000000010000097600000051" could not be archived: too many failures

2012-10-17 Thread Mathew Thomas
Thanks...Removing the .ready files worked... Mathew On Tue, Oct 16, 2012 at 11:25 PM, Tom Lane wrote: > Mathew Thomas writes: > > I am getting the following error in my postgresql log file. > > > cp: cannot stat `pg_xlog/000109760051': No such file or > > directory > > If there's a

Re: [GENERAL] pg_stats in 9.2

2012-10-17 Thread Tom Lane
Guillaume Lelarge writes: > Anyone care to explain all this to me? :) Try the stats-slot type specifications in src/include/catalog/pg_statistic.h regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread Susan Cassidy
I see you have the length included. Perhaps, UTF8 characters in one and ascii in the other? Susan -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Susan Cassidy Sent: Wednesday, October 17, 2012 8:27 AM To: John Beynon;

[GENERAL] pg_stats in 9.2

2012-10-17 Thread Guillaume Lelarge
Hi, I try to understand the new columns in pg_stats in 9.2, but I'm kinda puzzled by the results. Here is the test case I'm working on: CREATE TABLE t1(c1 integer, c2 integer[]); INSERT INTO t1 select 1, '{4}'; INSERT INTO t1 select 2, '{5}'; INSERT INTO t1 select 3, '{6}'; ANALYZE t1; SELECT *

Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread Susan Cassidy
Are you sure that one of those entries doesn't have a trailing space? Susan -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of John Beynon Sent: Wednesday, October 17, 2012 3:48 AM To: pgsql-general@postgresql.org Subject:

Re: [GENERAL] Does Postgres Object-Relational Syntax follow Standard?

2012-10-17 Thread Will Rutherdale (rutherw)
From: Chris Travers [mailto:chris.trav...@gmail.com] Sent: 16 October 2012 22:37 To: Will Rutherdale (rutherw) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Does Postgres Object-Relational Syntax follow Standard? On Tue, Oct 16, 2012 at 2:00 PM, Will Rutherdale (rutherw) wrote: Hi.

Re: [GENERAL] Does Postgres Object-Relational Syntax follow Standard?

2012-10-17 Thread Will Rutherdale (rutherw)
> -Original Message- > From: Craig Ringer [mailto:ring...@ringerc.id.au] > Sent: 16 October 2012 21:27 > To: Will Rutherdale (rutherw) > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Does Postgres Object-Relational Syntax follow > Standard? > > On 10/17/2012 05:00 AM, Will Ruth

Re: [GENERAL] PostgreSQL training recommendations?

2012-10-17 Thread Scott Marlowe
On Wed, Oct 17, 2012 at 8:42 AM, Chris Angelico wrote: > On Thu, Oct 18, 2012 at 12:56 AM, Vincent Veyron wrote: >> >> I am surprised none of the fine contributors to this thread mentionned >> an activity they practice extensively, which is reading this list's >> content every day. >> >> Best tra

[GENERAL] problem with distinct not distincting...

2012-10-17 Thread John Beynon
I have a pretty basic query; select distinct on (name) name, length(name) from drugs where customer_id IS NOT NULL order by name; which I'd expect to only return me a single drug name if there are duplicates, yet I get name | length == Roaccutane | 10 Roaccutane | 10 table encoding is U

Re: [GENERAL] How to avoid base backup in automated failover

2012-10-17 Thread amitkapila [via PostgreSQL]
On Wednesday, October 17, 2012 3:09 PM chinnaobi wrote: > Hey Amitkapila, > > Thank you for the quick reply. > > How can implement this patch in windows, because I am using windows > 9.1.1 > postgreSQL application ?? > If the patch serves the feature you require, then once it gets committed (

Re: [GENERAL] How to avoid base backup in automated failover

2012-10-17 Thread chinnaobi [via PostgreSQL]
Hey Amitkapila, Thank you for the quick reply. How can implement this patch in windows, because I am using windows 9.1.1 postgreSQL application ?? ___ If you reply to this email, your message will be added to the discussion below: http://postgresq

Re: [GENERAL] PostgreSQL training recommendations?

2012-10-17 Thread Chris Angelico
On Thu, Oct 18, 2012 at 12:56 AM, Vincent Veyron wrote: > > I am surprised none of the fine contributors to this thread mentionned > an activity they practice extensively, which is reading this list's > content every day. > > Best training material ever in my opinion. A pay-for magazine you can p

Re: [GENERAL] to_date() accepts wrong input data

2012-10-17 Thread Tom Lane
Andreas Kretschmer writes: > Hi, > I'm a little bit astonished: > test=*# select to_date('2012/30/03','/mm/dd'); > to_date > > 2014-06-07 > (1 row) > test=*# select to_date('2013/02/29','/mm/dd'); > to_date > > 2013-03-01 > (1 row) > Bug or feature? Versi

[GENERAL] to_date() accepts wrong input data

2012-10-17 Thread Andreas Kretschmer
Hi, I'm a little bit astonished: test=*# select to_date('2012/30/03','/mm/dd'); to_date 2014-06-07 (1 row) test=*# select to_date('2013/02/29','/mm/dd'); to_date 2013-03-01 (1 row) Bug or feature? Version is 9.2.0 Andreas -- Really, I'm not out to de

Re: [GENERAL] PostgreSQL Magazine

2012-10-17 Thread Fathi Ben Nasr
Thank You. On Wed, 2012-10-17 at 12:49 +0200, Albe Laurenz wrote: > Fathi Ben Nasr wrote: > > Is there a PostgreSQL magazine like the one sent by Oracle to whom > > requests it ? > > > > If answer is yes: how to sbscribe to it ? > > > > Else > > > > I know this could cost a lot to print such m

Re: [GENERAL] PostgreSQL training recommendations?

2012-10-17 Thread Vincent Veyron
I am surprised none of the fine contributors to this thread mentionned an activity they practice extensively, which is reading this list's content every day. Best training material ever in my opinion. -- Vincent Veyron http://marica.fr/ Logiciel de gestion des assurances sinistres et des dossie

Re: [GENERAL] Strategies/Best Practises Handling Large Tables

2012-10-17 Thread Chris Travers
On Fri, Oct 12, 2012 at 7:44 AM, Chitra Creta wrote: > Hi, > > I currently have a table that is growing very quickly - i.e 7 million > records in 5 days. This table acts as a placeholder for statistics, and > hence the records are merely inserted and never updated or deleted. > > Many queries are

Re: [GENERAL] PostgreSQL Magazine

2012-10-17 Thread Fathi Ben Nasr
Thank You. On Wed, 2012-10-17 at 14:44 +0200, damien clochard wrote: > Le 17/10/2012 12:35, Fathi Ben Nasr a écrit : > > Hello, > > > > Hi > > > Is there a PostgreSQL magazine like the one sent by Oracle to whom > > requests it ? > > > > PostgreSQL Magazine started two years ago. The second i

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Tulio
You can use a stream replication in hot standby (native) to have the same data and access in both (but not update and insert in the slave, just select) and create a virtual IP using heartbeat.. configuring a master to use some IP (virtual) and when this lost the IP, the

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Craig Ringer
On 17/10/2012 9:20 PM, GMAIL wrote: it's possible to access the same data from two different servers. the two servers have the same IP and not run simultaneously On shared storage? Yes, but it's a bad idea, because if they're ever both started at the same time the data will be critically corru

[GENERAL] allow servers to access to the same data

2012-10-17 Thread GMAIL
it's possible to access the same data from two different servers. the two servers have the same IP and not run simultaneously -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL Magazine

2012-10-17 Thread damien clochard
Le 17/10/2012 12:35, Fathi Ben Nasr a écrit : > Hello, > Hi > Is there a PostgreSQL magazine like the one sent by Oracle to whom > requests it ? > PostgreSQL Magazine started two years ago. The second issue will be released in a few weeks. So far the magazine is available for free online (down

[GENERAL] pgBadger 2.1 released

2012-10-17 Thread damien clochard
Paris, France - October 17th, 2012 DALIBO is proud to announce the release of version 2.1 of pgBadger, the new PostgreSQL log analyzer. pgBadger is built for speed with fully detailed reports from your PostgreSQL log file. It's a single and small Perl script that aims to replace and to outperform

Re: [GENERAL] PostgreSQL Magazine

2012-10-17 Thread Albe Laurenz
Fathi Ben Nasr wrote: > Is there a PostgreSQL magazine like the one sent by Oracle to whom > requests it ? > > If answer is yes: how to sbscribe to it ? > > Else > > I know this could cost a lot to print such magazines, but maybe a pdf > version could be affordable. > > The main idea behind thi

[GENERAL] PostgreSQL Magazine

2012-10-17 Thread Fathi Ben Nasr
Hello, Is there a PostgreSQL magazine like the one sent by Oracle to whom requests it ? If answer is yes: how to sbscribe to it ? Else I know this could cost a lot to print such magazines, but maybe a pdf version could be affordable. The main idea behind this is to "show" there a big active co

Re: [GENERAL] Streaming replication failed to start scenarios

2012-10-17 Thread Albe Laurenz
chinnaobi wrote: >> When the standby is promoted, it starts a new time line, so it >> is on a different time line from the old master. The old >> primary cannot be turned to a standby without a new base backup >> (possibly via rsync to speed up things). > But taking 200 GB to 500 GB DB base backu

Re: [GENERAL] Streaming replication failed to start scenarios

2012-10-17 Thread chinnaobi
Hey Laurenz Albe, Thank you for the quick reply.. > 3. When the dead primary is switchedto standby the streaming is not > happening due to current_wal_location is ahead in the standby server is > ahead of wal_sent_location. In this case how can I start streaming without > taking a fresh base

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

2012-10-17 Thread Albe Laurenz
Craig Ringer wrote: > In this SO question: > > http://dba.stackexchange.com/questions/26905/how-do-i-implement-insert-i f-not-found-for-transactions- > at-serializable-isolatio/26909#26909 > > the author is running a series of queries that I'd expect to abort on commit with a serialisation > fail

Re: [GENERAL] help for this situation

2012-10-17 Thread Albe Laurenz
GMAIL wrote: > i describe the situation: > i have two pc with postgressql server: > - a main pc, with ip 192.168.5.1 turned on > - a "backup" pc, with ip 192.168.5.1 turned off > > i want that the main pc saves the database in local hard drive and on a > nas real-time. when the main pc has a failu

Re: [GENERAL] Replication - doubts

2012-10-17 Thread Albe Laurenz
Jayadevan M wrote: > I went through the documentation on replication. and am trying to understand the various options > available. > > Does replication available in PostgreSQL always use WAL (i.e irrespective of whether it is > synchronous/asynchronous, whether it is using archived logs or 'live'

Re: [GENERAL] Streaming replication failed to start scenarios

2012-10-17 Thread Albe Laurenz
chinnaobi wrote: > I have been testing streaming replication in windows with postgres 9.1.1. > For few scenario's I haven't found a solution. Please advice me. > > 1. Precautions before promoting standby server to primary manually > considering the dead primary server ?? You don't have to take an

[GENERAL] help for this situation

2012-10-17 Thread GMAIL
i describe the situation: i have two pc with postgressql server: - a main pc, with ip 192.168.5.1 turned on - a "backup" pc, with ip 192.168.5.1 turned off i want that the main pc saves the database in local hard drive and on a nas real-time. when the main pc has a failure, i turn on, manually,