Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-05 Thread Sébastien Lorion
On Thu, Jun 5, 2014 at 12:55 PM, Francisco Olarte wrote: > Hi Sébastien: > > On Thu, Jun 5, 2014 at 5:41 PM, Sébastien Lorion > wrote: > > > Correct me if I am wrong, but will it not also suffer the same > > limitation as any statement based replication, namely

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-05 Thread Sébastien Lorion
On Wed, Jun 4, 2014 at 1:50 PM, Keith Fiske wrote: > Not sure if this will work for you, but sharing a similar scenario in case > it may work for you. > > An extension I wrote provides similar logical replication as you've > probably seen in other tools. > https://github.com/omniti-labs/mimeo > O

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-02 Thread Sébastien Lorion
On Mon, Jun 2, 2014 at 12:52 PM, Kevin Goess wrote: > > So my conclusion is that for now, the best way to scale read-only > queries for a sharded master is to > > implement map-reduce at the application level. > > That's the conclusion I would expect. It's the price you pay for sharding, > it's p

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-01 Thread Sébastien Lorion
On Thu, May 29, 2014 at 12:58 PM, Sébastien Lorion wrote: > I have a master database sharded by user_id, with globally unique IDs for > everything, except shared configuration data stored in global tables > (resources strings, system parameters, etc). > > What would be the best (i

[GENERAL] Merge a sharded master into a single read-only slave

2014-05-29 Thread Sébastien Lorion
I have a master database sharded by user_id, with globally unique IDs for everything, except shared configuration data stored in global tables (resources strings, system parameters, etc). What would be the best (ie both fast and reliable, simple to maintain as a bonus) to merge all shards into a s

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-17 Thread Sébastien Lorion
On Fri, Jan 17, 2014 at 2:29 AM, Chris Travers wrote: > > > On Thu, Jan 16, 2014 at 11:14 PM, Sébastien Lorion < > s...@thestrangefactory.com> wrote: > >> On Thu, Jan 16, 2014 at 4:42 PM, Clemens Eisserer >> wrote: >> >>> Hi, >>> >&

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
On Thu, Jan 16, 2014 at 4:42 PM, Clemens Eisserer wrote: > Hi, > > > If you really want ZFS, I would highly recommend looking into > > FreeBSD (Postgresql works great on it) or if you want to stick with > Linux, > > look into mdadm with LVM or some other filesystem solution. > > If you want to use

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
as I know. If I had to choose > an OS to use ZFS with, I'd go with > either FreeBSD or Solaris. That said, I am biased to FreeBSD anyway; > the only Linux installation that I > own is the one in my Android phone, while I own several FreeBSD systems. > > >

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
ell because it has sync=disabled, which is risky to say the least ... > > > On 16/01/2014 11:57, Sébastien Lorion wrote: > > On Thu, Jan 16, 2014 at 4:22 AM, Sébastien Lorion < > s...@thestrangefactory.com> wrote: > >> Hello, >> >> Since ZFS on Linux

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
On Thu, Jan 16, 2014 at 4:22 AM, Sébastien Lorion wrote: > Hello, > > Since ZFS on Linux (http://zfsonlinux.org/) has been declared production > ready last March (v0.6.1), I am curious if anyone is using it with > PostgreSQL on production servers (either main or backup) and if so,

[GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
Hello, Since ZFS on Linux (http://zfsonlinux.org/) has been declared production ready last March (v0.6.1), I am curious if anyone is using it with PostgreSQL on production servers (either main or backup) and if so, what is their experience so far ? Thank you, Sébastien

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Sébastien Lorion
On Thu, Jul 25, 2013 at 4:41 AM, Some Developer wrote: > You are forgetting that you can execute a query asynchronously using libpq > therefore the app server can continue serving requests whilst the database > server chugs away on its work. You just poll the server every now and again > to see if

Re: [GENERAL] optimizer's cost formulas

2013-04-09 Thread Sébastien Lorion
The tool to tweak the query planner parameters mentioned in the article sounds very useful. Can we download it somewhere, either as binary or source code ? Sébastien On Mon, Apr 8, 2013 at 2:44 AM, Daniel Bausch wrote: > Hi, > > AFAIK there is no such thing in the code or documentation. > Never

Re: [GENERAL] Amazon High I/O instances

2012-09-16 Thread Sébastien Lorion
2012 à 01:33 -0400, Sébastien Lorion a écrit : >> >> > >> > >> > Since Amazon has added new high I/O instance types and EBS volumes, >> > anyone has done some benchmark of PostgreSQL on them ? >> > >> >> I wonder : is there a reason why you

Re: [GENERAL] Amazon High I/O instances

2012-09-14 Thread Sébastien Lorion
-sharedbuffers-and-walbuffers.html Sébastien On Thu, Sep 13, 2012 at 5:28 PM, John R Pierce wrote: > On 09/13/12 2:08 PM, Sébastien Lorion wrote: > >> I started db creation over, this time with 16GB maintenance_work_mem and >> fsync=off and it does not seem to have a great effect. A

Re: [GENERAL] Amazon High I/O instances

2012-09-13 Thread Sébastien Lorion
:29 AM, John R Pierce wrote: > On 09/12/12 10:01 PM, Sébastien Lorion wrote: > >> pgbench initialization has been going on for almost 5 hours now and still >> stuck before vacuum starts .. something is definitely wrong as I don't >> remember it took so lon

Re: [GENERAL] Amazon High I/O instances

2012-09-13 Thread Sébastien Lorion
maintenance_work_mem is already 4GB. How large should it be during load then ? Sébastien On Thu, Sep 13, 2012 at 1:29 AM, John R Pierce wrote: > On 09/12/12 10:01 PM, Sébastien Lorion wrote: > >> pgbench initialization has been going on for almost 5 hours now and still >> s

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
1 200 2151M 76876K select 1 0:09 0.00% postgres On Wed, Sep 12, 2012 at 9:16 PM, Sébastien Lorion wrote: > I recreated the DB and WAL pools, and launched pgbench -i -s 1. Here > are the stats during the load (still running): > > *iostat (xbd13-14 are WAL zpool)* &g

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
Forgot to say that this is it with new values suggested (see included postgresql.conf) and ARC cache size set to 32GB. Sébastien On Wed, Sep 12, 2012 at 9:16 PM, Sébastien Lorion wrote: > I recreated the DB and WAL pools, and launched pgbench -i -s 1. Here > are the stats during th

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
:45 32 processes: 2 running, 30 sleeping CPU: 10.3% user, 0.0% nice, 7.8% system, 1.2% interrupt, 80.7% idle Mem: 26M Active, 19M Inact, 33G Wired, 16K Cache, 25M Buf, 33G Free On Wed, Sep 12, 2012 at 9:02 PM, Sébastien Lorion wrote: > > One more question .. I could not set wal_sync_met

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
databases (errors about pg_xlog directories not found, etc) at first when running my tests, and I suspect it was because of vfs.zfs.cache_flush_disable=1, though I cannot prove it for sure. Sébastien On Wed, Sep 12, 2012 at 8:49 PM, Sébastien Lorion wrote: > Is dedicating 2 drives for WAL

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
Is dedicating 2 drives for WAL too much ? Since my whole raid is comprised of SSD drives, should I just put it in the main pool ? Sébastien On Wed, Sep 12, 2012 at 8:28 PM, Sébastien Lorion wrote: > Ok, make sense .. I will update that as well and report back. Thank you > for your

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
Ok, make sense .. I will update that as well and report back. Thank you for your advice. Sébastien On Wed, Sep 12, 2012 at 8:04 PM, John R Pierce wrote: > On 09/12/12 4:49 PM, Sébastien Lorion wrote: > >> You set shared_buffers way below what is suggested in Greg Smith book >&g

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
to at least prepare a bit, without overdoing it, of course.. Sébastien On Wed, Sep 12, 2012 at 7:24 PM, John R Pierce wrote: > On 09/12/12 4:03 PM, Sébastien Lorion wrote: > >> I agree 1GB is a lot, I played around with that value, but it hardly >> makes a difference. Is ther

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
12, 2012 at 7:24 PM, John R Pierce wrote: > On 09/12/12 4:03 PM, Sébastien Lorion wrote: > >> I agree 1GB is a lot, I played around with that value, but it hardly >> makes a difference. Is there a plateau in how that value affects query >> performance ? On a master DB, I wo

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
max_connections ? I will run a test again and let you know how is the IO. Might also run bonnie++ to see if the raid performs as expected... Sébastien On Wed, Sep 12, 2012 at 6:17 PM, François Beausoleil wrote: > > Le 2012-09-12 à 17:08, Sébastien Lorion a écrit : > > > As you can see, I

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
configuration with fsync off, which I will use for read-only databases. Many thanks! Sébastien On Thu, Aug 23, 2012 at 2:41 PM, John R Pierce wrote: > On 08/23/12 11:24 AM, Sébastien Lorion wrote: > >> I think both kind of tests (general and app specific) are complementary >> and usefu

[GENERAL] Problem with initdb and ephemeral drives when rebooting

2012-08-29 Thread Sébastien Lorion
Hello, When doing the setup for a benchmark of pgsql on an High IO instance of Amazon, I got the following problem and was wondering if it is expected: On FreeBSD 9.0 amd64, I installed PostgreSQL 9.1.5 on the boot drive (UFS), created a ZFS pool using the 2 SSD drives (tank/db), chown pgsql tank

Re: [GENERAL] Amazon High I/O instances

2012-08-23 Thread Sébastien Lorion
AM, Sébastien Lorion wrote: > >> I think both kind of tests (general and app specific) are complementary >> and useful in their own way. At a minimum, if the general ones fail, why go >> to the expenses of doing the specific ones ? Setting up a meaningful >> application t

Re: [GENERAL] Amazon High I/O instances

2012-08-23 Thread Sébastien Lorion
I think both kind of tests (general and app specific) are complementary and useful in their own way. At a minimum, if the general ones fail, why go to the expenses of doing the specific ones ? Setting up a meaningful application test can take a lot of time and it can be hard to pinpoint exactly whe

Re: [GENERAL] Amazon High I/O instances

2012-08-23 Thread Sébastien Lorion
e provided useful answers, for which I am very grateful. p.s. My name is not "dude" or "seb", we have not raised the pigs together ... Sébastien On Thu, Aug 23, 2012 at 7:39 AM, Vincent Veyron wrote: > Le mercredi 22 août 2012 à 13:30 -0400, Sébastien Lorion a écrit : > &g

Re: [GENERAL] Amazon High I/O instances

2012-08-22 Thread Sébastien Lorion
Vincent, I would appreciate that you stop assuming things based on zero information about what I am doing. I understand that you are trying to be helpful, but I can assure you that going bare-metal only does not make any sense in my context. Sébastien On Wed, Aug 22, 2012 at 12:44 PM, Vincent Vey

Re: [GENERAL] Amazon High I/O instances

2012-08-21 Thread Sébastien Lorion
an application that already has hundreds of > users after all, I did oversee that option. > > To Sébastien : please use 'reply all' to send your reply to the list > > Le mardi 21 août 2012 à 10:29 -0400, Sébastien Lorion a écrit : > Could you elaborate on the comple

[GENERAL] Amazon High I/O instances

2012-08-20 Thread Sébastien Lorion
Hello, Since Amazon has added new high I/O instance types and EBS volumes, anyone has done some benchmark of PostgreSQL on them ? http://perspectives.mvdirona.com/2012/07/20/IOPerformanceNoLongerSucksInTheCloud.aspx http://perspectives.mvdirona.com/2012/08/01/EBSProvisionedIOPSOptimizedInstanceTy

Re: Messy data models (Re: [GENERAL] Visualize database schema)

2012-08-17 Thread Sébastien Lorion
Short answer: no. Even with a good auto-layout, nothing (up to now) beats a human made one because the latter will incorporate semantic which is not available to the modeling tool; for example, positioning, spacing and routing of relations will respect some sense of aesthetic and organization that

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Sébastien Lorion
Concerning auto-layout, most if not all tools I have used up to now make a mess for anything that is not dead simple. One exception I found is Embarcadero Data Architect ( http://www.embarcadero.com/products/er-studio-data-architect). It's not free, but there is a trial you can use and then you can