Live data from Hacker News

Amazon RDS for PostgreSQL

aws.amazon.com

171–180 of 246 posts

Re: Amazon RDS for PostgreSQL

#171

Earlier quoted context omitted.

Disagree with what? Keeping your own backups? Probably not - if you're not keeping offsite backups, you're begging to go out of business. With needing a DBA, even if you're still on RDS? I don't see what that has to do with PCI compliance. With RDS only removing the up-front setup pain, at the cost of ongoing maintenance... as someone who is also familiar with PCI (and HIPPA, and DOD) compliance, I respectfully disag…

> Disagree with what? I disagree with the notion that RDS removes remarkably little of the pain of running a database instance. Yes, there are projects where RDS is not a great solution, but it definitely simplifies a lot of stuff. The notion that it "only removes up-front setup pain" is silly. If you manage your databases correctly, up-front setup pain should be the vast majority of all your basic admin operations.…

> The "at the cost of ongoing maintenance" part is a real head scratcher for me

Let's look at a common problem that DBAs are typically given: "The Database is slow!". Let's troubleshoot this ficticous problem on RDS:

Am I being affected by a noisy neighbor? Can't tell; contact Amazon support.

Can I look at top to see if the load is high on the box, and potentially why? No. I can look at historical trends, but not with enough granularity or information to be useful.

Can I look at the disk iops to see if there's any kind of problem there? No. Complete black box here; contact Amazon support.

Can I look at the slow log? Kind of. They'll push the slow log data into the database for you to query, but then you can't use tools to do aggregate tracking.

Pause for a moment for a quick MySQL RDS tip: pt-query-digest has a mode of operation that lets you do a processlist every 1/100th of a second and turn that into a pseudo slow log, which does work for RDS.

    pt-query-digest --processlist h=10.0.0.1 --interval=0.01 --output slowlog > /tmp/fake_slowlog.out
Back on track - so no real analysis of a historical slow log, without writing your own tools. Possible, but time consuming.

Can I kill queries? Yes, using a stored procedure. Can't use any of the existing toolset around this (like pt-kill, which can help keep poorly written ad-hoc queries from getting out of hand).

So, after many hours swapping emails with Amazon support, we've determined that we're actually spending a lot of time waiting on malloc mutexes. The internet says that using a non-default version of malloc will help with that - can I do that?

Nope. You're stuck.

Other things you can't do:

* Offsite backups that are in any form but MySQL dumps.

* Take advantage of new index types and compression support from TokuDB.

* Zero downtime failovers (We were able to help someone fake this; it was a PITA).

* Cross-region replication.

* Automated failovers using a reputable tool (MMM, MHA, etc).

* Access the error logs.

* Run multiple instances on one machine.

* Alter the disk elevator (hopefully they're using something sane, like noop, but we'll never know)

* Alter the kernel swappiness.

* Troubleshoot crashes.

* Monitor and alert on a machine's vitals.

Now perhaps I'm just being a power-hungry admin, but these small things matter. They are the difference between a snappy DB which scales beautifully to 10,000+ QPS, and a sluggish DB that causes you to move to bigger hardware, because it's the only option open to you.

Databases just aren't that hard to set up. Install packages, install config files, start the DB, restore from a backup file, restart the DB, and you're golden. If you're particularly paranoid, set up the selinux contexts (I'd bet dollars to doughnuts that this isn't done on RDS instances), and create a security group that limits access to only the 22 and 3306 ports to your application hosts, and set up individual users.

This is particularly simple when you use an orchestration tool; I recommend Ansible personally.

Re: Amazon RDS for PostgreSQL

#172

I think this is great news... PostgreSQL is definitively my favorite open-source database. It's also nice to see Amazon get into the game, as hosted pg options have been fairly limited. I am slightly disappointed to not see the server-side JS support baked in, and that apparently you can't do reads from distributed replicas. Just the same, I think there will be a lot of progress in this area. Administering databases…

