Jump to content

Posts Tagged ‘postgresql’


Oracle/Sun not off to a good start with open source

Thursday, July 29th, 2010 by Jim Mlodgenski

Hot off the heels of Oracle stopping the PostgreSQL build farm servers for Solaris, Oracle released an automatic update for Java that rebrands the company name from Sun to Oracle which had the cascading effect of breaking Eclipse.

While I don’t think this is some sort of coordinated plan by Larry to bring down open source in general, I think this is indicative of the pain of integrating Sun in to Oracle and we can expect more of this in the future. On the positive side, I think the reactions by the PostgreSQL and Eclipse communities really highlight the power of the open source process. In both cases, the communities had solutions quickly in the wake of the mess created by Oracle.

Oracle/Sun not off to a good start with open source



Scala PostgreSQL Access

Thursday, July 8th, 2010 by Jim Mlodgenski

Recently, I’ve been digging into Scala to understand how PostgreSQL would integrate inside of Scala code. Scala is an interesting language which runs on the JVM like Java but eliminates much of the Java boiler plate code increasing the productivity of developers. With many of the knowledgeable Java programmers advocating Scala and large success stories like Twitter becoming more common, there is a possibility that one day Scala will unseat Java and the dominate enterprise programming language in the future. Given this possibility, it is encouraging that PostgreSQL is respected in the Scala community, but unfortunately, what I’m finding, database persistence in general is still appears to be immature inside of Scala. There is an early module called DBC that attempts to provide database connectivity, but this initial attempt was lacking. Below is an example of running a simple query which I find very awkward:

object MainDBC {

  import scala.dbc._
  import scala.dbc.Syntax._
  import syntax.Statement._

  def main(args: Array[String]): Unit = {
    val db = database("jdbc:postgresql://localhost/scala","postgres","password")
    val res = db.executeStatement {
      (select fields (("pgbench_tellers.tid" of integer)
                  and ("pgbench_tellers.bid" of integer)
                  and ("pgbench_branches.bbalance" of integer))
         from "pgbench_tellers, pgbench_branches"
        where "pgbench_tellers.bid = pgbench_branches.bid")
    }

    println(" tid   bid   bbalance")
    println("----- ----- ----------")
    for(val i <- res) {
      for(val f <- i.fields) {
        val r = f.content.sqlString
        print(r + "      ".dropRight(r.length))
      }
      println()
    }
  }
}

There are a number of object layers available that may be much easier to use, but the nice thing about Scala running on the JVM is that you can leverage the low level JDBC interface and eliminate much of the awkwardness. Below is an example of the same query but using JDBC.

object MainJDBC {

  import java.sql.{Connection, DriverManager, ResultSet}

  def main(args: Array[String]): Unit = {
    classOf[org.postgresql.Driver]
    val db = DriverManager.getConnection("jdbc:postgresql://localhost/scala","postgres","password")
    val st = db.createStatement

    val res = st.executeQuery(
               "SELECT pgbench_tellers.tid, pgbench_tellers.bid, pgbench_branches.bbalance" +
               "  FROM pgbench_tellers, pgbench_branches " +
               " WHERE pgbench_tellers.bid = pgbench_branches.bid")

    println(" tid   bid   bbalance")
    println("----- ----- ----------")
    while (res.next) {
        for(val i <- 1 to res.getMetaData.getColumnCount) {
          val r = res.getInt(i).toString
          print(r + "      ".dropRight(r.length))
        }
        println
    }
    db.close
  }
}
Scala PostgreSQL Access



Give Me My Own Cloud

Thursday, February 25th, 2010 by Jim Mlodgenski

I’ve recently attended several Cloud Computing forums and panels, and the general feeling throughout most of the audience has been that the promise of Cloud Computing sounds great, but many organizations are still apprehensive about moving to a public cloud such as Amazon’s EC2. This is understandable given security concerns and just the general feeling of a lack of control, so the concept of private clouds  becomes a great solution. It allows organizations to use the power of Cloud Computing without ever leaving the friendly confines of their own data center. There are many products that enable this such as VMWare’s vShere and the open source product Eucalyptus with many more on the way. When you look at this architecturally, this really is the next generation of virtualization giving administrators more power to efficiently use their physical resources.

