

Heroku Postgres - ryandotsmith
https://postgres.heroku.com

======
sgrove
This is really exciting - the team behind this _really_ cares about developers
and their experience. They see a way things could be better, and regardless of
technical difficulty, say, "why not?" Forking a db? Brilliant. Offload
expensive task to passive followers? Obvious (in hindsight). Instant, brain-
dead db provisioning? Of course.

Personally, the only terrifying thing about this is that when Heroku releases
something, it's been in the works for a good long while, and they usually have
a stream of incredible releases waiting right behind it. The mind boggles at
what they're going to be doing next.

But we'll be first in line for it :)

~~~
jinushaun
When I read "forking" and "following" on there, it was a revelations: of
course, that's so obvious! Those terms are much friendlier than "replication"
or "master-slave". It describes the desired result, instead of the underlying
technology.

~~~
pvh
If you had any idea how long it took to get that language right...

~~~
sgrove
I'd be curious to hear the alternatives, and the overall process used to
arrive at the current language.

~~~
pvh
Hmm, this would make a good blog post. I'll draft something up.

~~~
DavidChouinard
Please do. There seems to be valuable lessons learnt there.

------
boundlessdreamz
If there is anyone from heroku reading, please pay some money to
<http://www.sequelpro.com/> developers to develop postgresql compatibility.
All GUIs available on OS X for postgres are horrible

~~~
jinushaun
I love using Sequel Pro for MySQL, but also wish it had support for SQLite and
PostgreSQL. It's a great app and better than all the other OSX clients that I
can find on the internet, including the non-free ones.

It's open source, so nothing's stopping anyone from adding support for other
SQL servers.

~~~
jabkobob
I have contributed a little bit to Sequel Pro, and I'm a bit familiar with the
codebase. Adding support for PostgreSQL is not trivial, a lot of MySQL is
hardcoded into the user interface. There have always been many requests for
PostgreSQL compatibility, but it would require A LOT of refactoring.

(Disclaimer: I haven't been involved much with SP for almost a year now, so
possibly there has been progress in that time)

~~~
stu
As one of the current Sequel Pro developers I can backup jabkobob on this one,
it's not an easy task. It's not that we're ignoring the requests we get to add
support for PostgreSQL or any other database system for that matter, it's
simply a matter of time, of which most of the core devs don't have just now.
We have a lot of plans around this area (as well as others) for the app, but
it's going to take time.

Thanks for everyone's support.

------
swilliams
It would seem that their acquisition by SalesForce hasn't slowed them down at
all, in fact I'd go as far to say that they've been even more productive since
that happened. I'm curious about how that whole process has gone; has
SalesForce provided more support/funding/resources? Or just removed
distractions and allowed them to focus on their product?

Nice job Heroku.

~~~
pvh
Suffice it to say, any rumours of our demise were greatly exaggerated. So much
more to come and yes, we are hiring, including for our Postgres team.
(Resumes/github accounts/etc to jobs(at)heroku.com.)

------
olefoo
Just a little usability nit, is the pricing per month, per year, lifetime?

It's not clear from the pricing page, and I'm assuming it's per month, in
which case it's reasonable, especially given the value added services being
offered, especially the ability to fork the database and the automated
creation of read slaves.

It looks like a solid offering. It's probably not right for companies that are
subject to HIPAA or PCI compliance requirements, and there's no information on
the use of compiled extensions in the db which may limit it's utility if
you're wanting to use PostGIS or other specialist datatypes.

~~~
pvh
I would say that at this point you're right, we're probably not right yet for
companies subject to HIPAA or PCI regulation.

The advanced Postgres datatypes are pretty much my favorite thing in the
world. We use HStore internally all over the place, as well as some more
exciting projects that we haven't said too much about yet. As I mentioned
elsewhere in the thread, if you're interested in trying out some of those
extensions, contact me directly.

~~~
olefoo
I'm a real fan of PostGIS and like ltree and hstore a lot. Heroku isn't quite
right for my needs at this time, but I would definitely consider it if I had a
use case that needed an extremely fast public facing postgres installation.

I am curious as to whether you do pro-rated pricing?

~~~
pvh
As of today, we only charge for the time you use. I don't imagine we'd ever
need to change that, but never is a long time.

~~~
olefoo
That is interesting, there are times when I want to use PG as an ETL tool and
take a midsized ( < 2tb data ) set and load it up and slice and dice it and
produce some output for other programs and then have it go away. So, I'll keep
you guys in mind.

------
firemanx
Do they still limit the usage of user defined functions and contrib modules,
or did that open up? I would love to use Heroku for some lightweight data
warehousing that I've got going, but it's still pretty dependent on
functions/sprocs for performance reasons.

I looked for any more documentation about that, but the only official word I
have from them in the past is the support ticket I filed last year stating
that they don't support "additions" like user defined functions or the various
contrib modules.

~~~
pvh
Our production service has always supported UDFs, though the free sandbox
service does not.

Unfortunately, Postgres makes it difficult to install extension modules
without superuser. That said, we've wanted to support contrib modules for
ages. Lately, encouraged by the work Dimitri Fontaine has been doing on
extensions, we have a pilot project going which includes support for hstore,
pgcrypto, pg_trgm, and of course, postgis. Feel free to contact me at
pvh(at)heroku.com if you're interested in taking it for a spin.

------
andypants
This is really awesome, just a few downsides (for me):

I don't use postgres - I hope heroku expands this kind of service to more
databases (although I don't think it's likely in the near future).

The smallest database is also pretty expensive. I wouldn't mind a cheaper plan
for less resources.

Only being able to create one database of each size is just weird, especially
if forking or following. Can anybody confirm that this is a limitation? (I
only read about this from one of the other comments here)

