Re: horizontal sharding

Lists: pgsql-general
From: mobiledreamers(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: horizontal sharding
Date: 2009-06-15 07:32:15
Message-ID: c1870d60906150032l5b11e6ebof78e021a02e3a307@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hey guys
what is a good way to horizontal shard in postgresql
1. pgpool 2
2. gridsql

which is a better way to use sharding

also is it possible to paritition without changing client code
thanks

--
Bidegg worlds best auction site
http://bidegg.com


From: David Fetter <david(at)fetter(dot)org>
To: mobiledreamers(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-15 15:07:30
Message-ID: 20090615150730.GD20647@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, Jun 15, 2009 at 12:32:15AM -0700, mobiledreamers(at)gmail(dot)com wrote:
> Hey guys
> what is a good way to horizontal shard in postgresql

"Sharding" is not really a technical term, so it's not really possible
to answer this question meaningfully as posed.

What is it that you actually want to accomplish here exactly? What
are your goals, and what are your priorities on those goals? What
will you trade off to achieve them?

> 1. pgpool 2
> 2. gridsql
>
> which is a better way to use sharding
>
> also is it possible to paritition without changing client code

Almost certainly not. This would be one of the trade-offs mentioned
above.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


From: Jim Mlodgenski <jimmy76(at)gmail(dot)com>
To: mobiledreamers(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-15 17:28:41
Message-ID: dd92004a0906151028ke9ceb1fv50ab920095fab5bb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

what is a good way to horizontal shard in postgresql

> 1. pgpool 2
> 2. gridsql
>
> which is a better way to use sharding
>

Both are good methods of sharding, but it depends on your goals. GridSQL is
better in reporting applications where as PG Pool2 is better in
transactional situations.

>
> also is it possible to paritition without changing client code

Yes, but it depends on the SQL in your client code. If you are just using
simple SQL with no stored functions, you should be able to slip in either
solution without changing the client code.

--
Jim Mlodgenski
EnterpriseDB (http://www.enterprisedb.com)


From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-15 17:36:30
Message-ID: 4A36869E.2040800@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Jim Mlodgenski wrote:
>
>
> also is it possible to paritition without changing client code
>
> Yes, but it depends on the SQL in your client code. If you are just
> using simple SQL with no stored functions, you should be able to slip
> in either solution without changing the client code.
>

what about queries that need to do joins or aggregate reporting across
the partitions?!? I can't see how that could be done transparently
short of something like Oracle RAC.


From: Jim Mlodgenski <jimmy76(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-15 17:44:31
Message-ID: dd92004a0906151044h5dea9f1agbeed017d000ec7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

what about queries that need to do joins or aggregate reporting across the
partitions?!? I can't see how that could be done transparently short of
something like Oracle RAC.
GridSQL actually does a nice job of breaking up the query and optimizing it
appropriately to handle cross node joins. There are agents running on each
of the nodes that handles the inter-node communication allowing it to be
transparent to the calling application.

--
Jim Mlodgenski
EnterpriseDB (http://www.enterprisedb.com)


From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-15 18:49:39
Message-ID: dcc563d10906151149v6bc605cn6b13708b926063f5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, Jun 15, 2009 at 11:36 AM, John R Pierce<pierce(at)hogranch(dot)com> wrote:
> Jim Mlodgenski wrote:
>>
>>
>>    also is it possible to paritition without changing client code
>>
>> Yes, but it depends on the SQL in your client code. If you are just using
>> simple SQL with no stored functions, you should be able to slip in either
>> solution without changing the client code.
>
> what about queries that need to do joins or aggregate reporting across the
> partitions?!?  I can't see how that could be done transparently short of
> something like Oracle RAC.

If you use inheritance and therefore put the child tables on the same
server, it's invisible to the client that the table is partitioned.
Make sure you've got constraint_exclusion turned on.


From: mobiledreamers(at)gmail(dot)com
To: Jim Mlodgenski <jimmy76(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-25 06:01:30
Message-ID: c1870d60906242301j7d3a7dc8lc766f4a70fdf62f0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Jim thanks

Can you please show how to setup partitining in gridsql and pgpool 2

thanks a lot

On Mon, Jun 15, 2009 at 10:28 AM, Jim Mlodgenski <jimmy76(at)gmail(dot)com> wrote:

> what is a good way to horizontal shard in postgresql
>
>> 1. pgpool 2
>> 2. gridsql
>>
>> which is a better way to use sharding
>>
>
> Both are good methods of sharding, but it depends on your goals. GridSQL is
> better in reporting applications where as PG Pool2 is better in
> transactional situations.
>
>
>>
>> also is it possible to paritition without changing client code
>
> Yes, but it depends on the SQL in your client code. If you are just using
> simple SQL with no stored functions, you should be able to slip in either
> solution without changing the client code.
>
> --
> Jim Mlodgenski
> EnterpriseDB (http://www.enterprisedb.com)
>
>

--
Bidegg worlds best auction site
http://bidegg.com


From: mobiledreamers(at)gmail(dot)com
To: David Fetter <david(at)fetter(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-25 06:03:07
Message-ID: c1870d60906242303m1e2da9e4mfc607e7b1d9a55c8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

GOals are to scale our game for 10000 simultaneous connection to db
right now db crashing at 500 or 1000 sim connections

On Mon, Jun 15, 2009 at 8:07 AM, David Fetter <david(at)fetter(dot)org> wrote:

> On Mon, Jun 15, 2009 at 12:32:15AM -0700, mobiledreamers(at)gmail(dot)com wrote:
> > Hey guys
> > what is a good way to horizontal shard in postgresql
>
> "Sharding" is not really a technical term, so it's not really possible
> to answer this question meaningfully as posed.
>
> What is it that you actually want to accomplish here exactly? What
> are your goals, and what are your priorities on those goals? What
> will you trade off to achieve them?
>
> > 1. pgpool 2
> > 2. gridsql
> >
> > which is a better way to use sharding
> >
> > also is it possible to paritition without changing client code
>
> Almost certainly not. This would be one of the trade-offs mentioned
> above.
>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
>

--
Bidegg worlds best auction site
http://bidegg.com


From: David Fetter <david(at)fetter(dot)org>
To: mobiledreamers(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-25 15:12:35
Message-ID: 20090625151235.GA546@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Wed, Jun 24, 2009 at 11:03:07PM -0700, mobiledreamers(at)gmail(dot)com wrote:
> GOals are to scale our game for 10000 simultaneous connection to db
> right now db crashing at 500 or 1000 sim connections

Consider using pgbouncer to multiplex your database connections.

If that doesn't work, consider hiring one of the PostgreSQL consulting
outfits like Command Prompt, Endpoint, OmniTI, or the one I work for,
PostgreSQL Experts <http://www.pgexperts.com/>

Cheers,
David.
> On Mon, Jun 15, 2009 at 8:07 AM, David Fetter <david(at)fetter(dot)org>
> wrote:
>
> > On Mon, Jun 15, 2009 at 12:32:15AM -0700, mobiledreamers(at)gmail(dot)com
> > wrote:
> > > Hey guys what is a good way to horizontal shard in postgresql
> >
> > "Sharding" is not really a technical term, so it's not really
> > possible to answer this question meaningfully as posed.
> >
> > What is it that you actually want to accomplish here exactly?
> > What are your goals, and what are your priorities on those goals?
> > What will you trade off to achieve them?
> >
> > > 1. pgpool 2 2. gridsql
> > >
> > > which is a better way to use sharding
> > >
> > > also is it possible to paritition without changing client code
> >
> > Almost certainly not. This would be one of the trade-offs
> > mentioned above.

--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: mobiledreamers(at)gmail(dot)com
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-25 17:28:55
Message-ID: dcc563d10906251028v3827793dkb00b3ad6b630b924@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Thu, Jun 25, 2009 at 12:03 AM, <mobiledreamers(at)gmail(dot)com> wrote:
> GOals are to scale our game for 10000 simultaneous connection to db
> right now db crashing at 500 or 1000 sim connections

Definitely look into pooling. I've got a pretty hefty database server
(16 15k5 drives, HW RAID, 32Gig RAM and 8 cores) and I wouldn't DREAM
of trying to handle 10,000 simo connections with it.


From: mobiledreamers(at)gmail(dot)com
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 00:35:04
Message-ID: c1870d60906261735k6472e801q5bfcb105e2e72e42@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

can someone show how to setup pgpool 2 in parallel replication modethanks a
lot

On Thu, Jun 25, 2009 at 10:28 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> On Thu, Jun 25, 2009 at 12:03 AM, <mobiledreamers(at)gmail(dot)com> wrote:
> > GOals are to scale our game for 10000 simultaneous connection to db
> > right now db crashing at 500 or 1000 sim connections
>
> Definitely look into pooling. I've got a pretty hefty database server
> (16 15k5 drives, HW RAID, 32Gig RAM and 8 cores) and I wouldn't DREAM
> of trying to handle 10,000 simo connections with it.
>

--
Bidegg worlds best auction site
http://bidegg.com


From: mobiledreamers(at)gmail(dot)com
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 00:35:23
Message-ID: c1870d60906261735x157e1abdne278f33ab16bb496@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

can someone show how to setup pgpool 2 in parallel *query* mode ie
horizontal partitioningthanks a lot

On Fri, Jun 26, 2009 at 5:35 PM, <mobiledreamers(at)gmail(dot)com> wrote:

> can someone show how to setup pgpool 2 in parallel replication modethanks
> a lot
>
>
> On Thu, Jun 25, 2009 at 10:28 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:
>
>> On Thu, Jun 25, 2009 at 12:03 AM, <mobiledreamers(at)gmail(dot)com> wrote:
>> > GOals are to scale our game for 10000 simultaneous connection to db
>> > right now db crashing at 500 or 1000 sim connections
>>
>> Definitely look into pooling. I've got a pretty hefty database server
>> (16 15k5 drives, HW RAID, 32Gig RAM and 8 cores) and I wouldn't DREAM
>> of trying to handle 10,000 simo connections with it.
>>
>
>
>
> --
> Bidegg worlds best auction site
> http://bidegg.com
>

--
Bidegg worlds best auction site
http://bidegg.com


From: John R Pierce <pierce(at)hogranch(dot)com>
To: mobiledreamers(at)gmail(dot)com
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 00:56:26
Message-ID: 4A456E3A.90407@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

mobiledreamers(at)gmail(dot)com wrote:
> can someone show how to setup pgpool 2 in parallel *query* mode ie
> horizontal partitioning

did you look at
http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel
?

I'd pay close attention to the restrictions here, too...
http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#restriction


From: mobiledreamers(at)gmail(dot)com
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 01:50:40
Message-ID: c1870d60906261850pa9a2e42jb567f0abf9677206@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hey johnthanks

i did read both extensively, but finishing all the steps parallel mode or
horizontal partitioning mode doesnot work!

but this is my conf file

# backend_hostname, backend_port, backend_weight
# here are examples
backend_hostname0 = 'localhost'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/mnt/work/database'

backend_hostname1 = 'marc.somehost.com'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/mnt/work/database'

*this is the problem*
* pgpool-II-2.2.2]$ createdb -p 9999*
*createdb: could not connect to database postgres: server closed the
connection unexpectedly*
* This probably means the server terminated abnormally*
* before or while processing the request.*
------------------------------------------------------------------------------------------------------------------------------------
Error in log
*tail -f /tmp/pgpool.log
2009-06-26 17:24:07 LOG: pid 5561: pgpool successfully started
2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match
between between master(0) slot[1] (50331648)
2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed*
*
*
*tail -f /tmp/pgpool.log
2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: backend key data received
2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: transaction state: I
2009-06-26 18:49:40 DEBUG: pid 23466: I am 23466 accept fd 7
2009-06-26 18:49:40 DEBUG: pid 23466: Protocol Major: 3 Minor: 0 database:
postgres user: mark
2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 0 backend
2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 1 backend
2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 0
length: 8
2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 1
length: 8
2009-06-26 18:49:40 ERROR: pid 23466: pool_read_int: data does not match
between between master(0) slot[1] (50331648)
2009-06-26 18:49:40 ERROR: pid 23466: pool_do_auth: read auth kind failed

*
*
*On Fri, Jun 26, 2009 at 5:56 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:

> mobiledreamers(at)gmail(dot)com wrote:
>
>> can someone show how to setup pgpool 2 in parallel *query* mode ie
>> horizontal partitioning
>>
>
> did you look at
> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel?
>
> I'd pay close attention to the restrictions here, too...
> http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#restriction
>
>
>

--
Bidegg worlds best auction site
http://bidegg.com


From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: mobiledreamers(at)gmail(dot)com
Cc: John R Pierce <pierce(at)hogranch(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 05:53:15
Message-ID: dcc563d10906262253i7c1ac5eau338f5a1f31cc0144@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I thought pgool II was abandonware...

On Fri, Jun 26, 2009 at 7:50 PM, <mobiledreamers(at)gmail(dot)com> wrote:
> Hey john
> thanks
> i did read both extensively, but finishing all the steps parallel mode or
> horizontal partitioning mode doesnot work!
> but this is my conf file
>
> # backend_hostname, backend_port, backend_weight
> # here are examples
> backend_hostname0 = 'localhost'
> backend_port0 = 5432
> backend_weight0 = 1
> backend_data_directory0 = '/mnt/work/database'
> backend_hostname1 = 'marc.somehost.com'
> backend_port1 = 5432
> backend_weight1 = 1
> backend_data_directory1 = '/mnt/work/database'
> this is the problem
>  pgpool-II-2.2.2]$ createdb -p 9999
> createdb: could not connect to database postgres: server closed the
> connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> ------------------------------------------------------------------------------------------------------------------------------------
> Error in log
> tail -f /tmp/pgpool.log
> 2009-06-26 17:24:07 LOG: pid 5561: pgpool successfully started
> 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match
> between between master(0) slot[1] (50331648)
> 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed
> tail -f /tmp/pgpool.log
> 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: backend key data received
> 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: transaction state: I
> 2009-06-26 18:49:40 DEBUG: pid 23466: I am 23466 accept fd 7
> 2009-06-26 18:49:40 DEBUG: pid 23466: Protocol Major: 3 Minor: 0 database:
> postgres user: mark
> 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 0 backend
> 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 1 backend
> 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 0
> length: 8
> 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 1
> length: 8
> 2009-06-26 18:49:40 ERROR: pid 23466: pool_read_int: data does not match
> between between master(0) slot[1] (50331648)
> 2009-06-26 18:49:40 ERROR: pid 23466: pool_do_auth: read auth kind failed
>
> On Fri, Jun 26, 2009 at 5:56 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
>>
>> mobiledreamers(at)gmail(dot)com wrote:
>>>
>>> can someone show how to setup pgpool 2 in parallel *query* mode ie
>>> horizontal partitioning
>>
>> did you look at
>> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel
>> ?
>>
>> I'd pay close attention to the restrictions here, too...
>> http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#restriction
>>
>>
>
>
>
> --
> Bidegg worlds best auction site
> http://bidegg.com
>

--
When fascism comes to America, it will be intolerance sold as diversity.


From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 05:59:24
Message-ID: dcc563d10906262259n72a2e82awacb7ff77a6c44ae7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, Jun 15, 2009 at 11:36 AM, John R Pierce<pierce(at)hogranch(dot)com> wrote:
> Jim Mlodgenski wrote:
>>
>>
>>    also is it possible to paritition without changing client code
>>
>> Yes, but it depends on the SQL in your client code. If you are just using
>> simple SQL with no stored functions, you should be able to slip in either
>> solution without changing the client code.
>
> what about queries that need to do joins or aggregate reporting across the
> partitions?!?  I can't see how that could be done transparently short of
> something like Oracle RAC.

You could make something reasonably fast and partitioned with pl/proxy
and views.


From: mobiledreamers(at)gmail(dot)com
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 07:17:00
Message-ID: c1870d60906270017v166acae3u4982f6813365aba0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

no it is very good and well designed the whole app code doesnt need to
change

we jus need to configure the pgpool insertion logic

and it has a cool pgpooladmin in php like phppgadmin

if only i can get it to work

On Fri, Jun 26, 2009 at 10:53 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> I thought pgool II was abandonware...
>
> On Fri, Jun 26, 2009 at 7:50 PM, <mobiledreamers(at)gmail(dot)com> wrote:
> > Hey john
> > thanks
> > i did read both extensively, but finishing all the steps parallel mode or
> > horizontal partitioning mode doesnot work!
> > but this is my conf file
> >
> > # backend_hostname, backend_port, backend_weight
> > # here are examples
> > backend_hostname0 = 'localhost'
> > backend_port0 = 5432
> > backend_weight0 = 1
> > backend_data_directory0 = '/mnt/work/database'
> > backend_hostname1 = 'marc.somehost.com'
> > backend_port1 = 5432
> > backend_weight1 = 1
> > backend_data_directory1 = '/mnt/work/database'
> > this is the problem
> > pgpool-II-2.2.2]$ createdb -p 9999
> > createdb: could not connect to database postgres: server closed the
> > connection unexpectedly
> > This probably means the server terminated abnormally
> > before or while processing the request.
> >
> ------------------------------------------------------------------------------------------------------------------------------------
> > Error in log
> > tail -f /tmp/pgpool.log
> > 2009-06-26 17:24:07 LOG: pid 5561: pgpool successfully started
> > 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match
> > between between master(0) slot[1] (50331648)
> > 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed
> > tail -f /tmp/pgpool.log
> > 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: backend key data
> received
> > 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: transaction state: I
> > 2009-06-26 18:49:40 DEBUG: pid 23466: I am 23466 accept fd 7
> > 2009-06-26 18:49:40 DEBUG: pid 23466: Protocol Major: 3 Minor: 0
> database:
> > postgres user: mark
> > 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 0
> backend
> > 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 1
> backend
> > 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 0
> > length: 8
> > 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 1
> > length: 8
> > 2009-06-26 18:49:40 ERROR: pid 23466: pool_read_int: data does not match
> > between between master(0) slot[1] (50331648)
> > 2009-06-26 18:49:40 ERROR: pid 23466: pool_do_auth: read auth kind failed
> >
> > On Fri, Jun 26, 2009 at 5:56 PM, John R Pierce <pierce(at)hogranch(dot)com>
> wrote:
> >>
> >> mobiledreamers(at)gmail(dot)com wrote:
> >>>
> >>> can someone show how to setup pgpool 2 in parallel *query* mode ie
> >>> horizontal partitioning
> >>
> >> did you look at
> >>
> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel
> >> ?
> >>
> >> I'd pay close attention to the restrictions here, too...
> >>
> http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#restriction
> >>
> >>
> >
> >
> >
> > --
> > Bidegg worlds best auction site
> > http://bidegg.com
> >
>
>
>
> --
> When fascism comes to America, it will be intolerance sold as diversity.
>

--
Bidegg worlds best auction site
http://bidegg.com


From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: mobiledreamers(at)gmail(dot)com
Cc: John R Pierce <pierce(at)hogranch(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 07:52:00
Message-ID: dcc563d10906270051j318ab75ck6b39cbe8a1b0f74d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Oh crap I think I mixed it up in my head with slony II. nevermind. :)

On Sat, Jun 27, 2009 at 1:17 AM, <mobiledreamers(at)gmail(dot)com> wrote:
> no it is very good and well designed the whole app code doesnt need to
> change
>
> we jus need to configure the pgpool insertion logic
>
> and it has a cool pgpooladmin in php like phppgadmin
>
> if only i can get it to work
>
> On Fri, Jun 26, 2009 at 10:53 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> wrote:
>>
>> I thought pgool II was abandonware...
>>
>> On Fri, Jun 26, 2009 at 7:50 PM, <mobiledreamers(at)gmail(dot)com> wrote:
>> > Hey john
>> > thanks
>> > i did read both extensively, but finishing all the steps parallel mode
>> > or
>> > horizontal partitioning mode doesnot work!
>> > but this is my conf file
>> >
>> > # backend_hostname, backend_port, backend_weight
>> > # here are examples
>> > backend_hostname0 = 'localhost'
>> > backend_port0 = 5432
>> > backend_weight0 = 1
>> > backend_data_directory0 = '/mnt/work/database'
>> > backend_hostname1 = 'marc.somehost.com'
>> > backend_port1 = 5432
>> > backend_weight1 = 1
>> > backend_data_directory1 = '/mnt/work/database'
>> > this is the problem
>> >  pgpool-II-2.2.2]$ createdb -p 9999
>> > createdb: could not connect to database postgres: server closed the
>> > connection unexpectedly
>> >         This probably means the server terminated abnormally
>> >         before or while processing the request.
>> >
>> > ------------------------------------------------------------------------------------------------------------------------------------
>> > Error in log
>> > tail -f /tmp/pgpool.log
>> > 2009-06-26 17:24:07 LOG: pid 5561: pgpool successfully started
>> > 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match
>> > between between master(0) slot[1] (50331648)
>> > 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed
>> > tail -f /tmp/pgpool.log
>> > 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: backend key data
>> > received
>> > 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: transaction state: I
>> > 2009-06-26 18:49:40 DEBUG: pid 23466: I am 23466 accept fd 7
>> > 2009-06-26 18:49:40 DEBUG: pid 23466: Protocol Major: 3 Minor: 0
>> > database:
>> > postgres user: mark
>> > 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 0
>> > backend
>> > 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 1
>> > backend
>> > 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 0
>> > length: 8
>> > 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot: 1
>> > length: 8
>> > 2009-06-26 18:49:40 ERROR: pid 23466: pool_read_int: data does not match
>> > between between master(0) slot[1] (50331648)
>> > 2009-06-26 18:49:40 ERROR: pid 23466: pool_do_auth: read auth kind
>> > failed
>> >
>> > On Fri, Jun 26, 2009 at 5:56 PM, John R Pierce <pierce(at)hogranch(dot)com>
>> > wrote:
>> >>
>> >> mobiledreamers(at)gmail(dot)com wrote:
>> >>>
>> >>> can someone show how to setup pgpool 2 in parallel *query* mode ie
>> >>> horizontal partitioning
>> >>
>> >> did you look at
>> >>
>> >> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel
>> >> ?
>> >>
>> >> I'd pay close attention to the restrictions here, too...
>> >>
>> >> http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#restriction
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Bidegg worlds best auction site
>> > http://bidegg.com
>> >
>>
>>
>>
>> --
>> When fascism comes to America, it will be intolerance sold as diversity.
>
>
>
> --
> Bidegg worlds best auction site
> http://bidegg.com
>

--
When fascism comes to America, it will be intolerance sold as diversity.


From: mobiledreamers(at)gmail(dot)com
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-27 07:53:51
Message-ID: c1870d60906270053m45c9d8e8u7bccba52818652c7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

yeah i have never tried slony
and i didnt try plproxy as it is a new language and need to modify all
client code

not modifiying client code in pgpool 2 rocks

On Sat, Jun 27, 2009 at 12:52 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> Oh crap I think I mixed it up in my head with slony II. nevermind. :)
>
> On Sat, Jun 27, 2009 at 1:17 AM, <mobiledreamers(at)gmail(dot)com> wrote:
> > no it is very good and well designed the whole app code doesnt need to
> > change
> >
> > we jus need to configure the pgpool insertion logic
> >
> > and it has a cool pgpooladmin in php like phppgadmin
> >
> > if only i can get it to work
> >
> > On Fri, Jun 26, 2009 at 10:53 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com
> >
> > wrote:
> >>
> >> I thought pgool II was abandonware...
> >>
> >> On Fri, Jun 26, 2009 at 7:50 PM, <mobiledreamers(at)gmail(dot)com> wrote:
> >> > Hey john
> >> > thanks
> >> > i did read both extensively, but finishing all the steps parallel mode
> >> > or
> >> > horizontal partitioning mode doesnot work!
> >> > but this is my conf file
> >> >
> >> > # backend_hostname, backend_port, backend_weight
> >> > # here are examples
> >> > backend_hostname0 = 'localhost'
> >> > backend_port0 = 5432
> >> > backend_weight0 = 1
> >> > backend_data_directory0 = '/mnt/work/database'
> >> > backend_hostname1 = 'marc.somehost.com'
> >> > backend_port1 = 5432
> >> > backend_weight1 = 1
> >> > backend_data_directory1 = '/mnt/work/database'
> >> > this is the problem
> >> > pgpool-II-2.2.2]$ createdb -p 9999
> >> > createdb: could not connect to database postgres: server closed the
> >> > connection unexpectedly
> >> > This probably means the server terminated abnormally
> >> > before or while processing the request.
> >> >
> >> >
> ------------------------------------------------------------------------------------------------------------------------------------
> >> > Error in log
> >> > tail -f /tmp/pgpool.log
> >> > 2009-06-26 17:24:07 LOG: pid 5561: pgpool successfully started
> >> > 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not
> match
> >> > between between master(0) slot[1] (50331648)
> >> > 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind
> failed
> >> > tail -f /tmp/pgpool.log
> >> > 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: backend key data
> >> > received
> >> > 2009-06-26 18:49:37 DEBUG: pid 23506: s_do_auth: transaction state: I
> >> > 2009-06-26 18:49:40 DEBUG: pid 23466: I am 23466 accept fd 7
> >> > 2009-06-26 18:49:40 DEBUG: pid 23466: Protocol Major: 3 Minor: 0
> >> > database:
> >> > postgres user: mark
> >> > 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 0
> >> > backend
> >> > 2009-06-26 18:49:40 DEBUG: pid 23466: new_connection: connecting 1
> >> > backend
> >> > 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot:
> 0
> >> > length: 8
> >> > 2009-06-26 18:49:40 DEBUG: pid 23466: pool_read_message_length: slot:
> 1
> >> > length: 8
> >> > 2009-06-26 18:49:40 ERROR: pid 23466: pool_read_int: data does not
> match
> >> > between between master(0) slot[1] (50331648)
> >> > 2009-06-26 18:49:40 ERROR: pid 23466: pool_do_auth: read auth kind
> >> > failed
> >> >
> >> > On Fri, Jun 26, 2009 at 5:56 PM, John R Pierce <pierce(at)hogranch(dot)com>
> >> > wrote:
> >> >>
> >> >> mobiledreamers(at)gmail(dot)com wrote:
> >> >>>
> >> >>> can someone show how to setup pgpool 2 in parallel *query* mode ie
> >> >>> horizontal partitioning
> >> >>
> >> >> did you look at
> >> >>
> >> >>
> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel
> >> >> ?
> >> >>
> >> >> I'd pay close attention to the restrictions here, too...
> >> >>
> >> >>
> http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#restriction
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Bidegg worlds best auction site
> >> > http://bidegg.com
> >> >
> >>
> >>
> >>
> >> --
> >> When fascism comes to America, it will be intolerance sold as diversity.
> >
> >
> >
> > --
> > Bidegg worlds best auction site
> > http://bidegg.com
> >
>
>
>
> --
> When fascism comes to America, it will be intolerance sold as diversity.
>

--
Bidegg worlds best auction site
http://bidegg.com


From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: mobiledreamers(at)gmail(dot)com
Cc: John R Pierce <pierce(at)hogranch(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-28 05:59:56
Message-ID: alpine.GSO.2.01.0906280152340.12973@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Fri, 26 Jun 2009, mobiledreamers(at)gmail(dot)com wrote:

> 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match between between master(0) slot[1] (50331648)
> 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed

My guess is that you have different types of connections being made
between the local database and the remote one. See
http://pgfoundry.org/pipermail/pgpool-general/2007-September/000708.html
for some comments about the restrictions here, and
http://www.postgresql.org/docs/8.3/interactive/auth-pg-hba-conf.html for
background on the file you'll need to edit in order to change this
situation.

If you still can't resolve your problem, you should ask about it on the
pgpool-general mailing list rather than this one:
http://lists.pgfoundry.org/pipermail/pgpool-general/
--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD


From: mobiledreamers(at)gmail(dot)com
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: horizontal sharding
Date: 2009-06-28 16:51:41
Message-ID: c1870d60906280951r5f5461f3h249db6dcfce6906c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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 <gsmith(at)gregsmith(dot)com> wrote:

> On Fri, 26 Jun 2009, mobiledreamers(at)gmail(dot)com wrote:
>
> 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match
>> between between master(0) slot[1] (50331648)
>> 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed
>>
>
> My guess is that you have different types of connections being made between
> the local database and the remote one. See
> http://pgfoundry.org/pipermail/pgpool-general/2007-September/000708.htmlfor some comments about the restrictions here, and
> http://www.postgresql.org/docs/8.3/interactive/auth-pg-hba-conf.html for
> background on the file you'll need to edit in order to change this
> situation.
>
> If you still can't resolve your problem, you should ask about it on the
> pgpool-general mailing list rather than this one:
> http://lists.pgfoundry.org/pipermail/pgpool-general/
> --
> * Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
>

--
Bidegg worlds best auction site
http://bidegg.com