The other interesting trend was the types of applications organizations are considering for use in the cloud. While there is much talk about replatforming existing application onto Cloud Computing infrastructures, many organizations seem to people getting their feet wet with new applications. They seem to be fairly traditional applications and not leveraging the elasticity of the cloud and they are just leveraging the financial benefits of not needed to procure new hardware. This trend show a lot of great promise for PostgreSQL given that Oracle does not have a favorable licensing model in virtualized environments. While Oracle is expensive in traditional environments, much of the cost benefits are eroded when Oracle is needed in a cloud environment. This is leading many people to open source solutions and PostgreSQL is a natural fit for many Oracle users.

Give Me My Own Cloud



European Union Recognizes PostgreSQL

Thursday, January 21st, 2010 by Bruce Momjian

It seems the European Commission studying the Oracle purchase of Sun/MySQL has finally realized Postgres is a viable open source alternative to MySQL and has approved the purchase:

The Commission’s investigation showed that another open source database, PostgreSQL, is considered by many database users to be a credible alternative to MySQL and could be expected to replace to some extent the competitive force currently exerted by MySQL on the database market.

This article, titled in part, “If MySQL fails, there’s always PostgreSQL”, puts it even more succinctly. I know many MySQL people worked very hard campaigning against approval, and I am sure they are disappointed by the outcome. Postgres users should thank them because even though they lost, their work has increased the visibility of all open source databases, including PostgreSQL.

European Union Recognizes PostgreSQL



Streaming PostgreSQL into the Cloud

Tuesday, January 19th, 2010 by Jim Mlodgenski

The recent Streaming Replication patch committed to the PostgreSQL source tree is the potential killer feature that can catapult PostgreSQL into a prominent position in the cloud computing landscape. This combined with Hot Standby fills a major void in PostgreSQL by providing a replication solution native to the core engine and allows for a horizontally scalable solution without any bolt ons. This is a key piece of functionality to leverage the elasticity promise of compute clouds. While it has always been possible to use replication with PostgreSQL, integrating this into the core will allow new PostgreSQL users to easily use replication without feeling overwhelmed by learning Slonik scripts. What is most exciting about this is the timing of when this is all happening. With the uncertainty of the future of MySQL, there are more people than ever looking at PostgreSQL and one of the biggest historical knocks on PostgreSQL is the lack of an integrated replication solution. This is huge as this new audience starts to look at PostgreSQL and realize that PostgreSQL can more than fit their needs as an open source database instead of MySQL.

Streaming PostgreSQL into the Cloud



Does PostgreSQL Run in the Cloud?

Monday, January 11th, 2010 by Jim Mlodgenski

Cloud Computing is the new big wave in the Information technology industry, but it is an amorphous term that is commonly misunderstood. I talk to people everyday who are confused by the Cloud, but Cloud Computing is simply a shared computing resource and has actually been part of the IT landscape for many years. The Cloud Computing ecosystem can be split into three categories, Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). SaaS can be considered the first major breakthrough in what is considered Cloud Computing today with services such as Salesforce.com and email hosting like Gmail and Hotmail. PaaS evolved out of the success of successful SaaS offering and spawned platforms allowing users to enhance SaaS offerings with platforms like the Google App Engine and Force.com. The latest category of Cloud Computing of IaaS is driving the  excitement. This includes Storage Clouds and most importantly Compute Clouds. Compute Clouds are shared environments providing virtualized Operating Systems allowing users a platform to deploy applications with greater control over the resources and the ability to deploy the applications of their choice.  These Compute Clouds are where PostgreSQL can be used to back any sort of application you would run inside a traditional data center. These different types of Clouds and the use of the common Cloud Computing terminology among them leads to the confusion of what Cloud Computing really is and ultimately leads to the common question I hear “Does PostgreSQL run in the Cloud?”…Of course it does…

