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 ke...@omniti.com 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.

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 fola...@peoplecall.com wrote: Hi Sébastien: On Thu, Jun 5, 2014 at 5:41 PM, Sébastien Lorion s...@thestrangefactory.com wrote: Correct me if I am wrong, but will it not also suffer the same limitation as any statement based

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 kgo...@bepress.com 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

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 s...@thestrangefactory.com 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

[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

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 chris.trav...@gmail.comwrote: 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 linuxhi...@gmail.comwrote: Hi, If you really want ZFS, I would highly

[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] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
On Thu, Jan 16, 2014 at 4:22 AM, Sébastien Lorion s...@thestrangefactory.comwrote: 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

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
=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 (http://zfsonlinux.org/) has been declared production ready last March (v0.6.1), I

Re: [GENERAL] PostgreSQL with ZFS on Linux

2014-01-16 Thread Sébastien Lorion
, as far 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. On Thu, Jan 16, 2014 at 4:22 AM, Sébastien

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 linuxhi...@gmail.comwrote: 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

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 someukdevelo...@gmail.comwrote: 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

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 bau...@dvs.tu-darmstadt.dewrote: Hi, AFAIK there is no such thing in the code

Re: [GENERAL] Amazon High I/O instances

2012-09-16 Thread Sébastien Lorion
21 août 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 have to go through the complexity of such a setup, rather than simply

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 pie...@hogranch.com 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. After again 5

Re: [GENERAL] Amazon High I/O instances

2012-09-13 Thread Sébastien Lorion
0 2151M 76876K select 1 0:09 0.00% postgres On Wed, Sep 12, 2012 at 9:16 PM, Sébastien Lorion s...@thestrangefactory.comwrote: 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

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 pie...@hogranch.com 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

Re: [GENERAL] Amazon High I/O instances

2012-09-13 Thread Sébastien Lorion
:29 AM, John R Pierce pie...@hogranch.com 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 long first time I created the db

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 pie...@hogranch.com 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 useful

Re: [GENERAL] Amazon High I/O instances

2012-09-12 Thread Sébastien Lorion
and 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 franc...@teksol.infowrote: 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
12, 2012 at 7:24 PM, John R Pierce pie...@hogranch.com 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 would set it low

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 pie...@hogranch.com 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

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 pie...@hogranch.com 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 (25

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 s...@thestrangefactory.comwrote: Ok, make sense .. I will update that as well and report back. Thank you

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 s...@thestrangefactory.comwrote

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 s...@thestrangefactory.com wrote: One more question .. I could

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 s...@thestrangefactory.comwrote: I recreated the DB and WAL pools, and launched pgbench -i -s 1. Here

[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

Re: [GENERAL] Amazon High I/O instances

2012-08-23 Thread Sébastien Lorion
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 vv.li...@wanadoo.fr wrote: Le mercredi 22 août 2012 à 13:30 -0400, Sébastien Lorion a écrit : Vincent, I would

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

Re: [GENERAL] Amazon High I/O instances

2012-08-23 Thread Sébastien Lorion
: On 08/23/12 11:24 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 test can take a lot

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

Re: [GENERAL] Amazon High I/O instances

2012-08-21 Thread Sébastien Lorion
, I wondered why he did it. Maybe seb is planning for 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

[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

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