Blog

PostgreSQL 9.1 is now in Beta

By | February 1st, 2012 at 5:02PM

Hello again from the Data team! We are excited to start 2012 with a new Beta release: PostgreSQL 9.1 is now in Beta and available in every new environment.

Features

Here is a short summary of the exciting features of PostgreSQL 9.1; for more information, please refer to the official PostgreSQL documentation.

  • Synchronous Replication: Synchronous replication ensures that transactions have been confirmed by a standby server in addition to the master, greatly preventing the possibility of data loss. PostgreSQL also supports transaction-level synchronous replication, which allows users to choose between response time and data safety on a per transaction basis.
  • Common Table Expressions (CTE): Ensures the relational integrity of your data by allowing you to update multiple related records in a single statement. By using the results of one query to execute another query, you can update records recursively, hierarchically, or across foreign keys.
  • Per-Column Collations: Adds support for linguistically-correct sorting per database, table, or column. This permits true multilingual databases where text columns can have different languages and the database correctly indexes and sorts values
  • K-Nearest Neighbor Indexes: Supports incredibly fast search for things that are “near” a particular object. KNN enhances PostgreSQL’s query capabilities by using mathematical “distance” for indexing and searching. These indexes can be used to enhance common text searches, similarity searches, geospatial location comparisons, and other queries.
  • Foreign Data Wrappers (FDW): FDWs allow users to create “drivers” and attach external data sources, which can be used as read-only tables. FDWs are a powerful tool for enterprise-data integration and they make data migration easier.

Extensions

PostgreSQL 9.1 has simplified the installation and management of contribs (modules that allow you to incorporate additional features to your database server). Extensions replace the old contrib system and allow you to expand the functionality of your database in a much more straightforward way. Each extension has a companion sql file and PostgreSQL has a catalog of what’s installed and available right from the database console.

You can list your available extensions by executing the following command from your psql prompt:

myapp_production=#  select * from pg_available_extensions;

In order to use an extension module in a database you only need to run the CREATE EXTENSION command to install the module’s features into that database. (Note: this command must be run by a database superuser). For example, if you want to support the multidimensional-cube datatype, you can extend your database enabling the cube module:

myapp_production=#  CREATE EXTENSION cube;

Using Extensions on Engine Yard Cloud

We are updating all PostgreSQL 9.0 contribs to the new extension format and making both versions available via the postgres9_extension custom recipe. This recipe allows you to enable PostgreSQL extensions packages on Engine Yard Cloud. Just edit the main/recipes/default.rb file with your database name and comment out the line that contains the extension you want.

Please make sure to let us know if you want us to add a specific extension. We’re actively working on this recipe so expect it to change often. Also, make sure that you review the instructions, because extensions may be available for different versions of PostgreSQL.

We hope you are as excited as we are about this release.

Here are more resources for PostgreSQL extensions:

JRuby 1.6.6 is Released

By | January 30th, 2012 at 1:01PM

The JRuby community is pleased to announce the release of JRuby 1.6.6.

The primary goal of the 1.6.x series is to round out our 1.9 support by fixing any reported incompatibilities. Of course, as with any JRuby release, we will continue fixing any found incompatibilities and also improve performance. All users of 1.6.5.1 (and lower) are encouraged to upgrade to 1.6.6.

Because master keeps getting further and further away from our 1.6 branch we have decided to make this our last 1.6 release. We largely fulfilled our goal of having reasonable 1.9 support. Follow up fixes for 1.9 support will only be fixed on master from this point forward. JRuby 1.7.0 will be the next release of JRuby.

Notable Changes:

  • Updated stdlib to match Ruby 1.8.7p357 and 1.9.2p312
  • Updated RubyGems to 1.8.15
  • Multiple 1.9-mode yield/splat bugs fixed (pp, rspec 2.8 working again)
  • Multiple 1.9-mode encoding bugs fixed
  • Critical fixes in Random and Fiber
  • Map Scala operator methods to symbolic names ($plus, etc)