It looks like the Multi-AZ setup is using block level replication such as DRBD instead of the built-in replication:

> Database updates are made concurrently on the primary and standby resources to prevent replication lag.

Makes me feels better for setting up my own pg cluster on EC2 a week ago, which does allow reads from the replication slave. Plus, I can provision <1000 IOPS (provisioned IOPS is damn expensive with AWS), and get to use ZFS.

Re: Amazon RDS for PostgreSQL

#173

Great news and for people who ask them-self the questions but the version is Pg 9.3.1. Not all Pl are available, and it misses the PL/V8 and PL/Python at least. And it seems that all fdw (Foreign Data Wrapper) extensions are missing. But it's a great start, I'm looking forward to try. If anybody know if we can still access the WAL log then it will be very useful http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/C…

PL/Python is very unlikely to appear soon unfortunately because it is an untrusted language in PostgreSQL. EDIT: you are right, PL/Python is supported as well. I only read the "Language Extensions :PL/Perl, PL/pgSQL, PL/Tcl" part at the top.

Agree ... We may not see PL/Python very soon until somebody solve the sandboxing issues.

But I was surprise to not see PL/V8 which is sandboxed

Re: Amazon RDS for PostgreSQL

#174

Great news and for people who ask them-self the questions but the version is Pg 9.3.1. Not all Pl are available, and it misses the PL/V8 and PL/Python at least. And it seems that all fdw (Foreign Data Wrapper) extensions are missing. But it's a great start, I'm looking forward to try. If anybody know if we can still access the WAL log then it will be very useful http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/C…

Ack, half my stuff's in PLV8. Oh well.

I won't be surprise to see it supported soon.

Re: Amazon RDS for PostgreSQL

#175

I'd be most curious to know how the performance/dollar ratio stacks up to Heroku's Postgres offering.

From a very quick glance at the small end the Amazon options are a little more than half the price (Ireland single AZ instance pricing and even less reserved) but multi-AZ options are probably very similar. I don't actually know whether Heroku can failover across an AZ failure.

One other issue to consider is that AWS Micro DB Instances have "low" I/O capacity and no provisioned IOPS.

Last I heard Heroku is hosted on top of AWS. Does anyone know if Heroku's cheapest Postgres plan is hosted on a dedicated AWS Micro instance, or do they buy large AWS instances and host multiple databases on each box thereby potentially providing more IO performance?

Re: Amazon RDS for PostgreSQL

#176
post #175

Earlier quoted context omitted.

From a very quick glance at the small end the Amazon options are a little more than half the price (Ireland single AZ instance pricing and even less reserved) but multi-AZ options are probably very similar. I don't actually know whether Heroku can failover across an AZ failure.

One other issue to consider is that AWS Micro DB Instances have "low" I/O capacity and no provisioned IOPS. Last I heard Heroku is hosted on top of AWS. Does anyone know if Heroku's cheapest Postgres plan is hosted on a dedicated AWS Micro instance, or do they buy large AWS instances and host multiple databases on each box thereby potentially providing more IO performance?

IIRC, you get a dedicated database not a dedicated PG cluster, so presumably their will be multiple plans hosted on the same underyling server instance.

Re: Amazon RDS for PostgreSQL

#177
post #8

I've heard about PostgreSQL and know that HN community raves about it, but am currently using RDS with MySQL. Does it make sense to migrate to PostgreSQL, I don't have a lot of data as I'm in the early stage? What are the primary advantages that PostgreSQL provides over MySQL? Any advise/pointers is appreciated.

Just DDL transaction make life so much easier but there is much more like Materialized Views, Advanced Data type, Efficient JOIN, pg_stat_statements, PL, full text search, GIS features (pretty useful to do near by query), fuzzy search, ISO SQL standard compliant, Piece of cake replication.

Do some search and give it a try one weekend.. Trying it is loving it.

