<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>tail -f /dev/dim</title>
    <link>http://tapoueh.org/index.html</link>
    <description>Dimitri Fontaine's blog</description>
    <language>en-us</language>
    <generator>Emacs Muse</generator>






<item>
  <title>Live Upgrading PGQ</title>
  <link>http://tapoueh.org/blog/2013/02/08-PGQ-Live-Upgrade.html</link>
  <description><![CDATA[<p>Some <a href="http://skytools.projects.pgfoundry.org/skytools-3.0/doc/">skytools</a> related new today, it's been a while. For those who where at
my <a href="http://tapoueh.org/blog/2013/02/04-Another-great-FOSDEM.html">FOSDEM's talk</a> about <a href="https://fosdem.org/2013/schedule/event/postgresql_implementing_high_availability/">Implementing High Availability</a> you might have heard
that I really like working with <a href="http://wiki.postgresql.org/wiki/Skytools#PgQ">PGQ</a>. A new version has been released a while
ago, and the most recent verion is now <code>3.1.3</code>, as announced in the
<a href="http://www.postgresql.org/message-id/CACMqXCLD2je5VFqUCzjwC2s5QQVYLe6-4awJaRvqLSBEVw8_MQ@mail.gmail.com">Skytools 3.1.3</a> email.</p>

<center>
<p><img src="../../../images/software-upgrade.320.png" alt=""></p>
</center>

<center>
<p><em>Upgrade time!</em></p>
</center>

<h3>Skytools 3.1.3 enters debian</h3>

<p class="first">First news is that <em>Skytools 3.1.3</em> has been entering <a href="http://packages.debian.org/search?keywords=skytools3">debian</a> today (I hope
that by the time you reach that URL, it's been updated to show information
according to the news here, but I might be early). As there's current a
<em>debian freeze</em> to release <em>wheezy</em> (and you can help <a href="http://www.debian.org/News/2012/20121110">squash some bugs</a>), this
version is only getting uploaded to <em>experimental</em> for now. Thanks to the
tireless work of <a href="http://www.df7cb.de/blog/2012/apt.postgresql.org.html">Christoph Berg</a> though, this version is already available
from <a href="https://wiki.postgresql.org/wiki/Apt">apt.postgresql.org</a>.</p>


<h3>Upgrading to PGQ 3</h3>

<p class="first">The other news is that I've been testing <em>live upgrade</em> scenario where we want
to upgrade from <code>PGQ</code> to <code>PGQ3</code>, and it works pretty well, and it's quite simple
to achieve too. Here's how.</p>

<p>So the first thing is to shut down the current <em>ticker</em> process. Then we
install the new packages, assuming that you did follow the step in the wiki
pointed above, please go read <a href="https://wiki.postgresql.org/wiki/Apt">apt.postgresql.org</a> again now if needs be.</p>

<pre class="src">
pgqadm.py ticker.ini -s
sudo apt-get install postgresql-9.1-pgq3 skytools3-ticker skytools3
</pre>

<p>The ticker is not running anymore, we have the right version of the software
installed. Next step is to upgrade the database parts of PGQ:</p>

<pre class="src">
psql -f /usr/share/skytools3/pgq.upgrade_2.1_to_3.0.sql ...
psql -1 -f /usr/share/postgresql/9.1/contrib/pgq.upgrade.sql ...
</pre>

<p>Of course replace those <code>...</code> with options such as your actual connection
string. I tend to always add <code>-vON_ERROR_STOP=1</code> to all these
commands, so that I don't depend on having the right <code>.psqlrc</code> on the
particular server I'm connected to. Also remember that if you want to do
that for more than one database, you need to actually run that pair of
commands for each of them.</p>

<p>Now it's time to restart the new ticker. The main changes from the previous
one is that it is now a <code>C</code> program called <code>pgqd</code> that knows how to tick for any
number of <em>databases</em>, so that you only have to have <em>one instance</em> around <em>per
cluster</em> now.</p>

<pre class="src">
sudo /etc/init.d/skytools3 start
tail -f /var/log/skytools/pgqd.log
</pre>

<p>Those two commands are taking for granted that you did prepare the <code>pgqd</code>
setup the <em>debian</em> and <em>skytools</em> way, by adding your config in
<code>/etc/skytools3/pgqd.ini</code> and editing <code>/etc/skytools.ini</code> accordingly, so that
it's automatically taken into account at machine boot.</p>

<p>Note that I did actually exercised the procedure above while running a
<a href="http://www.postgresql.org/docs/9.2/static/pgbench.html">pgbench</a> test replicated with <code>londiste</code>. Of course the replication has been
lagging a little while no <em>ticker</em> was running, and then it catched-up as fast
as it could, in that case:</p>

<pre class="src">
INFO {count: 245673, ignored: 0, duration: 422.104366064}
</pre>


<h3>Happy Hacking!</h3>

<p class="first">So if you have any <em>batch processing</em> needs, remember to consider what PGQ has
to offer. And yes if you're running some cron job to compute things out of
the database for you, you are doing some <em>batch processing</em>.</p>

<center>
<p><img src="../../../images/hayseed.jpg" alt=""></p>
</center>

<center>
<p><em>Yes, I did search for Transactional Batch Processing</em></p>
</center>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Fri, 08 Feb 2013 15:52:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2013/02/08-PGQ-Live-Upgrade.html</guid>
</item>
<item>
  <title>PostgreSQL and debian</title>
  <link>http://tapoueh.org/blog/2011/09/05-apt-postgresql-org.html</link>
  <description><![CDATA[<p>After talking about it for a very long time, work finally did begin!  I'm
talking about the <a href="https://github.com/dimitri/apt.postgresql.org">apt.postgresql.org</a> build system that will allow us, in the
long run, to propose <code>debian</code> versions of binary packages for <a href="http://www.postgresql.org/">PostgreSQL</a> and
its extensions, compiled for a bunch of debian and ubuntu versions.</p>

<p>We're now thinking to support the <code>i386</code> and <code>amd64</code> architectures for <code>lenny</code>,
<code>squeeze</code>, <code>wheezy</code> and <code>sid</code>, and also for <code>maverick</code> and <code>natty</code>, maybe <code>oneiric</code> too
while at it.</p>

<p>It's still the very beginning of the effort, and it was triggered by the
decision to move <code>sid</code> to <code>9.1</code>.  While it's a good decision in itself, I still
hate to have to pick only one PostgreSQL version per debian stable release
when we have all the technical support we need to be able to support all
stable releases that <em>upstream</em> is willing to maintain. If you've been living
under a rock, or if you couldn't care less about <code>debian</code> choices, the problem
here for debian is ensuring security (and fixes) updates for PostgreSQL —
they promise they will handle the job just fine in the social contract, and
don't want to have to it without support from PostgreSQL if a <em>debian stable</em>
release contains a deprecated PostgreSQL version.</p>

<p>That opens the door for PostgreSQL community to handle the packaging of its
solutions as a service to its debian users.  We intend to open with support
for <code>8.4</code>, <code>9.0</code> and <code>9.1</code>, and maybe <code>8.3</code> too, as <a href="http://qa.debian.org/developer.php?login=myon">Christoph Berg</a> is doing good
progress on this front.  See, it's teamwork here!</p>

<p>We still have more work to do, and setting up the build environment so that
we are able to provide the packages for so much targets will indeed be
interesting. Getting there, a step after another.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 05 Sep 2011 17:14:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/09/05-apt-postgresql-org.html</guid>
</item>
<item>
  <title>pgfincore in debian</title>
  <link>http://tapoueh.org/blog/2011/08/19-pgfincore-in-debian.html</link>
  <description><![CDATA[<p>As of pretty recently, <a href="http://villemain.org/projects/pgfincore">pgfincore</a> is now in debian, as you can see on its
<a href="http://packages.debian.org/sid/postgresql-9.0-pgfincore">postgresql-9.0-pgfincore</a> page.  The reason why it entered the <a href="http://www.debian.org/">debian</a>
archives is that it reached the <code>1.0</code> release!</p>

<p>Rather than talking about what <em>pgfincore</em> is all about (<em>A set of functions to
manage pages in memory from PostgreSQL</em>), I will talk about its packaging and
support as a <em>debian package</em>.  Here's the first example of a modern
multi-version packaging I have to offer.  <a href="https://github.com/dimitri/pgfincore/tree/master/debian">pgfincore packaging</a> supports
building for <code>8.4</code> and <code>9.0</code> and <code>9.1</code> out of the box, even if the only binary
you'll find in <em>debian</em> sid is the <code>9.0</code> one, as you can check on the
<a href="http://packages.debian.org/source/sid/pgfincore">pgfincore debian source package</a> page.</p>

<p>Also, this is the first package I've done properly using the newer version
of <a href="http://kitenet.net/~joey/code/debhelper/">debhelper</a>, which make the <a href="https://github.com/dimitri/pgfincore/blob/master/debian/rules">debian/rules</a> file easier than ever.  Let's have
a look at it:</p>

<pre class="src">
<span style="color: #b8860b;">SRCDIR</span> = $(<span style="color: #b8860b;">CURDIR</span>)
<span style="color: #b8860b;">TARGET</span> = $(<span style="color: #b8860b;">CURDIR</span>)/debian/pgfincore-%v
<span style="color: #b8860b;">PKGVERS</span> = $(<span style="color: #b8860b;">shell</span> dpkg-parsechangelog | awk -F <span style="color: #bc8f8f;">'[:-]'</span> <span style="color: #bc8f8f;">'/^Version:/ { print substr($$2, 2) }'</span>)
<span style="color: #b8860b;">EXCLUDE</span> = --exclude-vcs --exclude=debian

<span style="color: #7f007f;">include</span> <span style="color: #b8860b;">/usr/share/postgresql-common/pgxs_debian_control.mk</span>

<span style="color: #0000ff;">override_dh_auto_clean</span>: debian/control
        pg_buildext clean $(<span style="color: #b8860b;">SRCDIR</span>) $(<span style="color: #b8860b;">TARGET</span>) <span style="color: #bc8f8f;">"$(</span><span style="color: #b8860b;">CFLAGS</span><span style="color: #bc8f8f;">)"</span>
        dh_clean

<span style="color: #0000ff;">override_dh_auto_build</span>:
<span style="background-color: #ff69b4;">        #</span><span style="color: #b22222;"> </span><span style="color: #b22222;">build all supported version
</span>        pg_buildext build $(<span style="color: #b8860b;">SRCDIR</span>) $(<span style="color: #b8860b;">TARGET</span>) <span style="color: #bc8f8f;">"$(</span><span style="color: #b8860b;">CFLAGS</span><span style="color: #bc8f8f;">)"</span>

<span style="color: #0000ff;">override_dh_auto_install</span>:
<span style="background-color: #ff69b4;">        #</span><span style="color: #b22222;"> </span><span style="color: #b22222;">then install each of them
</span>        for v in <span style="color: #bc8f8f;">`pg_buildext supported-versions $(</span><span style="color: #b8860b;">SRCDIR</span><span style="color: #bc8f8f;">)`</span>; do \
                dh_install -ppostgresql-$$v-pgfincore ;\
        done

<span style="color: #0000ff;">orig</span>: clean
        cd .. &amp;&amp; tar czf pgfincore_$(<span style="color: #b8860b;">PKGVERS</span>).orig.tar.gz $(<span style="color: #b8860b;">EXCLUDE</span>) pgfincore

<span style="color: #0000ff;">%</span>:
        dh <span style="color: #0000ff;">$</span><span style="color: #5f9ea0;">@</span>
</pre>

<p>The <code>debian/rules</code> file is known to be the corner stone of your debian
packaging, and usually is the most complex part of it.  It's a <code>Makefile</code> at
its heart, and we can see that thanks to the <code>debhelper</code> magic it's not that
complex to maintain anymore.</p>

<p>Then, this file is using support from a bunch of helpers command, each of
them comes with its own man page and does a little part of the work.  The
overall idea around <code>debhelper</code> is that what it does covers 90% of the cases
around, and it's not aiming for more.  You have to <em>override</em> the parts where
it defaults to being wrong.</p>

<p>Here for example the build system has to produce files for all three
supported versions of <a href="http://www.postgresql.org/">PostgreSQL</a>, which means invoking the same build system
three time with some changes in the <em>environment</em> (mainly setting the
<code>PG_CONFIG</code> variable correctly).  But even for that we have a <em>debian</em> facility,
that comes in the package <a href="http://packages.debian.org/sid/postgresql-server-dev-all">postgresql-server-dev-all</a>, called <code>pg_buildext</code>.  As
long as your extension build system is <code>VPATH</code> friendly, it's all automated.</p>

<p>Please read that last sentence another time.  <code>VPATH</code> is the thing that allows
<code>Make</code> to find your source tree somewhere in the system, not in the current
working directory.  That allows you to cleanly build the same sources in
different build locations, which is exactly what we need here, and is
cleanly supported by <a href="http://www.postgresql.org/docs/9.1/static/extend-pgxs.html">PGXS</a>, the <a href="http://www.postgresql.org/docs/9.1/static/extend-pgxs.html">PostgreSQL Extension Building Infrastructure</a>.</p>

<p>Which means that the main <code>Makefile</code> of <em>pgfincore</em> had to be simplified, and
the code layout too.  Some advances <code>Make</code> features such as <code>$(wildcard ...)</code>
and all will not work here.  See what we got at the end:</p>

<pre class="src">
ifndef VPATH
<span style="color: #b8860b;">SRCDIR</span> = .
else
<span style="color: #b8860b;">SRCDIR</span> = $(<span style="color: #b8860b;">VPATH</span>)
endif

<span style="color: #b8860b;">EXTENSION</span>    = pgfincore
<span style="color: #b8860b;">EXTVERSION</span>   = $(<span style="color: #b8860b;">shell</span> grep default_version $(<span style="color: #b8860b;">SRCDIR</span>)/$(<span style="color: #b8860b;">EXTENSION</span>).control | \
               sed -e <span style="color: #bc8f8f;">"s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/"</span>)

<span style="color: #b8860b;">MODULES</span>      = $(<span style="color: #b8860b;">EXTENSION</span>)
<span style="color: #b8860b;">DATA</span>         = sql/pgfincore.sql sql/uninstall_pgfincore.sql
<span style="color: #b8860b;">DOCS</span>         = doc/README.$(<span style="color: #b8860b;">EXTENSION</span>).rst

<span style="color: #b8860b;">PG_CONFIG</span>    = pg_config

<span style="color: #b8860b;">PG91</span>         = $(<span style="color: #b8860b;">shell</span> $(<span style="color: #b8860b;">PG_CONFIG</span>) --version | grep -qE <span style="color: #bc8f8f;">"8\.|9\.0"</span> &amp;&amp; echo no || echo yes)

ifeq ($(<span style="color: #b8860b;">PG91</span>),yes)
<span style="color: #0000ff;">all</span>: pgfincore--$(<span style="color: #b8860b;">EXTVERSION</span>).sql

<span style="color: #0000ff;">pgfincore--$(</span><span style="color: #0000ff;">EXTVERSION</span><span style="color: #0000ff;">).sql</span>: sql/pgfincore.sql
        cp $<span style="color: #5f9ea0;">&lt;</span> <span style="color: #0000ff;">$</span><span style="color: #5f9ea0;">@</span>

<span style="color: #b8860b;">DATA</span>        = pgfincore--unpackaged--$(<span style="color: #b8860b;">EXTVERSION</span>).sql pgfincore--$(<span style="color: #b8860b;">EXTVERSION</span>).sql
<span style="color: #b8860b;">EXTRA_CLEAN</span> = sql/$(<span style="color: #b8860b;">EXTENSION</span>)--$(<span style="color: #b8860b;">EXTVERSION</span>).sql
endif

<span style="color: #b8860b;">PGXS</span> := $(<span style="color: #b8860b;">shell</span> $(<span style="color: #b8860b;">PG_CONFIG</span>) --pgxs)
<span style="color: #7f007f;">include</span> $(<span style="color: #b8860b;">PGXS</span>)

<span style="color: #0000ff;">deb</span>:
        dh clean
        make -f debian/rules orig
        debuild -us -uc -sa
</pre>

<p>No more <code>Make</code> magic to find source files.  Franckly though, when your sources
are 1 <code>c</code> file and 2 <code>sql</code> files, you don't need that much magic anyway.  You
just want to believe that a single generic <code>Makefile</code> will happily build any
project you throw at it, only requiring minor adjustment.  Well, the reality
is that you might need some more little adjustments if you want to benefit
from <code>VPATH</code> building, and having the binaries for <code>8.4</code> and <code>9.0</code> and <code>9.1</code> built
seemlessly in a simple loop.  Like we have here for <em>pgfincore</em>.</p>

<p>Now the <code>Makefile</code> still contains a little bit of magic, in order to parse the
extension version number from its <em>control file</em> and produce a <em>script</em> named
accordingly.  Then you'll notice a difference between the
<a href="https://github.com/dimitri/pgfincore/blob/master/debian/postgresql-9.1-pgfincore.install">postgresql-9.1-pgfincore.install</a> file and the
<a href="https://github.com/dimitri/pgfincore/blob/master/debian/postgresql-9.0-pgfincore.install">postgresql-9.0-pgfincore.install</a>.  We're just not shipping the same files:</p>

<pre class="src">
debian/pgfincore-9.0/pgfincore.so usr/lib/postgresql/9.0/lib
sql/pgfincore.sql usr/share/postgresql/9.0/contrib
sql/uninstall_pgfincore.sql usr/share/postgresql/9.0/contrib
</pre>

<p>As you can see here:</p>

<pre class="src">
debian/pgfincore-9.1/pgfincore.so usr/lib/postgresql/9.1/lib
debian/pgfincore-9.1/pgfincore*.sql usr/share/postgresql/9.1/extension
sql/pgfincore--unpackaged--1.0.sql usr/share/postgresql/9.1/extension
</pre>

<p>So, now that we uncovered all the relevant magic, packaging and building
your next extension so that it supports as many PostgreSQL major releases as
you need to will be that easy.</p>

<p>For reference, you might need to also tweak
<code>/usr/share/postgresql-common/supported-versions</code> so that it allows you to
build for all those versions you claim to support in the <a href="https://github.com/dimitri/pgfincore/blob/master/debian/pgversions">debian/pgversions</a>
file.</p>

<pre class="src">
$ sudo dpkg-divert \
--divert /usr/share/postgresql-common/supported-versions.distrib \
--rename /usr/share/postgresql-common/supported-versions

$ cat /usr/share/postgresql-common/supported-versions
#! /bin/bash

dpkg -l postgresql-server-dev-* \
| awk -F '[ -]' '/^ii/ &amp;&amp; ! /server-dev-all/ {print $6}'
</pre>

<p>All of this will come pretty handy when we finally sit down and work on a
way to provide binary packages for PostgreSQL and its extensions, and all
supported versions of those at that.  This very project is not dead, it's
just sleeping some more.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Fri, 19 Aug 2011 23:00:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/08/19-pgfincore-in-debian.html</guid>
</item>
<item>
  <title>Multi-Version support for Extensions</title>
  <link>http://tapoueh.org/blog/2011/06/29-multi-version-support-for-extensions.html</link>
  <description><![CDATA[<p class="first">We still have this problem to solve with extensions and their packaging.
How to best organize things so that your extension is compatible with before
<code>9.1</code> and <code>9.1</code> and following releases of <a href="http://www.postgresql.org/">PostgreSQL</a>?</p>

<p>Well, I had to do it for the <a href="http://pgfoundry.org/projects/ip4r/">ip4r</a> contribution, and I wanted the following
to happen:</p>

<pre class="src">
dpkg-deb: building package `postgresql-8.3-ip4r' ...
dpkg-deb: building package `postgresql-8.4-ip4r' ...
dpkg-deb: building package `postgresql-9.0-ip4r' ...
dpkg-deb: building package `postgresql-9.1-ip4r' ...
</pre>

<p>And here's a simple enough way to achieve that.  First, you have to get your
packaging ready the usual way, and to install the build dependencies.  Then
realizing that <code>/usr/share/postgresql-common/supported-versions</code> from the
latest <code>postgresql-common</code> package will only return <code>8.3</code> in <code>lenny</code> (yes, I'm
doing some <em>backporting</em> here), we have to tweak it.</p>

<pre class="src">
$ dpkg -l postgresql-server-dev-* | awk '/^ii/ {print $2}'
postgresql-server-dev-8.3
postgresql-server-dev-8.4
postgresql-server-dev-9.0
postgresql-server-dev-9.1
postgresql-server-dev-all

$ sudo dpkg-divert \
--divert /usr/share/postgresql-common/supported-versions.distrib \
--rename /usr/share/postgresql-common/supported-versions

$ cat /usr/share/postgresql-common/supported-versions
#! /bin/bash

dpkg -l postgresql-server-dev-* \
| awk -F '[ -]' '/^ii/ &amp;&amp; ! /server-dev-all/ {print $6}'
</pre>

<p>Now we are allowed to build our extension for all those versions, so we add
<code>9.1</code> to the <code>debian/pgversions</code> file.  And <code>debuild</code> will do the right thing now,
thanks to <a href="http://manpages.debian.net/cgi-bin/man.cgi?query=pg_buildext">pg_buildext</a> from <a href="http://packages.debian.org/sid/postgresql-server-dev-all">postgresql-server-dev-all</a>.</p>

<p>The problem we face is that the built is not an <a href="http://www.postgresql.org/docs/9.1/static/extend-extensions.html">extension</a> as in <code>9.1</code>, so
things like <code>\dx</code> in <code>psql</code> and <a href="http://www.postgresql.org/docs/9.1/static/sql-createextension.html">CREATE EXTENSION</a> will not work out of the box.
First, we need a control file.  Then we need to remove the transaction
control from the install script (here, <code>ip4r.sql</code>), and finally, this script
needs to be called <code>ip4r--1.05.sql</code>.  Here's how I did it:</p>

<pre class="src">
$ cat ip4r.control
comment = 'IPv4 and IPv4 range index types'
default_version = '1.05'
relocatable = yes

$ cat debian/postgresql-9.1-ip4r.install
debian/ip4r-9.1/ip4r.so usr/lib/postgresql/9.1/lib
ip4r.control usr/share/postgresql/9.1/extension
debian/ip4r-9.1/ip4r.sql usr/share/postgresql/9.1/extension

$ cat debian/postgresql-9.1-ip4r.links
usr/share/postgresql/9.1/extension/ip4r.sql usr/share/postgresql/9.1/extension/ip4r--1.05.sql
</pre>

<p>Be careful not to forget to remove any and all <code>BEGIN;</code> and <code>COMMIT;</code> lines from
the <code>ip4r.sql</code> file, which meant that I also removed support for <em>Rtree</em>, which
is not relevant for modern versions of PostgreSQL saith the script (post
<code>8.2</code>).  That means I'm not publishing this very work yet, but I wanted to
share the <code>debian/postgresql-9.1-extension.links</code> idea.</p>

<p>Notice that I didn't change anything about the <code>.sql.in</code> make rule, so I
didn't have to use the support for <code>module_pathname</code> in the control file.</p>

<p>Now, after the usual <code>debuild</code> step, I can just <code>sudo debi</code> to install all the
just build packages and <code>CREATE EXTENSION</code> will run fine.  And in <code>9.0</code> you get
the old way to install it, but it still works:</p>

<pre class="src">
$ psql -U postgres --cluster 9.0/main -1 \
-f /usr/share/postgresql/9.0/contrib/ip4r.sql
&lt;lots of chatter&gt;

$ psql -U postgres --cluster 9.1/main -c 'create extension ip4r;'
CREATE EXTENSION
</pre>

<p>That's it :)</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Wed, 29 Jun 2011 09:50:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/06/29-multi-version-support-for-extensions.html</guid>
</item>




<item>
  <title>Back from Ottawa, preparing for Cambridge</title>
  <link>http://tapoueh.org/blog/2011/05/30-back-from-ottawa-preparing-for-cambridge.html</link>
  <description><![CDATA[<p class="first">While <a href="http://blog.hagander.net/">Magnus</a> is all about <a href="http://2011.pgconf.eu/">PG Conf EU</a> already, you have to realize we're just
landed back from <a href="http://www.pgcon.org/2011/">PG Con</a> in Ottawa.  My next stop in the annual conferences
is <a href="http://char11.org/">CHAR 11</a>, the <em>Clustering, High Availability and Replication</em> conference in
Cambridge, 11-12 July.  Yes, on the old continent this time.</p>

<p>This year's <em>pgcon</em> hot topics, for me, have been centered around a better
grasp at <a href="http://www.postgresql.org/docs/9.1/static/transaction-iso.html#XACT-SERIALIZABLE">SSI</a> and <em>DDL Triggers</em>.  Having those beasts in <a href="http://www.postgresql.org/">PostgreSQL</a> would
allow for auditing, finer privileges management and some more automated
replication facilities.  Imagine that <code>ALTER TABLE</code> is able to fire a <em>trigger</em>,
provided by <em>Londiste</em> or <em>Slony</em>, that will do what's needed on the cluster by
itself.  That would be awesome, wouldn't it?</p>

<p>At <em>CHAR 11</em> I'll be talking about <a href="http://wiki.postgresql.org/wiki/SkyTools">Skytools 3</a>.  You know I've been working on
its <em>debian</em> packaging, now is the time to review the documentation and make
there something as good looking as the monitoring system are...</p>

<p>Well, expect some news and a nice big picture diagram overview soon, if work
schedule leaves me anytime that's what I want to be working on now.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 30 May 2011 11:00:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/05/30-back-from-ottawa-preparing-for-cambridge.html</guid>
</item>
<item>
  <title>Extension module_pathname and .sql.in</title>
  <link>http://tapoueh.org/blog/2011/05/02-extension-module_pathname-and-sqlin.html</link>
  <description><![CDATA[<p class="first">While currently too busy at work to deliver much Open Source contributions,
let's debunk an old habit of <a href="http://www.postgresql.org/">PostgreSQL</a> extension authors.  It's all down to
copy pasting from <em>contrib</em>, and there's no reason to continue doing <code>$libdir</code>
this way ever since <code>7.4</code> days.</p>

<p>Let's take an example here, with the <a href="https://github.com/dimitri/prefix">prefix</a> extension.  This one too will
need some love, but is still behind on my spare time todo list, sorry about
that.  So, in the <code>prefix.sql.in</code> we read</p>

<pre class="src">
  CREATE OR REPLACE FUNCTION prefix_range_in(cstring)
  RETURNS prefix_range
  AS <span style="color: #bc8f8f;">'MODULE_PATHNAME'</span>
  LANGUAGE <span style="color: #bc8f8f;">'C'</span> IMMUTABLE STRICT;
</pre>

<p>Two things are to change here.  First, the PostgreSQL <em>backend</em> will
understand just fine if you just say <code>AS '$libdir/prefix'</code>.  So you have to
know in the <code>sql</code> script the name of the shared object library, but if you do,
you can maintain directly a <code>prefix.sql</code> script instead.</p>

<p>The advantage is that you now can avoid a compatibility problem when you
want to support PostgreSQL from <code>8.2</code> to <code>9.1</code> in your extension (older than
that and it's <a href="http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy">no longer supported</a>).  You directly ship your script.</p>

<p>For compatibility, you could also use the <a href="http://developer.postgresql.org/pgdocs/postgres/extend-extensions.html">control file</a> <code>module_pathname</code>
property.  But for <code>9.1</code> you then have to add a implicit <code>Make</code> rule so that the
script is derived from your <code>.sql.in</code>. And as you are managing several scripts
— so that you can handle <em>versioning</em> and <em>upgrades</em> — it can get hairy (<em>hint</em>,
you need to copy <code>prefix.sql</code> as <code>prefix--1.1.1.sql</code>, then change its name at
next revision, and think about <em>upgrade</em> scripts too).  The <code>module_pathname</code>
facility is better to keep for when managing more than a single extension in
the same directory, like the <a href="http://git.postgresql.org/gitweb?p=postgresql.git;a=blob;f=contrib/spi/Makefile;h=0c11bfcbbd47b0c3ed002874bfefd9e2022cf5ac;hb=HEAD">SPI contrib</a> is doing.</p>

<p>Sure, maintaining an extension that targets both antique releases of
PostgreSQL and <a href="http://developer.postgresql.org/pgdocs/postgres/sql-createextension.html">CREATE EXTENSION</a> super-powered one(s) (not yet released) is a
little more involved than that.  We'll get back to that, as some people are
still pioneering the movement.</p>

<p>On my side, I'm working with some <a href="http://www.debian.org/">debian</a> <a href="http://qa.debian.org/developer.php?login=myon">developer</a> on how to best manage the
packaging of those extensions, and this work could end up as a specialized
<em>policy</em> document and a coordinated <em>team</em> of maintainers for all things
PostgreSQL in <code>debian</code>.  This will also give some more steam to the PostgreSQL
effort for debian packages: the idea is to maintain packages for all
supported version (from <code>8.2</code> up to soon <code>9.1</code>), something <code>debian</code> itself can not
commit to.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 02 May 2011 17:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/05/02-extension-module_pathname-and-sqlin.html</guid>
</item>


















<item>
  <title>Emacs Kicker</title>
  <link>http://tapoueh.org/blog/2011/04/blog/2011/04/15-emacs-kicker.html</link>
  <description><![CDATA[<p>Following up on the very popular <a href="https://github.com/technomancy/emacs-starter-kit">emacs-starter-kit</a>, I'm now proposing the
<a href="https://github.com/dimitri/emacs-kicker">emacs-kicker</a>.  It's about the <code>.emacs</code> file you've seen in older posts here,
which I maintain for some colleagues.  After all, if they find it useful,
some more people might to, so I've decided to publish it.</p>

<p>What you'll find is a very simple <code>128</code> lines <a href="http://www.gnu.org/software/emacs/">Emacs</a> user init file, based on
<a href="https://github.com/dimitri/el-get">el-get</a> for external packages.  A not so <em>random</em> selection of those is used,
here's the list when you hide some details:</p>

<pre class="src">
 '(el-get                       <span style="color: #b22222;">; </span><span style="color: #b22222;">el-get is self-hosting
</span>   escreen                      <span style="color: #b22222;">; </span><span style="color: #b22222;">screen for emacs, C-\ C-h
</span>   php-mode-improved            <span style="color: #b22222;">; </span><span style="color: #b22222;">if you're into php...
</span>   psvn                         <span style="color: #b22222;">; </span><span style="color: #b22222;">M-x svn-status
</span>   switch-window                <span style="color: #b22222;">; </span><span style="color: #b22222;">takes over C-x o
</span>   auto-complete                <span style="color: #b22222;">; </span><span style="color: #b22222;">complete as you type with overlays
</span>   emacs-goodies-el             <span style="color: #b22222;">; </span><span style="color: #b22222;">the debian addons for emacs
</span>   yasnippet                    <span style="color: #b22222;">; </span><span style="color: #b22222;">powerful snippet mode
</span>   zencoding-mode               <span style="color: #b22222;">; </span><span style="color: #b22222;">http://www.emacswiki.org/emacs/ZenCoding
</span>   (<span style="color: #da70d6;">:name</span> buffer-move           <span style="color: #b22222;">; </span><span style="color: #b22222;">move buffers around in windows
</span>   (<span style="color: #da70d6;">:name</span> smex                  <span style="color: #b22222;">; </span><span style="color: #b22222;">a better (ido like) M-x
</span>   (<span style="color: #da70d6;">:name</span> magit                 <span style="color: #b22222;">; </span><span style="color: #b22222;">git meet emacs, and a binding
</span>   (<span style="color: #da70d6;">:name</span> goto-last-change      <span style="color: #b22222;">; </span><span style="color: #b22222;">move pointer back to last change
</span></pre>

<p>Another interresting thing to note in this <code>kicker</code> is a choice of some key
bindings that are rather unusual (yet) I guess.</p>

<pre class="src">
(global-set-key (kbd <span style="color: #bc8f8f;">"C-x C-b"</span>) 'ido-switch-buffer)
(global-set-key (kbd <span style="color: #bc8f8f;">"C-x C-c"</span>) 'ido-switch-buffer)
(global-set-key (kbd <span style="color: #bc8f8f;">"C-x B"</span>) 'ibuffer)
</pre>

<p>Yes, you see that I've rebound <code>C-x C-c</code> to switching buffers.  That key is
really easy to use and I don't think that <code>M-x kill-emacs</code> deserves it.  Keys
that are so easy to use should be kept for frequent actions, and quiting
emacs is a once-a-day to once-a-month action here.  And you can still quit
from the window manager button or from the menu or from <code>M-x</code>.</p>

<p>Also <em>Mac</em> users are not left behind, you will see some settings that either
are adapted to the system (like choosing another <em>font</em>, keep displaying the
<code>menu-bar</code> or not installing the darkish <code>tango-color-mode</code> on this system,
where it renders poorly in my opinion), as you can see here:</p>

<pre class="src">
(<span style="color: #7f007f;">if</span> (string-match <span style="color: #bc8f8f;">"apple-darwin"</span> system-configuration)
    (set-face-font 'default <span style="color: #bc8f8f;">"Monaco-13"</span>)
  (set-frame-font <span style="color: #bc8f8f;">"Monospace-10"</span>))

(<span style="color: #7f007f;">when</span> (string-match <span style="color: #bc8f8f;">"apple-darwin"</span> system-configuration)
  (setq mac-allow-anti-aliasing t)
  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none))
</pre>

<p>So all in all, I don't expect this <code>emacs-kicker</code> to please everyone, but I
expect it to be simple and rich enough (thanks to <a href="https://github.com/dimitri/el-get">el-get</a>), and it should be
a good <em>kick start</em> that's easy to adapt.</p>

<p>If you want to try it without installing it it's very easy to do so.  Just
clone the <code>git</code> repository then start an <code>Emacs</code> that will use this.  For
example that could be, using the excellent <a href="http://emacsformacosx.com/">Emacs For MacOSX</a>:</p>

<pre class="src">
 $ /Applications/Emacs.app/Contents/MacOS/Emacs -Q -l init.el
</pre>

<p>I hope some readers will find it useful! :)</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Fri, 15 Apr 2011 21:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/04/blog/2011/04/15-emacs-kicker.html</guid>
</item>
<item>
  <title>Emacs Kicker</title>
  <link>http://tapoueh.org/blog/2011/04/15-emacs-kicker.html</link>
  <description><![CDATA[<p class="first">Following up on the very popular <a href="https://github.com/technomancy/emacs-starter-kit">emacs-starter-kit</a>, I'm now proposing the
<a href="https://github.com/dimitri/emacs-kicker">emacs-kicker</a>.  It's about the <code>.emacs</code> file you've seen in older posts here,
which I maintain for some colleagues.  After all, if they find it useful,
some more people might to, so I've decided to publish it.</p>

<p>What you'll find is a very simple <code>128</code> lines <a href="http://www.gnu.org/software/emacs/">Emacs</a> user init file, based on
<a href="https://github.com/dimitri/el-get">el-get</a> for external packages.  A not so <em>random</em> selection of those is used,
here's the list when you hide some details:</p>

<pre class="src">
 '(el-get                       <span style="color: #b22222;">; </span><span style="color: #b22222;">el-get is self-hosting
</span>   escreen                      <span style="color: #b22222;">; </span><span style="color: #b22222;">screen for emacs, C-\ C-h
</span>   php-mode-improved            <span style="color: #b22222;">; </span><span style="color: #b22222;">if you're into php...
</span>   psvn                         <span style="color: #b22222;">; </span><span style="color: #b22222;">M-x svn-status
</span>   switch-window                <span style="color: #b22222;">; </span><span style="color: #b22222;">takes over C-x o
</span>   auto-complete                <span style="color: #b22222;">; </span><span style="color: #b22222;">complete as you type with overlays
</span>   emacs-goodies-el             <span style="color: #b22222;">; </span><span style="color: #b22222;">the debian addons for emacs
</span>   yasnippet                    <span style="color: #b22222;">; </span><span style="color: #b22222;">powerful snippet mode
</span>   zencoding-mode               <span style="color: #b22222;">; </span><span style="color: #b22222;">http://www.emacswiki.org/emacs/ZenCoding
</span>   (<span style="color: #da70d6;">:name</span> buffer-move           <span style="color: #b22222;">; </span><span style="color: #b22222;">move buffers around in windows
</span>   (<span style="color: #da70d6;">:name</span> smex                  <span style="color: #b22222;">; </span><span style="color: #b22222;">a better (ido like) M-x
</span>   (<span style="color: #da70d6;">:name</span> magit                 <span style="color: #b22222;">; </span><span style="color: #b22222;">git meet emacs, and a binding
</span>   (<span style="color: #da70d6;">:name</span> goto-last-change      <span style="color: #b22222;">; </span><span style="color: #b22222;">move pointer back to last change
</span></pre>

<p>Another interresting thing to note in this <code>kicker</code> is a choice of some key
bindings that are rather unusual (yet) I guess.</p>

<pre class="src">
(global-set-key (kbd <span style="color: #bc8f8f;">"C-x C-b"</span>) 'ido-switch-buffer)
(global-set-key (kbd <span style="color: #bc8f8f;">"C-x C-c"</span>) 'ido-switch-buffer)
(global-set-key (kbd <span style="color: #bc8f8f;">"C-x B"</span>) 'ibuffer)
</pre>

<p>Yes, you see that I've rebound <code>C-x C-c</code> to switching buffers.  That key is
really easy to use and I don't think that <code>M-x kill-emacs</code> deserves it.  Keys
that are so easy to use should be kept for frequent actions, and quiting
emacs is a once-a-day to once-a-month action here.  And you can still quit
from the window manager button or from the menu or from <code>M-x</code>.</p>

<p>Also <em>Mac</em> users are not left behind, you will see some settings that either
are adapted to the system (like choosing another <em>font</em>, keep displaying the
<code>menu-bar</code> or not installing the darkish <code>tango-color-mode</code> on this system,
where it renders poorly in my opinion), as you can see here:</p>

<pre class="src">
(<span style="color: #7f007f;">if</span> (string-match <span style="color: #bc8f8f;">"apple-darwin"</span> system-configuration)
    (set-face-font 'default <span style="color: #bc8f8f;">"Monaco-13"</span>)
  (set-frame-font <span style="color: #bc8f8f;">"Monospace-10"</span>))

(<span style="color: #7f007f;">when</span> (string-match <span style="color: #bc8f8f;">"apple-darwin"</span> system-configuration)
  (setq mac-allow-anti-aliasing t)
  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none))
</pre>

<p>So all in all, I don't expect this <code>emacs-kicker</code> to please everyone, but I
expect it to be simple and rich enough (thanks to <a href="https://github.com/dimitri/el-get">el-get</a>), and it should be
a good <em>kick start</em> that's easy to adapt.</p>

<p>If you want to try it without installing it it's very easy to do so.  Just
clone the <code>git</code> repository then start an <code>Emacs</code> that will use this.  For
example that could be, using the excellent <a href="http://emacsformacosx.com/">Emacs For MacOSX</a>:</p>

<pre class="src">
 $ /Applications/Emacs.app/Contents/MacOS/Emacs -Q -l init.el
</pre>

<p>I hope some readers will find it useful! :)</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Fri, 15 Apr 2011 21:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/04/15-emacs-kicker.html</guid>
</item>
<item>
  <title>Some notes about Skytools3</title>
  <link>http://tapoueh.org/blog/2011/04/11-some-notes-about-skytools3.html</link>
  <description><![CDATA[<p class="first">I've been working on <a href="http://github.com/markokr/skytools">skytools3</a> packaging lately.  I've been pushing quite a
lot of work into it, in order to have exactly what I needed out of the box,
after some 3 years of production and experiences with the products.  Plural,
yes, because even if <a href="http://wiki.postgresql.org/wiki/PgBouncer">pgbouncer</a> and <a href="http://wiki.postgresql.org/wiki/PL/Proxy">plproxy</a> are siblings to the projets (same
developers team, separate life cycle and releases), then <code>skytools</code> still
includes several sub-projects.</p>

<p>Here's what the <code>skytools3</code> packaging is going to look like:</p>

<pre class="src">
skytools3              Skytool's replication and queuing
python-pgq3            Skytool's PGQ python library
python-skytools3       python scripts framework for skytools
skytools-ticker3       PGQ ticker daemon service
skytools-walmgr3       high-availability archive and restore commands
postgresql-8.4-pgq3    PGQ server-side code (C module for PostgreSQL)
postgresql-9.0-pgq3    PGQ server-side code (C module for PostgreSQL)
</pre>

<p>This split is needed so that you can install your <em>daemons</em> (we call them
<em>consumers</em>) on separate machines than where you run <a href="http://postgresql.org">PostgreSQL</a>.  But for the
<code>walmgr</code> part, it makes no sense to install it if you don't have a local
PostgreSQL service, as it's providing <code>archive</code> and <code>restore</code> commands.  Then
the <em>ticker</em>, you're free to run it on any machine really, so just package it
this way (in <code>skytools3</code> the <em>ticker</em> is written in <code>C</code> and does not depend on the
python framework any more).</p>

<p>What you can't see here yet is the new goodies that wraps it as a quality
<code>debian</code> package.  A new <code>skytools</code> user is created for you when you install the
<code>skytools3</code> package (which contains the services), along with a skeleton file
<code>/etc/skytools.ini</code> and a user directory <code>/etc/skytools/</code>.  Put in there your
services configuration file, and register those service in the
<code>/etc/skytools.ini</code> file itself.  Then they will get cared about in the <code>init</code>
sequence at startup and shutdown of your server.</p>

<p>The services will run under the <code>skytools</code> system user, and will default to
put their log into <code>/var/log/skytools/</code>.  The <code>pidfile</code> will get into
<code>/var/run/skytools/</code>.  All integrated, automated.</p>

<p>Next big <em>TODO</em> is about documentation, reviewing it and polishing it, and I
think that <code>skytools3</code> will then get ready for public release.  Yes, you read
it right, it's happening this very year!  I'm very excited about it, and
have several architectures that will greatly benefit from the switch to
<code>skytools3</code>.  More on that later, though!  (Yes, my <em>to blog later</em> list is
getting quite long now).</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 11 Apr 2011 11:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/04/11-some-notes-about-skytools3.html</guid>
</item>


<item>
  <title>Extensions in 9.1</title>
  <link>http://tapoueh.org/blog/2011/03/01-extensions-in-91.html</link>
  <description><![CDATA[<p class="first">If you've not been following closely you might have missed out on extensions
integration.  Well, <a href="http://en.wikipedia.org/wiki/Tom_Lane_(computer_scientist)">Tom</a> spent some time on the patches I've been preparing
for the last 4 months.  And not only did he commit most of the work but he
also enhanced some parts of the code (better factoring) and basically
finished it.</p>

<p>At the <a href="http://wiki.postgresql.org/wiki/PgCon_2010_Developer_Meeting">previous developer meeting</a> his advice was to avoid putting too much
into the very first version of the patch for it to stand its chances of
being integrated, and while in the review process more than one major
<a href="http://www.postgresql.org/">PostgreSQL</a> contributor expressed worries about the size of the patch and the
number of features proposed.  Which is the usual process.</p>

<p>Then what happened is that <strong><em>Tom</em></strong> finally took a similar reasoning as mine
while working on the feature.  To maximize the benefits, once you have the
infrastructure in place, it's not that much more work to provide the really
interesting features.  What's complex is agreeing on what exactly are their
specifications.  And in the <em>little</em> time window we got on this commit fest
(well, we hijacked about 2 full weeks there), we managed to get there.</p>

<p>So in the end the result is quite amazing, and you can see that on the
documentation chapter about it:
<a href="http://developer.postgresql.org/pgdocs/postgres/extend-extensions.html">35.15. Packaging Related Objects into an Extension</a>.</p>

<p>All the <em>contrib</em> modules that are installing <code>SQL</code> objects into databases for
you to use them are now converted to <strong><em>Extensions</em></strong> too, and will get released
in <code>9.1</code> with an upgrade script that allows you to <em>upgrade from unpackaged</em>.
That means that once you've upgraded from a past PostgreSQL release up to
<code>9.1</code>, it will be a command away for you to register <em>extensions</em> as such.  I
expect third party <em>extension</em> authors (from <a href="http://pgfoundry.org/projects/ip4r/">ip4r</a> to <a href="http://pgfoundry.org/projects/temporal">temporal</a>) to release a
<em>upgrade-from-unpackaged</em> version of their work too.</p>

<p>Of course, a big use case of the <em>extensions</em> is also in-house <code>PL</code> code, and
having version number and multi-stage upgrade scripts there will be
fantastic too, I can't wait to work with such a tool set myself.  Some later
blog post will detail the benefits and usage.  I'm already trying to think
how much of this version and upgrade facility could be expanded to classic
<code>DDL</code> objects…</p>

<p>So expect some more blog posts from me on this subject, I will have to talk
about <em>debian packaging</em> an extension (it's getting damn easy with
<a href="http://packages.debian.org/squeeze/postgresql-server-dev-all">postgresql-server-dev-all</a> — yes it has received some planing ahead), and
about how to package your own extension, manage upgrades, turn your current
<code>pre-9.1</code> extension into a <em>full blown extension</em>, and maybe how to stop
worrying about extension when you're a DBA.</p>

<p>If you have some features you would want to discuss for next releases,
please do contact me!</p>

<p>Meanwhile, I'm very happy that this project of mine finally made it to <em>core</em>,
it's been long in the making.  Some years to talk about it and then finally
4 months of coding that I'll remember as a marathon.  Many Thanks go to all
who helped here, from <a href="http://www.2ndquadrant.com/">2ndQuadrant</a> to early reviewers to people I talked to
over beers at conferences… lots of people really.</p>

<p>To an extended PostgreSQL (and beyond) :)</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Tue, 01 Mar 2011 16:30:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2011/03/01-extensions-in-91.html</guid>
</item>
<item>
  <title>el-get 1.1, with 174 recipes</title>
  <link>http://tapoueh.org/blog/2010/12/blog/2010/12/20-el-get-11-with-174-recipes.html</link>
  <description><![CDATA[<p>Yes, you read it well, <a href="https://github.com/dimitri/el-get">el-get</a> currently <em>features</em> <code>174</code> <a href="https://github.com/dimitri/el-get/tree/master/recipes">recipes</a>, and is now
reaching the <code>1.1</code> release. The reason for this release is mainly that I have
two big chunks of code to review and the current code has been very stable
for awhile. It seems better to do a release with the stable code that exists
now before to shake it this much. If you're wondering when to jump in the
water and switch to using <em>el-get</em>, now is a pretty good time.</p>

<h3>New source types</h3>

<p class="first">We now have support for the <a href="http://www.archlinux.org/pacman/">pacman</a> package management for <a href="http://www.archlinux.org/">archlinux</a>, and a
way to handle a different package name in the recipe and in the
distribution. We also have support for <a href="http://mercurial.selenic.com/">mercurial</a> and <a href="http://subversion.tigris.org/">subversion</a> and <a href="http://darcs.net/">darcs</a>.</p>

<p>Also, <a href="http://wiki.debian.org/Apt">apt-get</a> will sometime prompt you to validate its choices, that's the
infamous <em>Do you want to continue?</em> prompt. We now handle that smoothly.</p>


<h3>(el-get 'sync)</h3>

<p class="first">In <code>1.1</code>, that really means <em>synchronous</em>. That means we install one package
after the other, and any error will stop it all. Before that, it was an
active wait loop over a parallel install: this option is still available
through calling <code>(el-get 'wait)</code>.</p>


<h3>No more <em>failed to install</em></h3>

<p class="first">Exactly. This error you may have encountered sometime is due to trying to
install a package over a previous failed install attempt (network outage,
disk full, bad work-in-progress recipe, etc). After awhile in the field it
was clear that no case where found where you would regret it if <a href="https://github.com/dimitri/el-get">el-get</a> just
did removed the previous failed installation for you before to go and
install again, as aked. So that's now automatic.</p>


<h3>Featuring an overhauled :build facility</h3>

<p class="first">The <code>build</code> commands can now either be a list, as before, or some that we
<em>evaluate</em> for you. That allows for easier to maintain <em>recipes</em>, and here's an
exemple of that:</p>

<pre class="src">
(<span style="color: #da70d6;">:name</span> distel
       <span style="color: #da70d6;">:type</span> svn
       <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://distel.googlecode.com/svn/trunk/"</span>
       <span style="color: #da70d6;">:info</span> <span style="color: #bc8f8f;">"doc"</span>
       <span style="color: #da70d6;">:build</span> `,(mapcar
                 (<span style="color: #7f007f;">lambda</span> (target)
                   (concat <span style="color: #bc8f8f;">"make "</span> target <span style="color: #bc8f8f;">" EMACS="</span> el-get-emacs))
                 '(<span style="color: #bc8f8f;">"clean"</span> <span style="color: #bc8f8f;">"all"</span>))
       <span style="color: #da70d6;">:load-path</span> (<span style="color: #bc8f8f;">"elisp"</span>)
       <span style="color: #da70d6;">:features</span> distel)
</pre>

<p>As you see that also allows for maintainance of multi-platform build
recipes, and multiple emacs versions too. It's still a little too much on
the <em>awkward</em> side of things, though, and that's one of the ongoing work that
will happen for next version.</p>


<h3>Misc improvements</h3>

<p class="first">We are now able to <code>byte-compile</code> your packages, and offer some more hooks
(<code>el-get-init-hooks</code> has been asked with a nice usage example). There's a new
<code>:localname</code> property that allows to pick where to save the local file when
using <code>HTTP</code> method for retrieval, and that in turn allows to fix some
<em>recipes</em>.</p>

<pre class="src">
(<span style="color: #da70d6;">:name</span> xcscope
       <span style="color: #da70d6;">:type</span> http
       <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://cscope.cvs.sourceforge.net/viewvc/cscope/cscope/contrib/xcsc</span><span style="color: #ffff00; background-color: #ff0000; font-weight: bold;">ope/xcscope.el?revision=1.14&amp;content-type=text%2Fplain"</span>
       <span style="color: #da70d6;">:localname</span> <span style="color: #bc8f8f;">"xscope.el"</span>
       <span style="color: #da70d6;">:features</span> xcscope)
</pre>

<p>Oh and you even get <code>:before</code> user function support, even if needing it often
shows that you're doing it in a strange way. More often than not it's
possible to do all you need to in the <code>:after</code> function, but this tool is
there so that you spend less time on having a working environment, not more,
right? :)</p>


<h3>Switch notice</h3>

<p class="first">All in all, if you're already using <a href="https://github.com/dimitri/el-get">el-get</a> you should consider switching to
<code>1.1</code> (by issuing <code>M-x el-get-update</code> of course), and if you're hesitating, just
join the fun now!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 20 Dec 2010 16:45:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/12/blog/2010/12/20-el-get-11-with-174-recipes.html</guid>
</item>
<item>
  <title>el-get 1.1, with 174 recipes</title>
  <link>http://tapoueh.org/blog/2010/12/20-el-get-11-with-174-recipes.html</link>
  <description><![CDATA[<p class="first">Yes, you read it well, <a href="https://github.com/dimitri/el-get">el-get</a> currently <em>features</em> <code>174</code> <a href="https://github.com/dimitri/el-get/tree/master/recipes">recipes</a>, and is now
reaching the <code>1.1</code> release. The reason for this release is mainly that I have
two big chunks of code to review and the current code has been very stable
for awhile. It seems better to do a release with the stable code that exists
now before to shake it this much. If you're wondering when to jump in the
water and switch to using <em>el-get</em>, now is a pretty good time.</p>

<h3>New source types</h3>

<p class="first">We now have support for the <a href="http://www.archlinux.org/pacman/">pacman</a> package management for <a href="http://www.archlinux.org/">archlinux</a>, and a
way to handle a different package name in the recipe and in the
distribution. We also have support for <a href="http://mercurial.selenic.com/">mercurial</a> and <a href="http://subversion.tigris.org/">subversion</a> and <a href="http://darcs.net/">darcs</a>.</p>

<p>Also, <a href="http://wiki.debian.org/Apt">apt-get</a> will sometime prompt you to validate its choices, that's the
infamous <em>Do you want to continue?</em> prompt. We now handle that smoothly.</p>


<h3>(el-get 'sync)</h3>

<p class="first">In <code>1.1</code>, that really means <em>synchronous</em>. That means we install one package
after the other, and any error will stop it all. Before that, it was an
active wait loop over a parallel install: this option is still available
through calling <code>(el-get 'wait)</code>.</p>


<h3>No more <em>failed to install</em></h3>

<p class="first">Exactly. This error you may have encountered sometime is due to trying to
install a package over a previous failed install attempt (network outage,
disk full, bad work-in-progress recipe, etc). After awhile in the field it
was clear that no case where found where you would regret it if <a href="https://github.com/dimitri/el-get">el-get</a> just
did removed the previous failed installation for you before to go and
install again, as aked. So that's now automatic.</p>


<h3>Featuring an overhauled :build facility</h3>

<p class="first">The <code>build</code> commands can now either be a list, as before, or some that we
<em>evaluate</em> for you. That allows for easier to maintain <em>recipes</em>, and here's an
exemple of that:</p>

<pre class="src">
(<span style="color: #da70d6;">:name</span> distel
       <span style="color: #da70d6;">:type</span> svn
       <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://distel.googlecode.com/svn/trunk/"</span>
       <span style="color: #da70d6;">:info</span> <span style="color: #bc8f8f;">"doc"</span>
       <span style="color: #da70d6;">:build</span> `,(mapcar
                 (<span style="color: #7f007f;">lambda</span> (target)
                   (concat <span style="color: #bc8f8f;">"make "</span> target <span style="color: #bc8f8f;">" EMACS="</span> el-get-emacs))
                 '(<span style="color: #bc8f8f;">"clean"</span> <span style="color: #bc8f8f;">"all"</span>))
       <span style="color: #da70d6;">:load-path</span> (<span style="color: #bc8f8f;">"elisp"</span>)
       <span style="color: #da70d6;">:features</span> distel)
</pre>

<p>As you see that also allows for maintainance of multi-platform build
recipes, and multiple emacs versions too. It's still a little too much on
the <em>awkward</em> side of things, though, and that's one of the ongoing work that
will happen for next version.</p>


<h3>Misc improvements</h3>

<p class="first">We are now able to <code>byte-compile</code> your packages, and offer some more hooks
(<code>el-get-init-hooks</code> has been asked with a nice usage example). There's a new
<code>:localname</code> property that allows to pick where to save the local file when
using <code>HTTP</code> method for retrieval, and that in turn allows to fix some
<em>recipes</em>.</p>

<pre class="src">
(<span style="color: #da70d6;">:name</span> xcscope
       <span style="color: #da70d6;">:type</span> http
       <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://cscope.cvs.sourceforge.net/viewvc/cscope/cscope/contrib/xcsc</span><span style="color: #ffff00; background-color: #ff0000; font-weight: bold;">ope/xcscope.el?revision=1.14&amp;content-type=text%2Fplain"</span>
       <span style="color: #da70d6;">:localname</span> <span style="color: #bc8f8f;">"xscope.el"</span>
       <span style="color: #da70d6;">:features</span> xcscope)
</pre>

<p>Oh and you even get <code>:before</code> user function support, even if needing it often
shows that you're doing it in a strange way. More often than not it's
possible to do all you need to in the <code>:after</code> function, but this tool is
there so that you spend less time on having a working environment, not more,
right? :)</p>


<h3>Switch notice</h3>

<p class="first">All in all, if you're already using <a href="https://github.com/dimitri/el-get">el-get</a> you should consider switching to
<code>1.1</code> (by issuing <code>M-x el-get-update</code> of course), and if you're hesitating, just
join the fun now!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 20 Dec 2010 16:45:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/12/20-el-get-11-with-174-recipes.html</guid>
</item>




<item>
  <title>debian packaging PostgreSQL extensions</title>
  <link>http://tapoueh.org/blog/2010/08/06-debian-packaging-postgresql-extensions.html</link>
  <description><![CDATA[<p class="first">In trying to help an extension <em>debian packaging</em> effort, I've once again
proposed to handle it. That's because I now begin to know how to do it, as
you can see in my <a href="http://qa.debian.org/developer.php?login=dim%40tapoueh.org">package overview</a> page at <em>debian QA</em> facility. There's a
reason why I proposed myself here, it's that yet another tool of mine is now
to be found in <em>debian</em>, and should greatly help <em>extension packaging</em>
there. You can already check for the <a href="http://packages.debian.org/sid/postgresql-server-dev-all">postgresql-server-dev-all</a> package page
if you're that impatient!</p>

<p>Back? Ok, so I used to have two main gripes against debian support for
<a href="http://www.postgresql.org/">PostgreSQL</a>. The first one, which is now feeling alone, is that both project
<a href="http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy">release support policy</a> aren't compatible enough for debian stable to include
all currently supported stable PostgreSQL major version. That's very bad
that debian stable will only propose one major version, knowing that the
support for several of them is in there.</p>

<p>The problem is two fold: first, debian stable has to maintain any
distributed package. There's no <em>deprecation policy</em> allowing for droping the
ball. So the other side of this coin is that debian developers must take on
themselves maintaining included software for as long as stable is not
renamed <code>oldstable</code>. And it so happens that there's no debian developer that
feels like maintaining <em>end of lined</em> PostgreSQL releases without help from
<a href="http://www.postgresql.org/community/contributors/">PostgreSQL Core Team</a>. Or, say, without official statement that they would
help.</p>

<p>Now, why I don't like this situation is because I'm pretty sure there's very
few software development group offering as long and reliable maintenance
policy as PostgreSQL is doing, but debian will still happily distribute
<em>unknown-maintenance-policy</em> pieces of code in its stable repositories. So the
<em>uncertainty</em> excuse is rather poor. And highly frustrating.</p>

<blockquote>
<p class="quoted">
<strong><em>Note:</em></strong> you have to admit that the debian stable management model copes very
well with all the debian included software. You can't release stable with
a new PostgreSQL major version unless each and every package depending on
PostgreSQL will actually work with the newer version, and the debian
scripts will care for upgrading the cluster. Where it's not working good
is when you're using debian for a PostgreSQL server for a proprietary
application, which happens quite frequently too.</p>

</blockquote>

<p>The consequence of this fact leads to my second main gripe against debian
support for PostgreSQL: the extensions. It so happens that the PostgreSQL
extensions are developped for supporting several major versions from the
same source code. So typically, all you need to do is recompile the
extension against the new major version, and there you go.</p>

<p>Now, say debian new stable is coming with <a href="http://packages.debian.org/squeeze/postgresql-8.4">8.4</a> rather than <a href="http://packages.debian.org/lenny/postgresql-8.3">8.3</a> as it used
to. You should be able to just build the extensions (like <a href="http://packages.debian.org/squeeze/postgresql-8.4-prefix">prefix</a>), without
changing the source package, nor droping <code>postgresql-8.3-prefix</code> from the
distribution on the grounds that <code>8.3</code> ain't in debian stable anymore.</p>

<p>I've been ranting a lot about this state of facts, and I finally provided a
patch to the <a href="http://packages.debian.org/sid/postgresql-common">postgresql-common</a> debian packaging, which made it into version
<code>110</code>: welcome <a href="http://packages.debian.org/sid/postgresql-server-dev-all">pg_buildext</a>. An exemple of how to use it can be found in the
git branch for <a href="http://github.com/dimitri/prefix">prefix</a>, it shows up in <a href="http://github.com/dimitri/prefix/blob/master/debian/pgversions">debian/pgversions</a> and <a href="http://github.com/dimitri/prefix/blob/master/debian/rules">debian/rules</a>
files.</p>

<p>As you can see, the <code>pg_buildext</code> tool allows you to list the PostgreSQL major
versions the extension you're packaging supports, and only those that are
both in your list and in the current debian supported major version list
will get built. <code>pg_buildext</code> will do a <code>VPATH</code> build of your extension, so it's
capable of building the same extension for multiple major versions of
PostgreSQL. Here's how it looks:</p>

<pre class="src">
        # build all supported version
        pg_buildext build $(SRCDIR) $(TARGET) <span style="color: #bc8f8f;">"$(CFLAGS)"</span>

        # then install each of them
        for v in `pg_buildext supported-versions $(SRCDIR)`; do \
                dh_install -ppostgresql-$$v-prefix ;\
        done
</pre>

<p>And the files are to be found in those places:</p>

<pre class="src">
dim ~/dev/prefix cat debian/postgresql-8.3-prefix.install
debian/prefix-8.3/prefix.so usr/lib/postgresql/8.3/lib
debian/prefix-8.3/prefix.sql usr/share/postgresql/8.3/contrib

dim ~/dev/prefix cat debian/postgresql-8.4-prefix.install
debian/prefix-8.4/prefix.so usr/lib/postgresql/8.4/lib
debian/prefix-8.4/prefix.sql usr/share/postgresql/8.4/contrib
</pre>

<p>So you still need to maintain <a href="http://github.com/dimitri/prefix/blob/master/debian/pgversions">debian/pgversions</a> and the
<code>postgresql-X.Y-extension.*</code> files, but then a change in debian support for
PostgreSQL major versions will be handled automatically (there's a facility
to trigger automatic rebuild when necessary).</p>

<p>All this ranting to explain that pretty soon, the extenion's packages that I
maintain will no longer have to be patched when dropping a previously
supported major version of PostgreSQL. I'm breathing a little better, so
thanks a lot <a href="http://www.piware.de/category/debian/">Martin</a>!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Fri, 06 Aug 2010 13:00:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/08/06-debian-packaging-postgresql-extensions.html</guid>
</item>
<item>
  <title>el-get</title>
  <link>http://tapoueh.org/blog/2010/08/blog/2010/08/04-el-get.html</link>
  <description><![CDATA[<p>I've been using emacs for a long time, and a long time it took me to
consider learning <a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/index.html">Emacs Lisp</a>. Before that, I didn't trust my level of
understanding enough to be comfortable in managing my setup efficiently.</p>

<p>One of the main problems of setting up <a href="http://www.gnu.org/software/emacs/">Emacs</a> is that not only you tend to
accumulate so many tricks from <a href="http://www.emacswiki.org/">EmacsWiki</a> and <a href="http://planet.emacsen.org/">blog posts</a> that your <code>.emacs</code> has
to grow to a full <code>~/.emacs.d/</code> directory (starting at <code>~/.emacs.d/init.el</code>),
but also you finally depend on several <em>librairies</em> of code you're not
authoring nor maintaining. Let's call them <em>packages</em>.</p>

<p>Some of them will typically be available on <a href="http://tromey.com/elpa/index.html">ELPA</a>, which allows you to
breathe and keep cool. But most of them, let's face it, are not there. Most
of the packages I use I tend to get them either from <a href="http://www.debian.org/">debian</a> (see
<a href="http://packages.debian.org/sid/apt-rdepends">apt-rdepends</a> for having the complete list of packages that depends on emacs,
unfortunately I'm not finding an online version of the tool to link too), or
from <code>ELPA</code>, or from their own <code>git</code> repository somewhere. Some of them even I
get directly from an <a href="http://www.splode.com/~friedman/software/emacs-lisp">obscure website</a> not maintained anymore, but always
there when you need them.</p>

<p>Of course, my emacs setup is managed in a private <code>git</code> repository. Some
people on <code>#emacs</code> are using <a href="http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html">git submodules</a> (or was it straight <em>import</em>) for
managing external repositories in there, but all I can say is that I frown
on this idea. I want an easy canonical list of packages I depend on to run
emacs, and I want this documentation to be usable as-is. Enters <a href="http://www.emacswiki.org/emacs/el-get.el">el-get</a>!</p>

<p>As we're all damn lazy, here's a <em>visual</em> introduction to <code>el-get</code>:</p>

<pre class="src">
(setq el-get-sources
      '((<span style="color: #da70d6;">:name</span> bbdb
               <span style="color: #da70d6;">:type</span> git
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"git://github.com/barak/BBDB.git"</span>
               <span style="color: #da70d6;">:load-path</span> (<span style="color: #bc8f8f;">"./lisp"</span> <span style="color: #bc8f8f;">"./bits"</span>)
               <span style="color: #da70d6;">:info</span> <span style="color: #bc8f8f;">"texinfo"</span>
               <span style="color: #da70d6;">:build</span> (<span style="color: #bc8f8f;">"./configure"</span> <span style="color: #bc8f8f;">"make"</span>))

        (<span style="color: #da70d6;">:name</span> magit
               <span style="color: #da70d6;">:type</span> git
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://github.com/philjackson/magit.git"</span>
               <span style="color: #da70d6;">:info</span> <span style="color: #bc8f8f;">"."</span>
               <span style="color: #da70d6;">:build</span> (<span style="color: #bc8f8f;">"./autogen.sh"</span> <span style="color: #bc8f8f;">"./configure"</span> <span style="color: #bc8f8f;">"make"</span>))

        (<span style="color: #da70d6;">:name</span> vkill
               <span style="color: #da70d6;">:type</span> http
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://www.splode.com/~friedman/software/emacs-lisp/src/vki</span><span style="color: #ffff00; background-color: #ff0000; font-weight: bold;">ll.el"</span>
               <span style="color: #da70d6;">:features</span> vkill)

        (<span style="color: #da70d6;">:name</span> yasnippet
               <span style="color: #da70d6;">:type</span> git-svn
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://yasnippet.googlecode.com/svn/trunk/"</span>)

        (<span style="color: #da70d6;">:name</span> asciidoc         <span style="color: #da70d6;">:type</span> elpa)
        (<span style="color: #da70d6;">:name</span> dictionary-el    <span style="color: #da70d6;">:type</span> apt-get)
        (<span style="color: #da70d6;">:name</span> emacs-goodies-el <span style="color: #da70d6;">:type</span> apt-get)))

(el-get)
</pre>

<p>So now you have a pretty good documentation of the packages you want
installed, where to get them, and how to install them. For the <em>advanced</em>
methods (such as <code>elpa</code> or <code>apt-get</code>), you basically just need the package
name. When relying on a bare <code>git</code> repository, you need to give some more
information, such as the <code>URL</code> to <em>clone</em> and the <code>build</code> steps if any. Then also
what <em>features</em> to <code>require</code> and maybe where to find the <em>texinfo</em> documentation
of the package, for automatic inclusion into your local <em>Info</em> menu.</p>

<p>The good news is that not only you now have a solid readable description of
all that in a central place, but this very description is all <code>(el-get)</code> needs
to do its magic. This command will check that each and every package is
installed on your system (in <code>el-get-dir</code>) and if that's not the case, it will
actually install it. Then, it will <code>init</code> the packages: that means caring
about the <code>load-path</code>, the <code>Info-directory-list</code> (and <em>dir</em> texinfo menu
building), the <em>loading</em> of the <code>emacs-lisp</code> files, and finally it will <code>require</code>
the <em>features</em>.</p>

<p>Here's a prettyfied <code>ielm</code> session that will serve as a demo:</p>

<pre class="src">
ELISP&gt; (el-get)
(<span style="color: #bc8f8f;">"aspell-en"</span> <span style="color: #bc8f8f;">"aspell-fr"</span> <span style="color: #bc8f8f;">"muse"</span> <span style="color: #bc8f8f;">"dictionary"</span> <span style="color: #bc8f8f;">"htmlize"</span> <span style="color: #bc8f8f;">"bbdb"</span> <span style="color: #bc8f8f;">"google-maps"</span>
<span style="color: #bc8f8f;">"magit"</span> <span style="color: #bc8f8f;">"emms"</span> <span style="color: #bc8f8f;">"nxhtml"</span> <span style="color: #bc8f8f;">"vkill"</span> <span style="color: #bc8f8f;">"xcscope"</span> <span style="color: #bc8f8f;">"yasnippet"</span> <span style="color: #bc8f8f;">"asciidoc"</span>
<span style="color: #bc8f8f;">"auto-dictionary"</span> <span style="color: #bc8f8f;">"css-mode"</span> <span style="color: #bc8f8f;">"gist"</span> <span style="color: #bc8f8f;">"lua-mode"</span> <span style="color: #bc8f8f;">"lisppaste"</span>)
</pre>

<p>All the packages being already installed, it's running fast enough that I
won't bother measuring the run time, that seems to be somewhere around one
second.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Wed, 04 Aug 2010 22:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/08/blog/2010/08/04-el-get.html</guid>
</item>
<item>
  <title>el-get</title>
  <link>http://tapoueh.org/blog/2010/08/04-el-get.html</link>
  <description><![CDATA[<p class="first">I've been using emacs for a long time, and a long time it took me to
consider learning <a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/index.html">Emacs Lisp</a>. Before that, I didn't trust my level of
understanding enough to be comfortable in managing my setup efficiently.</p>

<p>One of the main problems of setting up <a href="http://www.gnu.org/software/emacs/">Emacs</a> is that not only you tend to
accumulate so many tricks from <a href="http://www.emacswiki.org/">EmacsWiki</a> and <a href="http://planet.emacsen.org/">blog posts</a> that your <code>.emacs</code> has
to grow to a full <code>~/.emacs.d/</code> directory (starting at <code>~/.emacs.d/init.el</code>),
but also you finally depend on several <em>librairies</em> of code you're not
authoring nor maintaining. Let's call them <em>packages</em>.</p>

<p>Some of them will typically be available on <a href="http://tromey.com/elpa/index.html">ELPA</a>, which allows you to
breathe and keep cool. But most of them, let's face it, are not there. Most
of the packages I use I tend to get them either from <a href="http://www.debian.org/">debian</a> (see
<a href="http://packages.debian.org/sid/apt-rdepends">apt-rdepends</a> for having the complete list of packages that depends on emacs,
unfortunately I'm not finding an online version of the tool to link too), or
from <code>ELPA</code>, or from their own <code>git</code> repository somewhere. Some of them even I
get directly from an <a href="http://www.splode.com/~friedman/software/emacs-lisp">obscure website</a> not maintained anymore, but always
there when you need them.</p>

<p>Of course, my emacs setup is managed in a private <code>git</code> repository. Some
people on <code>#emacs</code> are using <a href="http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html">git submodules</a> (or was it straight <em>import</em>) for
managing external repositories in there, but all I can say is that I frown
on this idea. I want an easy canonical list of packages I depend on to run
emacs, and I want this documentation to be usable as-is. Enters <a href="http://www.emacswiki.org/emacs/el-get.el">el-get</a>!</p>

<p>As we're all damn lazy, here's a <em>visual</em> introduction to <code>el-get</code>:</p>

<pre class="src">
(setq el-get-sources
      '((<span style="color: #da70d6;">:name</span> bbdb
               <span style="color: #da70d6;">:type</span> git
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"git://github.com/barak/BBDB.git"</span>
               <span style="color: #da70d6;">:load-path</span> (<span style="color: #bc8f8f;">"./lisp"</span> <span style="color: #bc8f8f;">"./bits"</span>)
               <span style="color: #da70d6;">:info</span> <span style="color: #bc8f8f;">"texinfo"</span>
               <span style="color: #da70d6;">:build</span> (<span style="color: #bc8f8f;">"./configure"</span> <span style="color: #bc8f8f;">"make"</span>))

        (<span style="color: #da70d6;">:name</span> magit
               <span style="color: #da70d6;">:type</span> git
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://github.com/philjackson/magit.git"</span>
               <span style="color: #da70d6;">:info</span> <span style="color: #bc8f8f;">"."</span>
               <span style="color: #da70d6;">:build</span> (<span style="color: #bc8f8f;">"./autogen.sh"</span> <span style="color: #bc8f8f;">"./configure"</span> <span style="color: #bc8f8f;">"make"</span>))

        (<span style="color: #da70d6;">:name</span> vkill
               <span style="color: #da70d6;">:type</span> http
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://www.splode.com/~friedman/software/emacs-lisp/src/vki</span><span style="color: #ffff00; background-color: #ff0000; font-weight: bold;">ll.el"</span>
               <span style="color: #da70d6;">:features</span> vkill)

        (<span style="color: #da70d6;">:name</span> yasnippet
               <span style="color: #da70d6;">:type</span> git-svn
               <span style="color: #da70d6;">:url</span> <span style="color: #bc8f8f;">"http://yasnippet.googlecode.com/svn/trunk/"</span>)

        (<span style="color: #da70d6;">:name</span> asciidoc         <span style="color: #da70d6;">:type</span> elpa)
        (<span style="color: #da70d6;">:name</span> dictionary-el    <span style="color: #da70d6;">:type</span> apt-get)
        (<span style="color: #da70d6;">:name</span> emacs-goodies-el <span style="color: #da70d6;">:type</span> apt-get)))

(el-get)
</pre>

<p>So now you have a pretty good documentation of the packages you want
installed, where to get them, and how to install them. For the <em>advanced</em>
methods (such as <code>elpa</code> or <code>apt-get</code>), you basically just need the package
name. When relying on a bare <code>git</code> repository, you need to give some more
information, such as the <code>URL</code> to <em>clone</em> and the <code>build</code> steps if any. Then also
what <em>features</em> to <code>require</code> and maybe where to find the <em>texinfo</em> documentation
of the package, for automatic inclusion into your local <em>Info</em> menu.</p>

<p>The good news is that not only you now have a solid readable description of
all that in a central place, but this very description is all <code>(el-get)</code> needs
to do its magic. This command will check that each and every package is
installed on your system (in <code>el-get-dir</code>) and if that's not the case, it will
actually install it. Then, it will <code>init</code> the packages: that means caring
about the <code>load-path</code>, the <code>Info-directory-list</code> (and <em>dir</em> texinfo menu
building), the <em>loading</em> of the <code>emacs-lisp</code> files, and finally it will <code>require</code>
the <em>features</em>.</p>

<p>Here's a prettyfied <code>ielm</code> session that will serve as a demo:</p>

<pre class="src">
ELISP&gt; (el-get)
(<span style="color: #bc8f8f;">"aspell-en"</span> <span style="color: #bc8f8f;">"aspell-fr"</span> <span style="color: #bc8f8f;">"muse"</span> <span style="color: #bc8f8f;">"dictionary"</span> <span style="color: #bc8f8f;">"htmlize"</span> <span style="color: #bc8f8f;">"bbdb"</span> <span style="color: #bc8f8f;">"google-maps"</span>
<span style="color: #bc8f8f;">"magit"</span> <span style="color: #bc8f8f;">"emms"</span> <span style="color: #bc8f8f;">"nxhtml"</span> <span style="color: #bc8f8f;">"vkill"</span> <span style="color: #bc8f8f;">"xcscope"</span> <span style="color: #bc8f8f;">"yasnippet"</span> <span style="color: #bc8f8f;">"asciidoc"</span>
<span style="color: #bc8f8f;">"auto-dictionary"</span> <span style="color: #bc8f8f;">"css-mode"</span> <span style="color: #bc8f8f;">"gist"</span> <span style="color: #bc8f8f;">"lua-mode"</span> <span style="color: #bc8f8f;">"lisppaste"</span>)
</pre>

<p>All the packages being already installed, it's running fast enough that I
won't bother measuring the run time, that seems to be somewhere around one
second.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Wed, 04 Aug 2010 22:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/08/04-el-get.html</guid>
</item>
<item>
  <title>Emacs and PostgreSQL</title>
  <link>http://tapoueh.org/blog/2010/07/blog/2010/07/22-emacs-and-postgresql.html</link>
  <description><![CDATA[<p>Those are my two all times favorite Open Source Software. Or <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
in the <a href="http://www.gnu.org/">GNU</a> sense of the world, as both the <em>BSD</em> and the <em>GPL</em> are labeled free
there. Even if I prefer the <a href="http://www.debian.org/social_contract">The Debian Free Software Guidelines</a> as a global
definition and the <a href="http://sam.zoy.org/wtfpl/">WTFPL</a> license. But that's a digression.</p>

<p>I think that <a href="http://www.gnu.org/software/emacs/">Emacs</a> and <a href="http://www.postgresql.org/">PostgreSQL</a> do share a lot in common. I'd begin with
the documentation, which quality is amazing for both projects. Then of
course the extensibility with <a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/Preface.html#Preface">Emacs Lisp</a> on the one hand and
<a href="http://www.postgresql.org/docs/8.4/static/extend.html">catalog-driven operations</a> on the other hand. Whether you're extending Emacs
or PostgreSQL you'll find that it's pretty easy to tweak the system <em>while
it's running</em>. The other comparison points are less important, like the fact
the both the systems get about the same uptime on my laptop (currently <em>13
days, 23 hours, 57 minutes, 10 seconds</em>).</p>

<p>So of course I'm using <em>Emacs</em> to edit <em>PostgreSQL</em> <code>.sql</code> files, including stored
procedures. And it so happens that <a href="http://archives.postgresql.org/pgsql-hackers/2010-07/msg01067.php">line numbering in plpgsql</a> is not as
straightforward as one would naively think, to the point that we'd like to
have better tool support there. So I've extended Emacs <a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Minor-Modes.html">linum-mode minor mode</a>
to also display the line numbers as computed per PostgreSQL, and here's what
it looks like:</p>

<center>
<p><img src="../../../images//emacs-pgsql-line-numbers.png" alt=""></p>
</center>

<p>Now, here's also the source code, <a href="https://github.com/dimitri/pgsql-linum-format">pgsql-linum-format</a>. Hope you'll enjoy!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Thu, 22 Jul 2010 09:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/07/blog/2010/07/22-emacs-and-postgresql.html</guid>
</item>
<item>
  <title>Emacs and PostgreSQL</title>
  <link>http://tapoueh.org/blog/2010/07/22-emacs-and-postgresql.html</link>
  <description><![CDATA[<p class="first">Those are my two all times favorite Open Source Software. Or <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
in the <a href="http://www.gnu.org/">GNU</a> sense of the world, as both the <em>BSD</em> and the <em>GPL</em> are labeled free
there. Even if I prefer the <a href="http://www.debian.org/social_contract">The Debian Free Software Guidelines</a> as a global
definition and the <a href="http://sam.zoy.org/wtfpl/">WTFPL</a> license. But that's a digression.</p>

<p>I think that <a href="http://www.gnu.org/software/emacs/">Emacs</a> and <a href="http://www.postgresql.org/">PostgreSQL</a> do share a lot in common. I'd begin with
the documentation, which quality is amazing for both projects. Then of
course the extensibility with <a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/Preface.html#Preface">Emacs Lisp</a> on the one hand and
<a href="http://www.postgresql.org/docs/8.4/static/extend.html">catalog-driven operations</a> on the other hand. Whether you're extending Emacs
or PostgreSQL you'll find that it's pretty easy to tweak the system <em>while
it's running</em>. The other comparison points are less important, like the fact
the both the systems get about the same uptime on my laptop (currently <em>13
days, 23 hours, 57 minutes, 10 seconds</em>).</p>

<p>So of course I'm using <em>Emacs</em> to edit <em>PostgreSQL</em> <code>.sql</code> files, including stored
procedures. And it so happens that <a href="http://archives.postgresql.org/pgsql-hackers/2010-07/msg01067.php">line numbering in plpgsql</a> is not as
straightforward as one would naively think, to the point that we'd like to
have better tool support there. So I've extended Emacs <a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Minor-Modes.html">linum-mode minor mode</a>
to also display the line numbers as computed per PostgreSQL, and here's what
it looks like:</p>

<center>
<p><img src="../../../images//emacs-pgsql-line-numbers.png" alt=""></p>
</center>

<p>Now, here's also the source code, <a href="https://github.com/dimitri/pgsql-linum-format">pgsql-linum-format</a>. Hope you'll enjoy!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Thu, 22 Jul 2010 09:30:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2010/07/22-emacs-and-postgresql.html</guid>
</item>
<item>
  <title>Yet Another PostgreSQL tool hits debian</title>
  <link>http://tapoueh.org/blog/2009/11/25-yet-another-postgresql-tool-hits-debian.html</link>
  <description><![CDATA[<p class="first">So there it is, this newer contribution of mine that I presented at <a href="http://2009.pgday.eu">PGDay</a> is
now in <code>debian NEW</code> queue. <a href="pgstaging.html">pg_staging</a> will empower you with respect to what
you do about those nightly backups (<code>pg_dump -Fc</code> or something).</p>

<p>The tool provides a lot of commands to either <code>dump</code> or <code>restore</code> a database. It
comes with documentation covering about it all, except for the <em>londiste</em>
support part, which will be there in time for <code>1.0.0</code> release. The <a href="http://github.com/dimitri/pg_staging/blob/master/TODO">Todo list</a>
is getting smaller and smaller, the version you'll soon find in <code>debian sid</code>
is already called <code>0.9</code>.</p>

<p>So, how do you go about using this software, and what service it implements?</p>

<h3>it's all about deriving a staging environment from your backups</h3>

<p class="first">To validate backups, you want to restore them and check the database you get
from them. And your developers will want to sometime refresh the database
they're working with. And you could have both an integration environment and
a pre-live one: On the former, you develop new code atop a stable set of
data; while on the latter you test stable enough code (ready to go live) on
a set of data as near as live data as possible.</p>

<p>And you want to be flexible about it, so that there's not a fulltime job to
handle retoring databases each and every days, for project A integration or
project B pre-live testing, or project C accounting snapshot. Or you name
it.</p>

<p>And of course you want to have a single point of control of all your
databases. Let's call it the <em>controler</em>.</p>


<h3>setting up pg_staging</h3>

<p class="first">The <a href="pgstaging.html">pg_staging</a> setup consists of one <code>pg_staging.ini</code> file wherein you
describe your different target databases (those <code>dev</code> and <code>prelive</code> ones), and
of course where to get the production backups from. Currently you have to
serve the backups file in a format suitable for <code>pg_restore</code> (that means you
use either <code>pg_dump -Ft</code> or <code>pg_dump -Fc</code>) on an <code>apache</code> folder. The produced
<code>HTML</code> will get parsed.</p>

<p>So you setup the <code>DEFAULT</code> section with common settings, then one section per
target: the databases you want to restore. Tell <code>pg_staging</code> where they are
(<code>host</code>), etc, and it'll be able to drive them.</p>

<p>In order to being able to host more than a single restored dump on a staging
server, for the same database, we use <code>pgbouncer</code>:</p>

<pre class="src">
pg_staging&gt; pgbouncer some_db.dev
              some_db      some_db_20091029 :5432
     some_db_20090717      some_db_20090717 :5432
     some_db_20091029      some_db_20091029 :5432
</pre>

<p>So as explained into the <code>pg_staging(1)</code> man page, you have to open
non-interactive <code>SSH</code> connection from the <em>controler</em> to the <em>hosts</em> where the
databases will get restored. Then you have to do a minimal setup pgbouncer
on the <em>hosts</em> with a <code>trust</code> connection. It'll get used from <code>pg_staging</code> for
adding newly restored database and have them accessible. Then you can also
<code>switch</code> the new database to being the virtual <em>some_db</em> so that you avoid
editing any connection string on your softwares.</p>

<p>Also, install the <code>pgstaging-client</code> package on every host you target. The
client is a simple shell script that must run as root (<code>sudo</code> is used) in
order to replace your <code>pgbouncer</code> setup or manage your <code>londiste</code> services.</p>

<p>See <code>man 5 pg_staging</code> for available options, including <em>schemas</em> to filter out
either completely or just skipping data restoring in those.</p>


<h3>pg_staging usage</h3>

<p class="first">Now you're all setup, you can begin to enjoy using <code>pgstaging</code>. Enter the
console and see what you have in there.</p>

<pre class="src">
$ pg_staging
Welcome to pg_staging 0.9.
pg_staging&gt; databases
...
pg_staging&gt; restore some_db.dev
...
pg_staging&gt; pgbouncer some_db.dev
...
pg_staging&gt; dbsizes --all some_db.dev
...
pg_staging&gt; psql some_db.dev
some_db_20091125=#
</pre>

<p>And as you can see in <code>man pg_staging</code> there are a lot of commands
already. You can for example obtain a new <em>pg_restore catalog</em> from a dump
file, with some <em>schemas</em> commented out. It will even comment out <code>triggers</code>
that are using a <code>function</code> which is defined in a filtered out <code>schema</code>, for
example a <code>PGQ</code> trigger. And much much more.</p>

<p><a href="pgstaging.html">pg_staging</a> will even allow you to <code>dump</code> your production databases, but
consider installing a separate instance of it on the machine serving the
backups to your local network thanks to an <code>apache</code> directory listing!</p>


<h3>Roadmap to <code>1.0.0</code></h3>

<p class="first">What's remain to be done is testing and having <code>PITR</code> based restoring to work,
and adding some documentation (tutorial, which this blog post about is; and
<em>londiste</em> support). At this point, unless some reader here asks for a new
feature (set), I'll consider <code>pg_staging</code> ready for <code>1.0.0</code>. After all, we're
using it about daily here :)</p>

<p>Consider commenting, you should be able to easily spot my private mail
address...</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Wed, 25 Nov 2009 11:49:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2009/11/25-yet-another-postgresql-tool-hits-debian.html</guid>
</item>
<item>
  <title>prefix 1.0.0</title>
  <link>http://tapoueh.org/blog/2009/10/06-prefix-100.html</link>
  <description><![CDATA[<p class="first">So there it is, at long last, the final <code>1.0.0</code> release of prefix! It's on its
way into the debian repository (targetting sid, in testing in 10 days) and
available on <a href="http://pgfoundry.org/frs/?group_id=1000352">pgfoundry</a> to.</p>

<p>In order to make it clear that I intend to maintain this version, the number
has 3 digits rather than 2... which is also what <a href="http://www.postgresql.org/support/versioning">PostgreSQL</a> users will
expect.</p>

<p>The only last minute change is that you can now use the first version of the
two following rather than the second one:</p>

<pre class="src">
-  create index idx_prefix on prefixes using gist(prefix gist_prefix_range_ops);
+  create index idx_prefix on prefixes using gist(prefix);
</pre>

<p>For you information, I'm thinking about leaving <code>pgfoundry</code> as far as the
source code management goes, because I'd like to be done with <code>CVS</code>. I'd still
use the release file hosting though at least for now. It's a burden but it's
easier for the users to find them, when they are not using plain <code>apt-get
install</code>. That move would lead to host <a href="http://pgfoundry.org/projects/prefix/">prefix</a> and <a href="http://pgfoundry.org/projects/pgloader">pgloader</a> and the <a href="http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/backports/">backports</a>
over there at <a href="http://github.com/dimitri">github</a>, where my next pet project, <code>pg_staging</code>, will be hosted
too.</p>

<p>The way to see this <em>pgfoundry</em> leaving is that if everybody does the same,
then migrating the facility to some better or more recent hosting software
will be easier. Maybe some other parts of the system are harder than the
sources to migrate, though. If that's the case I'll consider moving them out
too, maybe getting listed on the <a href="http://www.postgresql.org/download/product-categories">PostgreSQL Software Catalogue</a> will prove
enough as far as web presence goes?</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Tue, 06 Oct 2009 15:56:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2009/10/06-prefix-100.html</guid>
</item>
<item>
  <title>hstore-new &amp; preprepare reach debian too</title>
  <link>http://tapoueh.org/blog/2009/08/18-hstore-new--preprepare-reach-debian-too.html</link>
  <description><![CDATA[<p class="first">It seems like debian developers are back from annual conference and holiday,
so they have had a look at the <code>NEW</code> queue and processed the packages in
there. Two of them were mines and waiting to get in <code>unstable</code>, <a href="http://packages.debian.org/hstore-new">hstore-new</a> and
<a href="http://packages.debian.org/preprepare">preprepare</a>.</p>

<p>Time to do some bug fixing already, as <code>hstore-new</code> packaging is using a
<em>bash'ism</em> I shouldn't rely on (or so the debian buildfarm is <a href="https://buildd.debian.org/~luk/status/package.php?p=hstore-new">telling me</a>) and
for <code>preprepare</code> I was waiting for inclusion before to go improving the <code>GUC</code>
management, stealing some code from <a href="http://blog.endpoint.com/search/label/postgres">Selena</a>'s <a href="http://blog.endpoint.com/2009/07/pggearman-01-release.html">pgGearman</a> :)</p>

<p>As some of you wonder about <code>prefix 1.0</code> scheduling, it should soon get there
now it's been in testing long enough and no bug has been reported. Of course
releasing <code>1.0</code> in august isn't good timing, so maybe I should just wait some
more weeks.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Tue, 18 Aug 2009 09:14:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2009/08/18-hstore-new--preprepare-reach-debian-too.html</guid>
</item>
<item>
  <title>prefix 1.0~rc2 in debian testing</title>
  <link>http://tapoueh.org/blog/2009/08/03-prefix-10rc2-in-debian-testing.html</link>
  <description><![CDATA[<p class="first">At long last, <a href="http://packages.debian.org/search?searchon=sourcenames&amp;keywords=prefix">here it is</a>. With binary versions both for <code>postgresal-8.3</code> and
<code>postgresal-8.4</code>! Unfortunately my other packaging efforts are still waiting
on the <code>NEW</code> queue, but I hope to soon see <code>hstore-new</code> and <code>preprepare</code> enter
debian too.</p>

<p>Anyway, the plan for <code>prefix</code> is to now wait something like 2 weeks, then,
baring showstopper bugs, release the <code>1.0</code> final version. If you have a use
for it, now is the good time for testing it!</p>

<p>About upgrading a current <code>prefix</code> installation, the advice is to save data as
<code>text</code> instead of <code>prefix_range</code>, remove prefix support, install new version,
change again the columns data type:</p>

<pre class="src">
BEGIN;
  ALTER TABLE foo
     ALTER COLUMN prefix
             TYPE text USING text(prefix);

  DROP TYPE prefix_range CASCADE;
  \i prefix.sql

  ALTER TABLE foo
     ALTER COLUMN prefix
             TYPE prefix_range USING prefix_range(prefix);

  CREATE INDEX idx_foo_prefix ON foo
         USING gist(prefix gist_prefix_range_ops);
COMMIT;
</pre>

<p>Note: I just added the <code>gist_prefix_range_ops</code> as default for type
<code>prefix_range</code> so it'll be optional to specify this in final <code>1.0</code>. I got so
used to typing it I didn't realize we don't have to :)</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 03 Aug 2009 14:50:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2009/08/03-prefix-10rc2-in-debian-testing.html</guid>
</item>
<item>
  <title>prefix 1.0~rc2-1</title>
  <link>http://tapoueh.org/blog/2009/07/09-prefix-10rc2-1.html</link>
  <description><![CDATA[<p class="first">I've been having problem with building both <code>postgresql-8.3-prefix</code> and
<code>postgresql-8.4-prefix</code> debian packages from the same source package, and
fixing the packaging issue forced me into modifying the main <code>prefix</code>
<code>Makefile</code>. So while reaching <code>rc2</code>, I tried to think about missing pieces easy
to add this late in the game: and there's one, that's a function
<code>length(prefix_range)</code>, so that you don't have to cast to text no more in the
following wildspread query:</p>

<pre class="src">
  SELECT foo, bar
    FROM prefixes
   WHERE prefix @&gt; <span style="color: #bc8f8f;">'012345678'</span>
ORDER BY length(prefix) DESC
   LIMIT 1;
</pre>

<p>And here's a simple stupid benchmark of the new function, here in
<a href="http://prefix.projects.postgresql.org/prefix-1.0~rc2.tar.gz">prefix-1.0~rc2.tar.gz</a>. And it'll soon reach debian, if my QA dept agrees (my
<a href="http://julien.danjou.info/blog/">sponsor</a> is a QA dept all by himself!).</p>

<p>First some preparation:</p>

<pre class="src">
dim=#   create table prefixes (
dim(#          prefix    prefix_range primary key,
dim(#          name      text not null,
dim(#          shortname text,
dim(#          status    char default <span style="color: #bc8f8f;">'S'</span>,
dim(#
dim(#          check( status in (<span style="color: #bc8f8f;">'S'</span>, <span style="color: #bc8f8f;">'R'</span>) )
dim(#   );
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "prefixes_pkey" for
 table "prefixes"
CREATE TABLE
Time: 74,357 ms
dim=#   \copy prefixes from <span style="color: #bc8f8f;">'prefixes.fr.csv'</span> with delimiter ; csv quote <span style="color: #bc8f8f;">'"'</span>
Time: 200,982 ms
dim=# select count(*) from prefixes ;
 count
<span style="color: #b22222;">-------
</span> 11966
(1 row)
Time: 3,047 ms
</pre>

<p>And now for the micro-benchmark:</p>

<pre class="src">
dim=# \o /dev/null
dim=# select length(prefix) from prefixes;
Time: 16,040 ms
dim=# select length(prefix::text) from prefixes;
Time: 23,364 ms
dim=# \o
</pre>

<p>Hope you enjoy!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Thu, 09 Jul 2009 12:48:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2009/07/09-prefix-10rc2-1.html</guid>
</item>
<item>
  <title>prefix extension reaches 1.0 (rc1)</title>
  <link>http://tapoueh.org/blog/2009/06/23-prefix-extension-reaches-10-rc1.html</link>
  <description><![CDATA[<p class="first">At long last, after millions and millions of queries just here at work and
some more in other places, the <a href="prefix.html">prefix</a> project is reaching <code>1.0</code> milestone. The
release candidate is getting uploaded into debian at the moment of this
writing, and available at the following place: <a href="http://prefix.projects.postgresql.org/prefix-1.0~rc1.tar.gz">prefix-1.0~rc1.tar.gz</a>.</p>

<p>If you have any use for it (as some <em>VoIP</em> companies have already), please
consider testing it, in order for me to release a shiny <code>1.0</code> next week! :)</p>

<p>Recent changes include getting rid of those square brackets output when it's
not neccesary, fixing btree operators, adding support for more operators in
the <code>GiST</code> support code (now supported: <code>@&gt;</code>, <code>&lt;@</code>, <code>=</code>, <code>&amp;&amp;</code>). Enjoy!</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Tue, 23 Jun 2009 10:53:00 +0200</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2009/06/23-prefix-extension-reaches-10-rc1.html</guid>
</item>
<item>
  <title>emacs-snapshot</title>
  <link>http://tapoueh.org/blog/2008/12/blog/2008/12/08-emacs-snapshot.html</link>
  <description><![CDATA[<p>If you want to live on the bleeding edge, it's easy enough to get a non
existing release of <a href="http://www.gnu.org/software/emacs/">GNU Emacs</a> under <a href="http://www.debian.org/releases/unstable/">debian sid</a>, thanks to
<a href="http://emacs.orebokech.com/">http://emacs.orebokech.com/</a>.</p>

<p>The problem is that <a href="http://mwolson.org/projects/EmacsMuse.html">Emacs Muse</a> is broken on <code>emacs-snapshot</code>, partly because
of <a href="http://www.emacswiki.org/emacs/Htmlize">Htmlize</a> which is unable to find the face fonts (I got <code>(error &quot;Invalid
face&quot;)</code>), partly because of my configuration itself:</p>

<pre class="src">
hunk ./dim-muse.el 22
-      '((<span style="color: #bc8f8f;">"pgsql.tapoueh.org"</span> $
-        (,@(muse-project-alist-dirs <span style="color: #bc8f8f;">"~/dev/muse/site"</span>) $
+      '((<span style="color: #bc8f8f;">"pgsql.tapoueh.org"</span> (<span style="color: #bc8f8f;">"~/dev/muse/site"</span>
+        <span style="color: #b22222;">;;</span><span style="color: #b22222;">(,@(muse-project-alist-dirs "~/dev/muse/site") $
</span></pre>

<p>The solution was to switch to using <code>Emacs 22</code> on sid for <a href="http://pgsql.tapoueh.org/site/muse/site/">pgsql.tapoueh.org</a>
editing, while using <a href="http://www.emacswiki.org/emacs/?action=browse;oldid=EmacsCVS;id=EmacsFromCVS">EmacsCVS</a> for other activities.</p>

<p>And I'm using the patched <code>Htmlize</code> on both the versions, by the way.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 08 Dec 2008 16:10:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2008/12/blog/2008/12/08-emacs-snapshot.html</guid>
</item>
<item>
  <title>emacs-snapshot</title>
  <link>http://tapoueh.org/blog/2008/12/08-emacs-snapshot.html</link>
  <description><![CDATA[<p class="first">If you want to live on the bleeding edge, it's easy enough to get a non
existing release of <a href="http://www.gnu.org/software/emacs/">GNU Emacs</a> under <a href="http://www.debian.org/releases/unstable/">debian sid</a>, thanks to
<a href="http://emacs.orebokech.com/">http://emacs.orebokech.com/</a>.</p>

<p>The problem is that <a href="http://mwolson.org/projects/EmacsMuse.html">Emacs Muse</a> is broken on <code>emacs-snapshot</code>, partly because
of <a href="http://www.emacswiki.org/emacs/Htmlize">Htmlize</a> which is unable to find the face fonts (I got <code>(error &quot;Invalid
face&quot;)</code>), partly because of my configuration itself:</p>

<pre class="src">
hunk ./dim-muse.el 22
-      '((<span style="color: #bc8f8f;">"pgsql.tapoueh.org"</span> $
-        (,@(muse-project-alist-dirs <span style="color: #bc8f8f;">"~/dev/muse/site"</span>) $
+      '((<span style="color: #bc8f8f;">"pgsql.tapoueh.org"</span> (<span style="color: #bc8f8f;">"~/dev/muse/site"</span>
+        <span style="color: #b22222;">;;</span><span style="color: #b22222;">(,@(muse-project-alist-dirs "~/dev/muse/site") $
</span></pre>

<p>The solution was to switch to using <code>Emacs 22</code> on sid for <a href="http://pgsql.tapoueh.org/site/muse/site/">pgsql.tapoueh.org</a>
editing, while using <a href="http://www.emacswiki.org/emacs/?action=browse;oldid=EmacsCVS;id=EmacsFromCVS">EmacsCVS</a> for other activities.</p>

<p>And I'm using the patched <code>Htmlize</code> on both the versions, by the way.</p>
]]></description>
  <author>dim@tapoueh.org (Dimitri Fontaine)</author>
  <pubDate>Mon, 08 Dec 2008 16:10:00 +0100</pubDate>
  <guid isPermaLink="true">http://tapoueh.org/blog/2008/12/08-emacs-snapshot.html</guid>
</item>
  </channel>
</rss>