1.6.5 Issues Resolved:

  • JRUBY-6386 time.localtime not taking any arguments
  • JRUBY-6384 yaml broken for last 1.6.6 build?
  • JRUBY-6383 Scala integration breaks with 1.6.6
  • JRUBY-6382 1.9: Padrino can’t generate an app
  • JRUBY-6381 java.util.Collection#each dose not respect to_ary defined by objects that are iteratered
  • JRUBY-6380 Original array is overwritten when select! is called on a copy
  • JRUBY-6377 rspec .should include() fails in –1.9 mode
  • JRUBY-6375 Uninformative YAML parser error
  • JRUBY-6373 ThreadError: Mutex is not owned by calling thread, when interrupting thread using a Ruby Mutex
  • JRUBY-6370 Regression in 1.6.6 in –1.9 mode
  • JRUBY-6367 –pre command line switch not working in 1.9 runtime
  • JRUBY-6366 More array splatting bugs in 1.9 mode
  • JRUBY-6361 RbConfig reports wrong OS type on Solaris
  • JRUBY-6359 Can’t convert nil to String building ActiveSupport RDoc in 1.9 mode
  • JRUBY-6354 SyntaxError: (RegexpError) invalid multibyte escape in 1.9 mode in the 50th iteration
  • JRUBY-6338 JRuby does not look for .jrubyrc in home directory on Windows
  • JRUBY-6324 random seed for srand is not initialized properly
  • JRUBY-6323 JRuby does not pay attention to either -U or LANG in determining encoding for ARGV (it is always ASCII-8BIT)
  • JRUBY-6319 ‘binding’ returns wrong binding
  • JRUBY-6318 Tempfile#open does not return the value of the block given to it
  • JRUBY-6307 Powering operation of Integer sometimes gets a wrong calculation when 1.9 mode.
  • JRUBY-6303 Cannot gem install from a remote repository in 1.9 mode
  • JRUBY-6295 Dir.chdir, $HOME and $LOGDIR behavior
  • JRUBY-6284 Calls to Kernel#exit result in an exception printed on stderr
  • JRUBY-6282 Colon is not allowed in a file name on Windows
  • JRUBY-6281 1.9: Applet does not work in the 1.9 mode
  • JRUBY-6272 Encoding exception running JRuby 1.6.5 (1.8 mode)
  • JRUBY-6233 jruby-complete-1.6.5.jar!/META-INF/jruby.home/bin/rake missing
  • JRUBY-6227 1.9: Struct#members and Struct::members should return an Array of Symbols in 1.9
  • JRUBY-6224 In MRI 1.9 the flag for Module#const_get also controls lookup of toplevel constants but not in JRuby
  • JRUBY-6217 Coverage module not working with Rails ActiveRecord associations
  • JRUBY-6214 Dir#rmdir raises improper exception if directory is not empty.
  • JRUBY-6212 IO#inspect in 1.9 could be prettier
  • JRUBY-6209 Hash#rehash does not work under some condition
  • JRUBY-6208 bad gem file creation using mode –1.9
  • JRUBY-6206 Incorrect SHA1 on two required packages in Maven Central
  • JRUBY-6205 ‘Bad file descriptor’ when using IO.popen4 with OpenJDK 7
  • JRUBY-6204 UTF-8 char in XML hangs in Joni
  • JRUBY-6202 JIT-ed class names only use method names, causing collisions
  • JRUBY-6201 File reading performance regression
  • JRUBY-6200 1.9: Loading some Unicode characters results in non-printable characters on Windows
  • JRUBY-6199 JRuby is hardcoded to use ‘-mmacos-version-min=10.4’ which is not compatible with ‘-rpath’ being used
  • JRUBY-6198 When calling dup on file open in binmode the new object does not respect binmode
  • JRUBY-6192 jruby::Handle declarations use ‘extern “C”’, causing linker symbol mismatches
  • JRUBY-6182 Marshal.dump yields different value after adding/removing instance variables (and disagrees with MRI)
  • JRUBY-6176 SecureRandom.uuid is not implemented
  • JRUBY-6173 pp is broken in –1.9 mode
  • JRUBY-6172 Requiring a file from a JAR that has a path inside the JAR that coincides with a path on the file system that includes a symlink fails
  • JRUBY-6171 Enumerable does not splat
  • JRUBY-6170 Fibers are broken in JRuby 1.6.5

In Case You Missed It: January’s JRuby Meetup

By | January 27th, 2012 at 1:01PM

If you weren’t able to make it to our JRuby Meetup last week at Engine Yard HQ, you missed out on an awesome presentation from Square platform engineer Xavier Shay. However, you’re in luck! Our favorite videographers at Marakana (a big shout out and thank you to Max Walker!) taped the whole thing. And of course, a big thanks to Xavier for coming and chatting about Square’s awesome technology! Hear about how Square incorporated JRuby, Kirk, Jetty and Jetpack into their platform.

Check out the video and slides right here:


Also, if you haven’t already heard, JRuby Conf 2012 is going to be in the lovely Minneapolis, MN on May 21-23! Check out the brand new website to find out more!

And We’re Live!

By | January 26th, 2012 at 11:01AM

The 2012 JRubyConf site is live, and we’re really excited about it!

We’ll be using the site as a way to keep you up to date with conference developments and details as they unfold. This will be the fourth annual JRubyConf and definitely the biggest and best yet! Join us in talking about and celebrating the union of the Java and Ruby communities. Follow the news section of the site to find out more about sponsorships, speakers, after-events and a soon-to-follow call-for-proposals. Also, stay tuned for more information about Workshop Day (Monday the 21st) and the conference schedule (Tuesday & Wednesday the 22nd & 23rd).

This year’s JRubyConf will take place in Minneapolis, Minnesota, home to some of JRuby’s main contributors and biggest cheerleaders, at the Guthrie Theater on the banks of the mighty Mississippi.

Want to support our cause? We’re currently looking for sponsors for everything from snacks to after-parties, so check out our prospectus for more information, or email us at jrubyconf@engineyard.com if you have other cool ideas. We’d love to see your participation.

Want to join us? Buy your tickets now. Can’t wait to see you all there!

RVM Stable and More

By | January 24th, 2012 at 12:01PM

Stable RVM has been available for some time now. Many of you may know what goes on in RVM, but there is still a story to tell.

RVM is now using git flow, following the model outlined here, which makes a diametrical change in the release model of RVM. We will no longer make small releases using the master branch. We will have rare larger releases (called latest). Even so, we will maintain a stable branch which gets only fixes and important updates like ruby version updates. This new release model will allow for development of new features in head whilst keeping a stable version of RVM available for production use.

To install stable RVM:

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

To update stable rvm:

$ rvm get stable # the same as:
$ rvm get branch wayneeseguin/stable

It is also possible to use your own fixes for rvm, which is especially useful for contributors. They can test their work or ask someone else to test their work before sending a pull request. Simply fork the project, add your changes, commit, push and then anyone can install / update to your fork:

$ rvm get branch mpapis/master

RVM now provides information about the age of the installation, in order to see exactly how old the installation is, we can run:

$ rvm info rvm
rvm:
version:      "rvm 1.10.0 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]"
updated:      "2 hours 52 minutes 49 seconds ago"