~~~
pvh
We are unlikely to offer MySQL at any point in the near future. We feel that
across the board, Postgres has the best data robustness guarantees, the most
powerful query optimizer, the strongest replication solutions, the most useful
datatypes, and the greatest community driving, developing and supporting it.

We hear you on the cheaper plan; watch this space.

Last, there is no restriction on creating only one database of each size.

~~~
latortuga
Honestly when you list the merits of Postgres like that you sound like a used
car salesman. "Of course you think you want that but really you want all of
this." We all get that Postgres is great. Saying "no we won't implement a
feature you, our customer, wants" like this just rubs me the wrong way.

Is there some technical reason that you can't offer both?

~~~
socratic
What would you like Heroku to do with a MySQL on EC2 offering that Amazon is
not currently doing with their MySQL on EC2 offering (Amazon RDS)? They are
both local, use the same underlying infrastructure, and have Heroku add-ons,
no?

Presumably, their decision to only support Postgres is partly competition
(many others provide MySQL on EC2), and partly technical. How would you
justify the technical merits of the decision, without sounding "like a used
car salesman"?

------
rbranson
Is this still using the EBS RAID that you guys mentioned in a blog post a
while ago? If so, how do you avoid any slow I/O requests (which plague EBS)
stalling all I/O to the volume?

~~~
pvh
Actually, Postgres WAL support helps mitigate this reasonably well, and a well
tuned application has something like a cache hit rate of >99% during normal
operation.

That said, yes, EBS can have unstable performance. We monitor for several
kinds of related problems and in the most dire of straights can perform a
hardware migration to a quieter node which generally clears issues up.

------
jvehent
"Forget daily backups, Continuous Protection redundantly archives data to
high-durability storage as it is written, ensuring that it is safe no matter
what."

I'm sorry, but daily backups are not only for high availability, but also for
point in time recovery.

What if $dev drops the user table by mistake ? Do they provide backup for that
?

~~~
olefoo
You can set up Point In Time Recovery (PITR), and replay recovery logs. It's
not clear from Heroku's pages whether their solution is set up that way.

~~~
jpitz
It sounds like their solution is set up that way.

From <https://postgres.heroku.com/#protect> : "Every change to your data is
written to write-ahead logs, which are shipped to multi-datacenter, high-
durability storage. In the unlikely event of unrecoverable hardware failure,
these logs can be automatically 'replayed' to recover the database to within
seconds of its last known state."

~~~
moe
_It sounds like their solution is set up that way._

I think the question is whether the _customer_ will be able to perform a point
in time recovery, and what the size and resolution of the backlog is.

~~~
pvh
Not yet.

~~~
jpitz
Thank you for that clarification.

------
Fluxx
This is really awesome! A couple questions though:

* What do I do if I need to tune/configure Postgres for my workload.

* How is the performance of transferring all of the queries and responses across the internet?

Keep in mind I've never used postgres before so these may be moot points.

~~~
pvh
We've done a lot of tuning focused on web applications already, our experience
is that mostly people with problems just need to add an index.

Performance depends on where you are querying from. We've found that if you
are inside EC2 network overhead is typically <1ms.

------
joevandyk
Although they only let you create one database per plan, you can use schemas
to emulate multiple databases.

<http://www.postgresql.org/docs/9.0/static/ddl-schemas.html>

~~~
pvh
Just to clarify: You're almost right. You can, in fact, create multiple
databases of any plan you please, but yes, within each of those databases you
can use schemas to implement something akin to multiple databases without
resource isolation, but with the ability to share data.

------
pbh
Any chance of PL/python or similar?

I guess I'm probably one of like three users of PL/python, especially since
it's untrusted. Worth a check, though!

~~~
pvh
No plans to support untrusted languages as yet. Too many foot-guns built into
that. You couldn't even believe some of the evil, insane things that we've
done with that.

Trusted languages are far more likely. This one looks really, really cool:
<http://code.google.com/p/plv8js/wiki/PLV8>

------
drewcrawford
This is ridiculous, but I would love a REST interface to a SQL server. I do a
lot of AppEngine work and although I love the datastore and write super-
optimal queries, I would really love the ability to pull a SQL datasource in
every once in awhile.

~~~
pvh
Check out the extremely cool HTSQL from Clark Evans!

------
hopeless
I just realised that Heroku have a problem: when I looked at the page, and
looked at the subdomain URL, I couldn't tell if this was a real offering or a
fake app put up by someone else.

~~~
pvh
Yes, it's the real deal, just like blog.heroku.com and all our other services.

In order to reduce this ambiguity we are gradually moving towards placing user
apps on a different domain; because we approach these kinds of issues very
gradually this will probably take quite some time to fully complete, but as of
today all new Cedar stack applications are hosted on herokuapp.com.

~~~
hopeless
Ah, good to know. I haven't got around to creating a Cedar-based app yet

------
mberning
This is cool, seems to have a pretty fair price structure. I still don't
understand their shared database pricing. 5mb for free, then $15 for 20gb. I
need like 100 megs for 5 bucks.

------
laran
This blew my mind. Amazing stuff. Heroku is absolutely my favorite platform.

------
francoisdevlin
I think the Fugu plan is a typo, if you're reading this Heroku guys...

~~~
wccrawford
'has' a typo, you mean.

------
njharman
need GIS

And confused by "one database only". Does that mean CREATE DATABASE databases?
If so why?

~~~
abhishektwr
Ya me too, no mention of PostGIS.

~~~
kashifr
Hi co-founder of SpacialDB here. Cloud hosted PostGIS is already available as
a Heroku plugin, stand-alone and an easy to use API. Check out
<http://devcenter.spacialdb.com/> for documentation and you can sign up via
the Heroku addons page or <http://beta.spacialdb.com/>