Does PostgreSQL Run in the Cloud?



PostgreSQL: The Credible Alternative to MySQL

Tuesday, December 29th, 2009 by Larry Alston

In a recent blog post, Help Keep the Internet Free, Monty Widenius makes the argument that the free existence LAMP stack is threatened by the eventual acquisition of MySQL by Oracle in the Sun/Oracle deal.   His reasoning stems from the position that there is no credible alternative for MySQL and Oracle will be an awful steward for the MySQL franchise.

There is much to debate about the many points Monty makes in this blog entry but one in particular deserves a mention here.

“Q:  Why can’t everyone just switch to PostgreSQL?

PostgreSQL is a great database; I am friends with many of the PostgreSQL core developers.

The problems with PostgreSQL are:

  • It’s not compatible with MySQL (different feature sets and different support by various applications) and it’s far from trivial (in many cases practically impossible) to convert MySQL applications to PostgreSQL and vice versa.
  • It doesn’t have a single strong company backing that MySQL has to deliver high class support globally.
  • The PostgreSQL market is also, as far as I know, dominated by EnterpriseDB that provides a closed source version of PostgreSQL, which is not good enough for companies standardizing on open source.

So for the Oracle/Sun/MySQL case, PostgreSQL is not an answer that would help approve the deal, the market share is too small.”

Needless to say we at EnterpriseDB could not disagree more with this point of view.

(more…)

PostgreSQL: The Credible Alternative to MySQL



Security Enhanced Postgres

Thursday, December 17th, 2009 by Bruce Momjian

NEC Japan employee KaiGai Kohei has been working on a security-enhanced version of Postgres (SEPostgreSQL) for two years using the Security-Enhanced Linux framework. The community recently had a long discussion (summary) about the challenges and usefulness of adding this feature. While concerns about adding the feature are legitimate, some of those concerns have been recently addressed by:

  • The involvement of security professionals from the National Security Agency (NSA) and Tresys
  • A dedicated security community meeting in Maryland (report)
  • News interest in this feature because of government and credit card security requirements

It seems there is now increased user and developer interest in implementing this feature. The development would be done in several stages by adding:

  • SE-Linux support for existing Postgres permissions
  • Native and SE-Linux mandatory access control (MAC)
  • Native and SE-Linux row-level security

The community is still in an exploratory stage and it might take months for a firm plan to be accepted.

Security Enhanced Postgres



The International MySQL Soap Opera

Wednesday, December 16th, 2009 by Bruce Momjian

A year ago I wrote a tongue-in-cheek blog entry about the MySQL “soap opera”. I never anticipated the soap opera would take on the international importance it has today, with the European Union (EU) questioning the purchase of Sun Microsystems by Oracle.

There have already been two excellent Postgres blog posts about this issue (1. 2), so I just want to make three observations:

  • I never thought Oracle cared enough about MySQL to delay the merger, e.g. MySQL was not mentioned in the merger announcement, and MySQL makes up a small portion of Sun’s revenue. I am guessing either MySQL is more important than Oracle revealed, or Oracle is resisting the EU objections out of principle or stubbornness. (Perhaps there is some advantage to Oracle in delaying the merger.)
  • Oracle users rarely migrate to MySQL, so I don’t understand the anti-competitive objection to the merger. Even then-CEO Marten Mickos said in 2003 that MySQL complements and does not compete against Oracle, so it is hard to understand why the EU is objecting to the purchase on monopolistic grounds. As much as MySQL tried to position itself by adding enterprise features, the effort was incomplete, and based on the limited number of people who port applications from Oracle to MySQL, probably not very successful.Of course, Postgres works well for both MySQL and Oracle workloads based on the number of people who port applications every day, and Postgres will remain a viable open source database alternative no matter what happens to MySQL.
  • There is an argument that dual-licensing is required to create successful open source software companies. Of course Red Hat, other GPL-only software companies, and Postgres companies are doing just fine, so it is hard to see how this argument makes sense. It might be a requirement if you expect to pay all the MySQL developers, which is the way MySQL has always operated in the past. Postgres and most open source projects rely much more on volunteers and on multiple companies supporting developers who work in a cooperative fashion; MySQL was an aberration in this area.Interestingly, some MySQL users are suggesting a compromise of changing MySQL to use the Apache/BSD license, like Postgres’s, which certainly is easier for companies, but not a requirement. There is a few thoughtful articles (1, 2, 3) about the licensing issue.

