Re: [GENERAL] Bidirectional replication

2011-05-02 Thread Sim Zacks
On 05/03/2011 09:15 AM, tushar nehete wrote: Hi, Is there any way to do bidirectional replication for Postgresql Plus Advance Server 8.4.5? I tried SLONY-I but its master-slave asynchronous replication. Can we configure master-master replication by slony? Or is there any trusted tool to do

Re: [GENERAL] Bidirectional replication

2011-05-02 Thread John R Pierce
On 05/02/11 11:15 PM, tushar nehete wrote: Hi, Is there any way to do bidirectional replication for Postgresql Plus Advance Server 8.4.5? PostgreSQL Plus Advanced Server is a commercial product sold by EntepriseDB, you probably should ask them I tried SLONY-I but its master-slave asynchr

Re: [GENERAL] Seg Fault in backend after beginning to use xpath (PG 9.0, FreeBSD 8.1)

2011-05-02 Thread alan bryan
On Mon, May 2, 2011 at 10:39 PM, Tom Lane wrote: > alan bryan writes: >> Checking out postgres.core and we see: > >> (gdb) bt >> #0  0x0008f5f19afd in pthread_mutex_lock () from /lib/libthr.so.3 >> #1  0x000800d22965 in xmlRMutexLock () from /usr/local/lib/libxml2.so.5 >> #2  0x000800

[GENERAL] Bidirectional replication

2011-05-02 Thread tushar nehete
Hi, Is there any way to do bidirectional replication for Postgresql Plus Advance Server 8.4.5? I tried SLONY-I but its master-slave asynchronous replication. Can we configure master-master replication by slony? Or is there any trusted tool to do it? Regards, Tushar

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Greg Smith
John R Pierce wrote: otoh, there's plenty of places where natural keys are optimal. my company makes widgets, and we make damn sure our serial #s and part numbers are unique, and we use them as PK's for the various tables. Sure; what I was commenting on is that you normally can't ever trust

Re: [GENERAL] Seg Fault in backend after beginning to use xpath (PG 9.0, FreeBSD 8.1)

2011-05-02 Thread Tom Lane
alan bryan writes: > Checking out postgres.core and we see: > (gdb) bt > #0 0x0008f5f19afd in pthread_mutex_lock () from /lib/libthr.so.3 > #1 0x000800d22965 in xmlRMutexLock () from /usr/local/lib/libxml2.so.5 > #2 0x000800d717e1 in xmlDictReference () from /usr/local/lib/libxml2.

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Scott Ribe
On May 2, 2011, at 10:53 PM, Rob Sargent wrote: > ...and you're at risk of having to reformat them when you buy out your > competitor. The scheme described was awfully similar to one that a client of mine used, product family prefix, identifiers within the family. And guess what? The scheme, w

Re: [GENERAL] Help with database recovery ...

2011-05-02 Thread Tom Lane
Craig Ringer writes: > This message is very weird: "could not read from file "pg_clog/02CD" at > offset 73728: Success". Probably indicates an attempted read from beyond EOF. The main relation-access code paths have been fixed to give a more intelligible error message about that case, but it doe

[GENERAL] Seg Fault in backend after beginning to use xpath (PG 9.0, FreeBSD 8.1)