Re: Amazon RDS for PostgreSQL

#178
post #60

Earlier quoted context omitted.

I don't know if I would really say Postgres won. Among people who care about databases, Postgres has always been the more popular of the big two free databases. Postgres was actually dedicated to being a good relational database, whereas MySQL in its earlier days was willing to cut corners to the point where it wasn't even ACID in most common configurations. But MySQL was faster (because, again, cutting corners) and…

don't forget postgres didn't officially support replication until late 2010, which was a total non-starter for many/most production uses

That is absolutely ridiculous. Less than 1% of 1% of mysql users are using replication. Suggesting it is a "total non-starter" for most production uses is crazy.

Re: Amazon RDS for PostgreSQL

#179
post #93

Earlier quoted context omitted.

Can you elaborate further?

Coming from a MySQL background, I sort-of assumed PostgreSQL worked the same way. I remember after setting up the server, pgAdmin was very difficult to navigate. I managed to get a database and table made and got some data in (using SQL) but I couldn't view any of the data. Compared to MySQL + Sequel Pro it was very difficult to use for a beginner. Postgres is very powerful and can do a lot. I think I just need a goo…

None of that has anything to do with postgresql. Pgadmin is crappy, don't use it. Use one of the dozens of database independent admin tools, or just stick with the best tool: psql.

Re: Amazon RDS for PostgreSQL

#180

Earlier quoted context omitted.

> Disagree with what? I disagree with the notion that RDS removes remarkably little of the pain of running a database instance. Yes, there are projects where RDS is not a great solution, but it definitely simplifies a lot of stuff. The notion that it "only removes up-front setup pain" is silly. If you manage your databases correctly, up-front setup pain should be the vast majority of all your basic admin operations.…

> The "at the cost of ongoing maintenance" part is a real head scratcher for me Let's look at a common problem that DBAs are typically given: "The Database is slow!". Let's troubleshoot this ficticous problem on RDS: Am I being affected by a noisy neighbor? Can't tell; contact Amazon support. Can I look at top to see if the load is high on the box, and potentially why? No. I can look at historical trends, but not wit…

> Am I being affected by a noisy neighbor? Can't tell; contact Amazon support.

Sure, you can. Spin up multiple RDS's and benchmark them.

> Can I look at top to see if the load is high on the box, and potentially why?

If you ar using top to monitor your box, you are already screwed. There is lots of support for remote monitoring.

> Can I look at the disk iops to see if there's any kind of problem there?

Disk iops are part of the built in monitoring and metrics provided with RDS.

> Can I look at the slow log? Kind of. They'll push the slow log data into the database for you to query, but then you can't use tools to do aggregate tracking.

If only there was a tool that could extract records from a database and compute aggregates...

> So, after many hours swapping emails with Amazon support, we've determined that we're actually spending a lot of time waiting on malloc mutexes. The internet says that using a non-default version of malloc will help with that - can I do that? >Nope. You're stuck.

MySQL sucks. RDS provides no means to make it any better. Fortunately they do now provide PostgreSQL.

> Offsite backups that are in any form but MySQL dumps.

You can do that by replicating to an external MySQL server and doing whatever the heck you want with it.

> * Take advantage of new index types and compression support from TokuDB.

Yup. Until today it was also really hard to take advantage of different engines found in PostgreSQL. ;-) This is a totally different product.

In general, all of the stuff you are describing are features, not things that cause maintenance complexity. In fact, manipulating those things causes maintenance complexity.

> Databases just aren't that hard to set up. Install packages, install config files, start the DB, restore from a backup file, restart the DB, and you're golden.

I had no idea PCI compliance could be that simple. ;-)

> This is particularly simple when you use an orchestration tool; I recommend Ansible personally.

Yes, orchestration tools, if set up properly are exactly how you'd want to do this kind of thing. If you already have all that setup to manage your database, RDS is likely not going to help.

Post reply on HN