Re: [GENERAL] Copying only incremental records to another DB..

2009-06-28 Thread Arndt Lehmann
On Jun 29, 1:10 pm, phoenix.ki...@gmail.com (Phoenix Kiula) wrote: > Hi > > We're trying PG on a new machine, so we copied our current (live) > database to that server. Tested the code and it's all working. Now, to > make that second server the main live server, we will need to copy the > db again

[GENERAL] Copying only incremental records to another DB..

2009-06-28 Thread Phoenix Kiula
Hi We're trying PG on a new machine, so we copied our current (live) database to that server. Tested the code and it's all working. Now, to make that second server the main live server, we will need to copy the db again including the new records since we copied for testing. Is there any way to cop

Re: [GENERAL] another can't connect

2009-06-28 Thread BJ Freeman
sorry about the post did not do a reply all and sent a personal replay yes in the chain I have ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED it is the next to last rule. Andrej sent the following on 6/28/2009 8:14 PM: > 2009/6/29 BJ Freeman : ACCEPT

Re: [GENERAL] another can't connect

2009-06-28 Thread Andrej
2009/6/29 BJ Freeman : >>> ACCEPT tcp -- localhostlocalhost tcp >>> dpt:postgres state NEW >> >> What about established connections? > tcp0 0 127.0.0.1:5432 0.0.0.0:* >LISTEN > is the only line for that port I think Chris meant "What about i

Re: [GENERAL] another can't connect

2009-06-28 Thread Chris
Please don't top-post, it's so hard to follow discussions. Chris sent the following on 6/28/2009 7:33 PM: BJ Freeman wrote: PostgreSQL version 8.1.11 (With schemas) I have read the recent emails and believe I have covered all the bases from net stat tcp0 0 127.0.0.1:5432

Re: [GENERAL] another can't connect

2009-06-28 Thread BJ Freeman
tcp0 0 127.0.0.1:5432 0.0.0.0:* LISTEN is the only line for that port Chris sent the following on 6/28/2009 7:33 PM: > BJ Freeman wrote: >> PostgreSQL version 8.1.11 (With schemas) >> I have read the recent emails and believe I have covered all the bases >> from net s

Re: [GENERAL] another can't connect

2009-06-28 Thread Chris
BJ Freeman wrote: PostgreSQL version 8.1.11 (With schemas) I have read the recent emails and believe I have covered all the bases from net stat tcp0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 5091/postmaster I do a psql -h 127.0.0.1 -U ofbiz -d ofbiz from a terminal on

[GENERAL] another can't connect

2009-06-28 Thread BJ Freeman
PostgreSQL version 8.1.11 (With schemas) I have read the recent emails and believe I have covered all the bases from net stat tcp0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 5091/postmaster I do a psql -h 127.0.0.1 -U ofbiz -d ofbiz from a terminal on the server. and ge

[GENERAL] Re: partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Arndt Lehmann
On Jun 29, 3:45 am, armstrong.w...@gmail.com (Whit Armstrong) wrote: > Thanks, Tom. > > Let me give a little more detail on my actual data rather than the > simple example I sent. > > I have a 60GB table of loan balances, which I've partitioned into 26 tables. > > The loan id's are a sequence of 6

[GENERAL] Re: partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Arndt Lehmann
> Hi Whit, > > you could consider using GUIDs instead of Integer for primary keys. > Here is a nice blog post explaining how to do this in Rails: >    http://ariejan.net/2008/08/12/ruby-on-rails-uuid-as-your-activerecord... > > Best Regards, >   Arndt Lehmann just a note: As per above blog post, t

[GENERAL] Re: partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Arndt Lehmann
> Hi Whit, > > you could consider using GUIDs instead of Integer for primary keys. > Here is a nice blog post explaining how to do this in Rails: >    http://ariejan.net/2008/08/12/ruby-on-rails-uuid-as-your-activerecord... > > Best Regards, >   Arndt Lehmann just a note: As per above blog post, t

Re: [GENERAL] partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Whit Armstrong
Thanks, Tom. Let me give a little more detail on my actual data rather than the simple example I sent. I have a 60GB table of loan balances, which I've partitioned into 26 tables. The loan id's are a sequence of 6 characters, so the partitioning rule I've used is the first character of the loan

Re: [GENERAL] partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Tom Lane
Whit Armstrong writes: > I have a simple example copied from the 8.3 manual on partitioning > (http://www.postgresql.org/docs/8.3/interactive/ddl-partitioning.html). > My question is, if you create a serial type in the parent table which > is meant to be the primary key across all the partitions,

Re: [GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-06-28 Thread Justin
APseudoUtopia wrote: thread, then logs out (intending to read all the other forum threads at some point in the future when they log in again). If I used a VIEW, it would automatically consider all those unread forum posts to be read when the user logs out. That wouldn't work. What if a

Re: [GENERAL] horizontal sharding

2009-06-28 Thread mobiledreamers
Thanks a lot greg trying it out If it does not work i ll post to pgpool groups thanks again but i think what you have pointed out is the right solution On Sat, Jun 27, 2009 at 10:59 PM, Greg Smith wrote: > On Fri, 26 Jun 2009, mobiledream...@gmail.com wrote: > > 2009-06-26 18:48:34 ERROR: pid

[GENERAL] partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Whit Armstrong
I have a simple example copied from the 8.3 manual on partitioning (http://www.postgresql.org/docs/8.3/interactive/ddl-partitioning.html). My question is, if you create a serial type in the parent table which is meant to be the primary key across all the partitions, how does one guarantee uniquene

Re: [GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-06-28 Thread APseudoUtopia
On Sat, Jun 27, 2009 at 9:13 PM, justin wrote: > APseudoUtopia wrote: > > Hey list, > > I have a query which allows users to "Catch up" on read posts on the > forum. It works by either updating or inserting the "last post read" > number from every forum thread into the readposts table (for that > u

Re: [GENERAL] Replication and coding good practices

2009-06-28 Thread David Fetter
On Sun, Jun 28, 2009 at 12:05:08PM +0200, Ivan Sergio Borgonovo wrote: > I'm starting to see the need of a replication solution in my > horizon. > > I've learned that some replication solution require code > modification, some require different assumption abut how connections > behave... > > Are

Re: [GENERAL] data modeling question

2009-06-28 Thread andy
Brandon Metcalf wrote: I asked a question similar to this a couple of weeks ago, but the requirement has changed a bit and I want to be sure I'm designing my tables correctly. I have the following table: CREATE TABLE workorder ( numberVARCHAR(8), quantity INTEGER, generic B

[GENERAL] Replication and coding good practices

2009-06-28 Thread Ivan Sergio Borgonovo
I'm starting to see the need of a replication solution in my horizon. I've learned that some replication solution require code modification, some require different assumption abut how connections behave... Are there any rules of thumb to consider for making an application easier to work with a "g