2011-05-02 Thread alan bryan
Our developers started to use some xpath features and upon deployment we now have an issue where PostgreSQL is seg faulting periodically. Any ideas on what to look at next would be much appreciated. FreeBSD 8.1 PostgreSQL 9.0.3 (also tried upgrading to 9.0.4) built from ports Libxml2 2.7.6 (also

Re: [GENERAL] setting connection/ query timeout

2011-05-02 Thread tamanna madaan
Thanks Daniele -Original Message- From: Daniele Varrazzo [mailto:daniele.varra...@gmail.com] Sent: Wed 4/20/2011 1:15 AM To: tamanna madaan Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] setting connection/ query timeout On Tue, Apr 19, 2011 at 8:09 PM, tamanna madaan wrote:

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Craig Ringer
On 03/05/11 12:57, Rob Sargent wrote: > Hm.. Virtual machines as assets. Mortgage backed securities, anyone. Well, sure ... but the software running on them is tracked as part of licensing compliance efforts, whether or not the virtual hardware its self is an "asset" its self. The DB designer ch

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Rob Sargent
Craig Ringer wrote: On 03/05/11 11:07, Greg Smith wrote: That doesn't mean you can't use them as a sort of foreign key indexing the data; it just means you can't make them the sole unique identifier for a particular entity, where that entity is a person, company, or part. Classic ca

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Rob Sargent
John R Pierce wrote: otoh, there's plenty of places where natural keys are optimal. my company makes widgets, and we make damn sure our serial #s and part numbers are unique, and we use them as PK's for the various tables. further, the PN has a N digit prefix which is unique to a part fam

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Craig Ringer
On 03/05/11 11:07, Greg Smith wrote: > That doesn't mean you can't use > them as a sort of foreign key indexing the data; it just means you can't > make them the sole unique identifier for a particular entity, where that > entity is a person, company, or part. Classic case: a database here has se

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread John R Pierce
otoh, there's plenty of places where natural keys are optimal. my company makes widgets, and we make damn sure our serial #s and part numbers are unique, and we use them as PK's for the various tables. further, the PN has a N digit prefix which is unique to a part family, then a M digit suf

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Greg Smith
On 05/02/2011 10:06 PM, Rob Sargent wrote: You would be surprise how many "bob smith"s where born on the same day. But then they weren't all born in a hospital etc etc etc. I wouldn't be surprised. I once lived in a mile-square town (Hoboken, that's it's nickname). In that town were 40K res

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Craig Ringer
On 03/05/11 10:06, Rob Sargent wrote: > My wife works (at the sql level) with shall we say "records about > people". Real records, real people. Somewhere around 2 million unique > individuals, several million source records. They don't all have ssn, > they don't all have a drivers license. The

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Dann Corbit
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Rob Sargent > Sent: Monday, May 02, 2011 7:07 PM > To: Jeff Davis > Cc: Greg Smith; pgsql-general@postgresql.org > Subject: Re: [GENERAL] pervasiveness of surrogate (a

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Rob Sargent
Jeff Davis wrote: On Mon, 2011-05-02 at 11:10 -0400, Greg Smith wrote: The position Merlin has advocated here, that there should always be a natural key available if you know the data well enough, may be true. But few people are good enough designers to be sure they've made the decision cor

[GENERAL] We need you to beta-test PostgreSQL 9.1

2011-05-02 Thread Josh Berkus
As you've already read, PostgreSQL 9.1 Beta 1 is out. This means that the PostgreSQL developers have done most of the work, and it's now your turn. It's time for you to test PostgreSQL 9.1 and give us feedback. http://www.postgresql.org/about/news.1313 Given the record-setting number of new feat

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Scott Marlowe
On Mon, May 2, 2011 at 7:43 PM, Craig Ringer wrote: > I'm now strongly in favour of keeping an internal key that users never > see, and having separate user-visible identifiers. The users can demand > that those identifiers change format or generation method and it's an It's far easier to change

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Craig Ringer
On 03/05/11 08:25, Jeff Davis wrote: > You can generate your own keys, and if you hand them out to customers > and include them on paperwork, they are now a part of the reality that > your database models -- and therefore become natural keys. Invoice > numbers, driver's license numbers, etc., are

Re: [GENERAL] Help with database recovery ...

2011-05-02 Thread Craig Ringer
On 02/05/11 03:32, Iztok Stotl wrote: > My database crashed and server won't start ... > > -- > LOG: database system was interrupted while in recovery at 2011-05-01 > 19:31:37 CEST > HINT: This probably means that some data is corrupted and you

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Jeff Davis
On Mon, 2011-05-02 at 11:10 -0400, Greg Smith wrote: > The position Merlin > has advocated here, that there should always be a natural key available > if you know the data well enough, may be true. But few people are good > enough designers to be sure they've made the decision correctly, and th

Re: [GENERAL] Needs Suggestion

2011-05-02 Thread Craig Ringer
On 04/28/2011 02:11 AM, SUBHAM ROY wrote: I am using postgres 8.4.8, the above command explain(analyze,buffers) is not working. Is there a way to do that. Nope, the (BUFFERS) syntax was added in 9.0. Try the other suggestions about using table stats to determine what you want to know. -- Cra

Re: [GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread Scott Marlowe
On Mon, May 2, 2011 at 8:57 AM, Raymond O'Donnell wrote: > On 02/05/2011 15:51, Leif Biberg Kristensen wrote: >> >> On Monday 02 May 2011 16:28:48 Sim Zacks wrote: >> >>> sed for windows - http://gnuwin32.sourceforge.net/packages/sed.htm >> >> Whatever happened to edlin? > > Goodness, I'd forgotte

Re: [GENERAL] Pass age function to extract function

2011-05-02 Thread Rick Genter
Try removing the keyword "interval" (i.e., EXTRACT(MINUTE FROM TestRunTime)). Since TestRunTime is a column name, I think if you wanted to cast it as an INTERVAL you'd specify EXTRACT(MINUTE FROM TestRunTime::INTERVAL), but since TestRunTime is already an INTERVAL, the cast is redundant. On Mon, M

[GENERAL] Pass age function to extract function

2011-05-02 Thread Adam Bruss
Hello, How can one pass a non string literal interval to the extract function? For example: SELECT starttime, extract(minute from interval testruntime) as runtime from ( select age(endtime, starttime) as testruntime, ref_testnames_serial, starttime, endtime, dense_rank() over (order by startti

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Merlin Moncure
On Mon, May 2, 2011 at 10:10 AM, Greg Smith wrote: > On 05/01/2011 06:12 PM, Karsten Hilbert wrote: >> >> Good to know since I'm only a lowly medical doctor not >> having much schooling in database matters beyond this list, >> the PostgreSQL docs, and the Celko book. >> > > This debate exists at a

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Jim Irrer
I've been carefully reading all of the comments with great interest. Thanks very much for the thoughtful responses - very enlightening. - Jim (the topic originator) Jim Irrer ir...@umich.edu (734) 647-4409 University of Michigan Hospital Radiation Oncology 519 W. William St.

Re: [GENERAL] pipe line error (psql command)

2011-05-02 Thread jgoulet
I had a similar problem. When executing my shp2pgsql command within a bash shell script it failed and provided me with the valid options. Adrian Klaver, with a couple of emails back and forth, identified my error. I had not been using single and double quotes to assign my 'command' to a variable

Re: [GENERAL] auto-reconnect: temp schemas, sequences, transactions

2011-05-02 Thread Tom Lane
Marek =?utf-8?q?Wi=C4=99ckowski?= writes: > But what happens with a db transaction upon disconnect? If I have (say, in > c++ > code or a script): > begin; > query1; > query2; > query3; > query4; > query5; > commit; > (with possibly some extra c++ or script code in between queries), and > some

Re: [GENERAL] auto-reconnect: temp schemas, sequences, transactions

2011-05-02 Thread Marek Więckowski
Hi, On Monday 02 May 2011 16:43:54 Tom Lane wrote: > Marek Wieckowski writes: > > If I understand correctly, Tom's reply in: > > http://archives.postgresql.org/pgsql-general/2007-06/msg01668.php > > suggests that temp schemas are kept when a session gets disconnected > > because connections get a

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Greg Smith
On 05/01/2011 06:12 PM, Karsten Hilbert wrote: Good to know since I'm only a lowly medical doctor not having much schooling in database matters beyond this list, the PostgreSQL docs, and the Celko book. This debate exists at all levels of experience, and the only thing that changes as you

Re: [GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread Raymond O'Donnell
On 02/05/2011 15:51, Leif Biberg Kristensen wrote: On Monday 02 May 2011 16:28:48 Sim Zacks wrote: sed for windows - http://gnuwin32.sourceforge.net/packages/sed.htm Whatever happened to edlin? Goodness, I'd forgotten all about that - been a long time... Wikipedia says that it was removed

Re: [GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread Leif Biberg Kristensen
On Monday 02 May 2011 16:28:48 Sim Zacks wrote: > sed for windows - http://gnuwin32.sourceforge.net/packages/sed.htm Whatever happened to edlin? regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/m

Re: [GENERAL] auto-reconnect: temp schemas, sequences, transactions

2011-05-02 Thread Tom Lane
Marek =?utf-8?q?Wi=C4=99ckowski?= writes: > If I understand correctly, Tom's reply in: > http://archives.postgresql.org/pgsql-general/2007-06/msg01668.php suggests > that temp schemas are kept when a session gets disconnected because > connections get automatically re-established with the same

Re: [GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread Sim Zacks
On 05/02/2011 02:24 PM, sm wrote: hi, i want ot modify the pg_hba.conf file from command prompt i tried this command C:\Program Files\Postgresql\8.4\bin>pgadmin3/ch:"C:/program files/postgresql/8.4/data/pg_hba.conf but with this a window gets open and there is option to change methos md5

Re: [GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread Raymond O'Donnell
On 02/05/2011 12:24, sm wrote: hi, i want ot modify the pg_hba.conf file from command prompt i tried this command C:\Program Files\Postgresql\8.4\bin>pgadmin3/ch:"C:/program files/postgresql/8.4/data/pg_hba.conf but with this a window gets open and there is option to change methos md5 to t

[GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread sm
hi, i want ot modify the pg_hba.conf file from command prompt i tried this command C:\Program Files\Postgresql\8.4\bin>pgadmin3/ch:"C:/program files/postgresql/8.4/data/pg_hba.conf but with this a window gets open and there is option to change methos md5 to trust, is ther any parameters to p

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Andres Freund
On Thursday, April 28, 2011 08:31:09 PM Scott Ribe wrote: > Well, natural keys are quite obviously the way to go, when they exist. The > problem is, they usually don't really exist. What's usually proposed as a > natural key, will upon further investigation, either not be guaranteed > unique, or no

[GENERAL] auto-reconnect: temp schemas, sequences, transactions

2011-05-02 Thread Marek Więckowski
Hi, If I understand correctly, Tom's reply in: http://archives.postgresql.org/pgsql-general/2007-06/msg01668.php suggests that temp schemas are kept when a session gets disconnected because connections get automatically re-established with the same backend id, and if this succeeds the old temp

Re: [GENERAL] Postgresql, PSN hack and table limits

2011-05-02 Thread Mark Morgan Lloyd
Greg Smith wrote: On 05/01/2011 01:50 AM, Mark Morgan Lloyd wrote: Somebody is making a very specific claim that Postgres can support a limited number of rows Did you find this via http://www.reversecurity.com/2011/04/new-details-from-psn-hack.html ? That was the only Google-indexed source