I think the big concern Postgres people have is that many of the things being said about this merger are either wrong or MySQL-specific and portray open source, and open source databases specifically, in an inaccurate way.

The International MySQL Soap Opera



The Growing Popularity of PostgreSQL

Thursday, December 10th, 2009 by Ed Boyajian

There are some interesting statistics in the survey from Matt Aslett of the 451 Group (451 Group survey highlights user concerns over Oracle’s proposed ownership of MySQL).

One of the stats that stands out in the write up is:

“PostgreSQL usage is also expected to grow, from 27.1% of all users today to 30.5% in 2011″

This statistic in particular prompted a flurry of calls from partners and customers over the past few days excited about the relative penetration of Postgres indicated in this survey.

For those who follow Postgres carefully, this is not big news. The community has been thriving for a long time. In fact, the community version of PostgreSQL has long been generating millions of annual downloads (from PostgreSQL.org) and that doesn’t count how many other MILLIONS of user receive Postgres via its inclusion in every major Linux distributions like RHEL, SLES, Fedora and Open SuSE.

Regarding the projected growth of Postgres, I think the Oracle acquisition of MySQL is a small reason for it. We have a unique view on this through our work with the community and our customers (we get a front row seat), and here are some important drivers why Postgres is on the rise independent of MySQL’s uncertain future:

  • Technical improvements in recent releases. Developers, architects and DBAs are getting more out of Postgres now.  It was only in 2005 that Postgres began supporting the win32 port, a major step forward for developers who work in a Windows environment. This was a major door opener for Postgres.  In fact, some of the most important features for broad-based adoption are much more recent than most are aware, given the 20-year history of Postgres.
  • Enterprise architects and corporate developers writing more complex server-centric (Java) applications with increasing need to specify lower cost, open technologies. This class of application and developer is different than the recent trend to getting quick apps done with lightweight scripting languages (PHP, Perl, Python) where MySQL has always been strong. Java applications are different and still the dominant force in server-centric enterprise application development. They also require a higher order database like Postgres. The de-facto standard here has long been Oracle, but cost pressures are changing this quickly. Postgres is enjoying a strong and growing relevance to Java developers.  The 2009 Eclipse Developer Survey points this out with even more clarity.
  • Newer versions of Postgres are just “hitting the shelves” in production in notable deployments. Given 2-year development cycles for some key projects, the more recent technical and feature enhancements in Postgres are just starting to emerge from notable users. One of our customers, Sony Online Entertainment is a great example of this.  After two-years in development, one of SOE’s newest MMORPGs, (Massively Multiplayer Online Role-Playing Game) Free Realms, just went live and it is powered entirely by Postgres (in this case it is EnterpriseDB Postgres Plus Advanced Server). This is a heavy-duty, graphic-intensive application handling over 5 million registered users and built around “micro-transactions.”

The fact that 27.1% of the 451 Group’s surveyed database users currently use Postgres looks bigger than expected highlights how under-represented basic Postgres facts and figures are in the press and media. This is actually a testament to the independence of the Postgres community, which appropriately is more focused on technology than PR.

It is worth repeating that the growth of Postgres isn’t tied to the uncertainty of MySQL. The open source database market isn’t a single unified market. The two leading open source databases, Postgres and MySQL, are very different types of databases addressing different workloads and needs.  The growth of Postgres signals increasing acceptance of an open source RDBMS in the enterprise for applications that were typically built to run on products like Oracle, DB2, Sybase – a segment of the database market MySQL was never designed to support.

The Growing Popularity of PostgreSQL