<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Planet PostgreSQL (short)</title><link>http://planet.postgresql.org</link><description>Planet PostgreSQL (short)</description><lastBuildDate>Tue, 18 Jun 2013 23:31:15 GMT</lastBuildDate><generator>Planet PostgreSQL</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Michael Paquier: Postgres dev: create your own RPM packages</title><link>http://michael.otacoo.com/postgresql-2/postgres-dev-create-your-own-rpm-packages/</link><description>Creating RPM packages for your own needs can be quite an adventure
the first time, especially with a code base as complex as Postgres
considering all the submodules, options and extensions that the
core code can come up with. But thanks to all the work done by the
community, the building process is quite easy. &lt;a href=
"http://michael.otacoo.com/postgresql-2/postgres-dev-create-your-own-rpm-packages/"&gt;
[...]&lt;/a&gt;
</description><guid isPermaLink="false">http://michael.otacoo.com/?p=1973</guid><pubDate>Tue, 18 Jun 2013 05:14:23 GMT</pubDate></item><item><title>Pierre Ducroquet: My first PostgreSQL patch/hack</title><link>http://www.pinaraf.info/2013/06/my-first-postgresql-patchhack/</link><description>&lt;p&gt;After almost two years of lobbying at work to promote PostgreSQL
instead of MySQL, after two years of tears against poor DB typing,
lack of advanced SQL features, traps in what seemed like basic
needs (select * from myview where a=5, if myview is not «simple»,
triggers a full scan on the view result)… we are finally starting
to deploy some PostgreSQL databases.&lt;/p&gt;
&lt;p&gt;I wrote my dear sysadmin friends documentations, argumentations.
Among my «it’s simpler» arguments, I promoted application_name as a
way to quickly know who is hurting that bad your SQL server, along
with the so simple ps faux to know who is doing what on your
server… That’s the simplest monitoring possible, but when you’re in
a hurry at 3AM, it can help you… Sadly, the application_name is not
displayed in the ps output. I was looking for a tiny thing to patch
PostgreSQL in order to discover its code a bit, it seemed like a
good opportunity.&lt;/p&gt;
&lt;p&gt;And let’s share also how I did the patch to highlight how easy
patching PostgreSQL is &lt;img alt=":)" class="wp-smiley" src=
"http://www.pinaraf.info/wp-includes/images/smilies/icon_smile.gif" /&gt;
 (the patch has been written together with this blog entry)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;0) System setup&lt;/h1&gt;
&lt;p&gt;First thing, you need a minimal development environment for
PostgreSQL. Your tools : your favorite compiler (GCC), make, git,
$EDITOR, ack-grep and a bit of patience if your CPU is slow
(postgresql compiles quite quickly).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br /&gt;
~$ cd ~/projects&lt;br /&gt;
~/projects$ git clone
git://git.postgresql.org/git/postgresql.git&lt;br /&gt;
~/projects$ cd postgresql&lt;br /&gt;
~/projects/postgresql$ git checkout -b
application-name-in-proctitle&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;1) Exploring the code&lt;/h1&gt;
&lt;p&gt;We want to modify how the proctitle is constructed. Under BSD
systems, it’s done through the setproctitle call, easier to find
than the game with ARGV under linux. Soo… let’s search it.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
–/projects/postgresql$ ack-grep --type cc setproctitle&lt;br /&gt;
src/backend/utils/misc/ps_status.c&lt;br /&gt;
42: * use the function setproctitle(const char *, ...)&lt;br /&gt;
265: * apparently setproctitle() already adds a `progname:' prefix
to the ps&lt;br /&gt;
329: setproctitle("%s", ps_buffer);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;src/include/pg_config.h&lt;br /&gt;
422:/* Define to 1 if you have the `setproctitle’ function. */&lt;/p&gt;
&lt;p&gt;Well, only one &lt;/p&gt;[...]</description><guid isPermaLink="false">http://www.pinaraf.info/?p=29</guid><pubDate>Mon, 17 Jun 2013 22:26:46 GMT</pubDate></item><item><title>Francisco Figueiredo Jr: Initial EF-6 support added to Npgsql</title><link>http://fxjr.blogspot.com/2013/06/initial-ef-6-support-added-to-npgsql.html</link><description>In my &lt;a href=
"http://fxjr.blogspot.com/2013/06/npgsql-code-first-entity-framework-431.html"&gt;
last post&lt;/a&gt;, I said there is a pull request by Pēteris Ņikiforovs
to add support for EF-6 to Npgsql. Yesterday, &lt;a href=
"https://github.com/franciscojunior/Npgsql2/commit/63af6457c167d93163a772662f9fe8057d866b08"&gt;
I merged this pull request to the master branch of
Npgsql&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
With this merge, &lt;b&gt;Npgsql has officially initial support for
EF-6!&lt;/b&gt;&lt;br /&gt;
&lt;h3&gt;How to compile&lt;/h3&gt;
For now, in order to compile Npgsql to use EF-6, you have to open
the solution file NpgsqlEF6.sln. Later,&amp;nbsp;&lt;a href=
"https://github.com/franciscojunior/Npgsql2/pull/19#issuecomment-17622474"&gt;as
suggested by Pēteris Ņikiforovs&lt;/a&gt;, the idea is that we create a
new configuration inside main project solution instead of maintain
2 separated projects.&lt;br /&gt;
&lt;br /&gt;
Another thing you will need to compile Npgsql is the &lt;a href=
"https://nuget.org/packages/entityframework"&gt;latest release of
EntityFramework&lt;/a&gt; assembly through NuGet:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="c1"&gt;PM&amp;gt; Install-Package EntityFramework
-Pre&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
That's it! Now you will be able to play with Npgsql and EF-6. Check
out my previous post about how to use Npgsql with
EntityFramework.&lt;br /&gt;
&lt;br /&gt;
I'd like to thank&amp;nbsp;Pēteris Ņikiforovs for his patch.
And&amp;nbsp;maxbundchen for his patch about Open/Close events needed
for EF-6.&lt;br /&gt;
&lt;br /&gt;
Please, give it a try and let me know how it works for you.
</description><guid isPermaLink="true">tag:blogger.com,1999:blog-15237920.post-7173537439438528475</guid><pubDate>Mon, 17 Jun 2013 17:11:00 GMT</pubDate></item><item><title>Leo Hsu and Regina Obe: CMake support for PostGIS planned</title><link>http://www.postgresonline.com/journal/archives/307-CMake-support-for-PostGIS-planned.html</link><description>&lt;p&gt;I've been having issues with PostgreSQL error handling mostly on
windows 64-bit using binaries I build with mingw64 and using under
VC++ built PostgreSQL. Most of which I don't understand. As many
have pointed out these issues MIGHT go away or be easier to debug
if PostGIS was built with same tool chain as EDB VC++
distributions. I can't argue with that especially since its never
been done.&lt;/p&gt;
&lt;p&gt;The good news is changing my build chain from mingw64 GCC 4.5.4
to mingw64 GCC 4.8.0 has eradicated all of these issues, and even
ones I had with &lt;a href=
"http://www.postgresonline.com/journal/archives/305-PostgreSQL-9.3-extension-treats-for-windows-users-plV8.html#c9132"
target="_blank"&gt;PL/V8&lt;/a&gt; that happended both in a pure
mingw64(w32/w64) as well as PostgreSQL VCC (32/64 bit) environment.
It did introduce this minor annoying &lt;a href=
"http://www.postgresql.org/message-id/E1UcLPd-0000L4-TI@wrigleys.postgresql.org"
target="_blank"&gt;nat&lt;/a&gt;, presumably because my libpq.dll now has a
dependency on user32.dll (which just seems wrong). The other nat is
that all the binaries I built that have c++ in them (depend on
libstd++) now need to be recompiled which means my prior builds of
PostGIS will not be compatible with my upcoming 4.8.0 ones. A real
pain since for PostGIS/pgRouting I've got like at least 15 of those
dependencies and growing. So I've decided to perform this exercise
just for PostgreSQL 9.3 -- a new beginning at PostGIS 2.1 and see
how it goes before I bother with 9.2, 9.1. These issues really only
affect PostgreSQL 64-bit PostGIS users and as a 64-bit user, you
may never have even come across them.&lt;/p&gt;
&lt;br /&gt;
&lt;a href=
"http://www.postgresonline.com/journal/archives/307-CMake-support-for-PostGIS-planned.html#extended"&gt;
Continue reading "CMake support for PostGIS planned"&lt;/a&gt;
</description><guid isPermaLink="false">http://www.postgresonline.com/journal/archives/307-guid.html</guid><pubDate>Mon, 17 Jun 2013 03:28:00 GMT</pubDate></item><item><title>Josh Berkus: 9.4 Commitfest 1 Has Begun!</title><link>http://www.databasesoup.com/2013/06/94-commitfest-1-has-begun.html</link><description>The &lt;a href="https://commitfest.postgresql.org/action/commitfest_view%3Fid%3D18"&gt;first
CommitFest for version 9.4&lt;/a&gt; of PostgreSQL has started, and we
have an inspiring list of new features, in 98 patches, ready to be
reviewed.&amp;nbsp; Which means we need you to help review them!&amp;nbsp;
Among the pending patches are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1150"&gt;Logical
Changeset Generation&lt;/a&gt;, the basis for the new replication;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1005"&gt;Setting
postgresql.conf variables from the SQL command line&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1155"&gt;Transaction
Log size autotuning&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1067"&gt;Transforms&lt;/a&gt;
between custom PostgreSQL datatypes and PL/Python, Perl and
Javascript datatypes;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D874"&gt;Row-Level
Security&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1151"&gt;GIN
Fast Scan&lt;/a&gt;, and other GIN index improvements;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1149"&gt;Block-based
range indexes&lt;/a&gt; for very large tables;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://commitfest.postgresql.org/action/patch_view%3Fid%3D1144"&gt;Incremental
update of materialized views&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;Multiple pgbench enhancements;&lt;/li&gt;
&lt;li&gt;Many performance improvements;&lt;/li&gt;
&lt;li&gt;A bunch of additional regression tests.&lt;/li&gt;
&lt;/ul&gt;
Given that that's nearly 100 patches, and the PostgreSQL project
has only 20 committers, it means we need &lt;span class="c1"&gt;you&lt;/span&gt; to help us review patches.&amp;nbsp; Yes, you!&amp;nbsp;
You don't have to be able to hack PostgreSQL code to review a
patch; if you can apply a patch to source code and build PostgreSQL
using "make", you can help.&amp;nbsp; More information here in &lt;a href="http://wiki.postgresql.org/wiki/Reviewing_a_Patch"&gt;How To Review A
Patch&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
If you want to help, but aren't sure what to review, please
j&lt;a href="http://www.postgresql.org/community/lists/subscribe/"&gt;oin
the pgsql-rrreviewers mailing list&lt;/a&gt; and announce yourself
there.&amp;nbsp; I will assign you a patch to review.&lt;br /&gt;
&lt;br /&gt;
For those of you who are experienced reviewers or who have
submitted a patch to this CommitFest, please note the
following:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;If you submitted a patch to this CommitFest, you are expected
to review at least one other person's patch.&amp;nbsp; Should you
choose not to do so, the community will not be obligated to
guarantee you a review of &lt;i&gt;your&lt;/i&gt; patch.&lt;/li&gt;
&lt;li&gt;If you put your name down as a reviewer on a patch, and you
don't post anything for 5 days, we will send you a reminder and
take your name off the patch, to prevent you from blocking other
reviewers.&lt;/li&gt;
&lt;li&gt;If your patch goes to "waiting on author" and you don't respond
for 5 days, the patch will be Returned with Feedback.&lt;/li&gt;
&lt;/ol&gt;
Rules 2 and 3 are new per this year's developer meeting.&amp;nbsp;
Thanks, and lets have a fast and productive CommitFest!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;[...]</description><guid isPermaLink="true">tag:blogger.com,1999:blog-7476449567742726187.post-6291374548136999394</guid><pubDate>Sun, 16 Jun 2013 18:46:00 GMT</pubDate></item><item><title>Andrew Dunstan: Release 4.11 of PostgreSQL Buildfarm client</title><link>http://adpgtech.blogspot.com/2013/06/release-411-of-postgresql-buildfarm.html</link><description>&lt;span class="c1"&gt;Version 4.11 of the PostgreSQL Buildfarm client
has been released. It can be downloaded from&lt;/span&gt; &lt;a href=
"http://www.pgbuildfarm.org/downloads/releases/build-farm-4_11.tgz"
target=
"_blank"&gt;http://www.pgbuildfarm.org/downloads/releases/build-farm-4_11.tgz&lt;/a&gt;&lt;br /&gt;

&lt;br /&gt;
Changes since 4.10:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Turn down module cleanup verbosity&lt;/li&gt;
&lt;li&gt;Add check for rogue postmasters.&lt;/li&gt;
&lt;li&gt;Add pseudo-branch targets HEAD_PLUS_LATEST and
HEAD_PLUS_LATEST2.&lt;/li&gt;
&lt;li&gt;Use Digest::SHA instead of Digest::SHA1.&lt;/li&gt;
&lt;li&gt;Make directory handling more robust in git code.&lt;/li&gt;
&lt;li&gt;Move web transaction into a module procedure.&lt;/li&gt;
&lt;li&gt;Switch to using the porcelain format of git status.&lt;/li&gt;
&lt;li&gt;Provide parameter for core file patterns.&lt;/li&gt;
&lt;li&gt;Use a command file for gdb instead of the -ex option&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The web transaction and Digest::SHA changes have allowed the
removal of a couple of long-standing uglinesses on the system. In
almost all cases, the config parameter "aux_path" and the separate
run_web_transaction.pl script are now redundant (the exception is
older Msys systems).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy
</description><guid isPermaLink="false">tag:blogger.com,1999:blog-2356137376934964551.post-3147159601731866846</guid><pubDate>Fri, 14 Jun 2013 14:22:00 GMT</pubDate></item><item><title>Devrim GÜNDÜZ: Best practices for running PostgreSQL on Windows</title><link>http://people.planetpostgresql.org/devrim/index.php?/archives/74-Best-practices-for-running-PostgreSQL-on-Windows.html</link><description>
It is simple: format c:/ and use Linux.
</description><guid isPermaLink="false">http://people.planetpostgresql.org/devrim/index.php?/archives/74-guid.html</guid><pubDate>Fri, 14 Jun 2013 07:50:25 GMT</pubDate></item><item><title>Dan Langille: pg_restore: [custom archiver] could not read from input file: end of file</title><link>http://dan.langille.org/2013/06/12/pg_restore-custom-archiver-could-not-read-from-input-file-end-of-file/</link><description>I’ve been a fan of PostgreSQL since 2000 when I switched to it from
MySQL. I wanted stored procedures and functions. I got that with
PostgreSQL. I was used to having such features from my years
working with other big databases such as DB2, Oracle, and Sybase.
I’ve been moving towards using the custom format &lt;a class=
"excerpt-more" href=
"http://dan.langille.org/2013/06/12/pg_restore-custom-archiver-could-not-read-from-input-file-end-of-file/"&gt;
[...]&lt;/a&gt;
</description><guid isPermaLink="false">http://dan.langille.org/?p=2324</guid><pubDate>Thu, 13 Jun 2013 00:38:42 GMT</pubDate></item><item><title>Szymon Guz: Installing PostgreSQL without Root</title><link>http://blog.endpoint.com/2013/06/installing-postgresql-without-root.html</link><description>&lt;p&gt;PostgreSQL can be installed using installers prepared for your
operation system. However this way you just depend on the
installation settings chosen by the packages mainainers.
Installation requires root privileges, on some machines programmers
are not allowed to do that. What’s more, this way you rather will
not install the PostgreSQL beta version.&lt;/p&gt;
&lt;p&gt;The only way to install Postgres without root privileges, in
home directory, is to compile it from sources. That’s not very
difficult.&lt;/p&gt;
&lt;h2&gt;Download Sources&lt;/h2&gt;
&lt;p&gt;First of all you need to download sources. I use Github for
getting the latest sources. There is &lt;a href="https://github.com/postgres/postgres"&gt;Postgres Github mirror&lt;/a&gt;.
I clone that, but you could just download &lt;a href="https://github.com/postgres/postgres/archive/master.zip"&gt;zip
file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Unpack it somewhere, and you have the Postgres sources you
need.&lt;/p&gt;
&lt;h2&gt;Install Needed Software&lt;/h2&gt;
&lt;p&gt;For compiling Postgres you will need some libraries and
programs. The complete list can be found in &lt;a href="http://www.postgresql.org/docs/9.2/static/install-requirements.html"&gt;
Postgres documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’m using Ubuntu, the packages I use for compiling Postgres
are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;gcc – C compiler&lt;/li&gt;
&lt;li&gt;libreadline6, libreadline6-dev – readline support&lt;/li&gt;
&lt;li&gt;zlib1g, zlib1g-dev – compression library used internally by
Postgres&lt;/li&gt;
&lt;li&gt;libpython2.7, libpython2.7-dev – for compiling with plPython
support&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are using different system, or different system/Postgres
version, then your packages/libraries can be named differently.&lt;/p&gt;
&lt;h2&gt;Configure&lt;/h2&gt;
&lt;p&gt;Now you should enter the directory where your sources are and
run below command for source configuration:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;./configure --prefix=$HOME/postgres/ --with-python PYTHON=/usr/bin/python2.7&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;--prefix&lt;/code&gt; parameter shows the path where
Postgres will be installed.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;--with-python&lt;/code&gt; parameter enables compiling with
plpython support.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;PYTHON&lt;/code&gt; parameter points to current python binary
installation.&lt;/p&gt;
&lt;p&gt;The configure command should finish without any errors. If you
have any errors, most probably you don’t have some needed libraries
installed.&lt;/p&gt;
&lt;h2&gt;Compile&lt;/h2&gt;
&lt;p&gt;If configure succeeded, you can compile the sources. It is
simple:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;make -j 4&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;-j&lt;/code&gt; parameter allows for this maximum number of
jobs at the same time.&lt;/p&gt;
&lt;p&gt;My computer has 4 cores, I want to use all of them, th&lt;/p&gt;[...]</description><guid isPermaLink="true">tag:blogger.com,1999:blog-7997313029981170997.post-3944284995491745431</guid><pubDate>Wed, 12 Jun 2013 14:00:00 GMT</pubDate></item><item><title>Oleg Bartunov: FTS tips: TEXT @@ TSQUERY confusion</title><link>http://obartunov.livejournal.com/171653.html</link><description>Our customer provides us an interesting fts puzzle - result of fts
query depend on the order of arguments of @@ operator. Of course,
it shouldn't be happened, that's why everebody were confused. After
close look we found the problem - they used textual representation
of tsvector without explicit cast to tsvector, so it was converted
to tsvector again (using default_text_search_config) and it happens
that tsquery contained a number 77, which was absent in the
original text, but appeared in the final tsvector (there was some
word at position 77). It happens only if tsquery was at right and
never - when tsquery was left argument. There are three form of
text search operator -&lt;br /&gt;
TSVECTOR @@ TSQUERY, TSQUERY @@ TSVECTOR, TEXT @@ TSQUERY, that's
why postgres silently does search without complaining. Always
specify explicit cast to avoid such kind of confusion.&lt;br /&gt;
&lt;br /&gt;
Here are examples:&lt;br /&gt;
&lt;br /&gt;
=# select 'ate:3 fat:5 mice:2 one:1 rat:6' @@ '1 &amp;amp; mice';&lt;br /&gt;
?column?&lt;br /&gt;
----------&lt;br /&gt;
t&lt;br /&gt;
&lt;br /&gt;
=# select '1 &amp;amp; mice' @@ 'ate:3 fat:5 mice:2 one:1 rat:6';&lt;br /&gt;
?column?&lt;br /&gt;
----------&lt;br /&gt;
f&lt;br /&gt;
&lt;br /&gt;
Explicit cast made us happy !&lt;br /&gt;
&lt;br /&gt;
=# select 'ate:3 fat:5 mice:2 one:1 rat:6'::tsvector @@ '1 &amp;amp;
mice';&lt;br /&gt;
?column?&lt;br /&gt;
----------&lt;br /&gt;
f
</description><guid isPermaLink="true">http://obartunov.livejournal.com/171653.html</guid><pubDate>Tue, 11 Jun 2013 09:17:53 GMT</pubDate></item><item><title>Hans-Juergen Schoenig: PostgreSQL block sizes: Getting started …</title><link>http://www.cybertec.at/postgresql-block-sizes-getting-started/</link><description>I have been wondering a while about the optimal block size in
PostgreSQL. Usually the default value of 8kb has proven to be
beneficial for most applications. However, after listening to some
talk about MonetDB, I got interested in testing various workloads
for different blocksizes – especially with blocksizes larger than
PostgreSQL’s current maximum of [...]
</description><guid isPermaLink="false">http://www.cybertec.at/?p=2331</guid><pubDate>Tue, 11 Jun 2013 08:18:42 GMT</pubDate></item><item><title>Chris Travers: Design of Efficito's PostgreSQL-centric automation environment</title><link>http://ledgersmbdev.blogspot.com/2013/06/design-of-efficitos-postgresql-centric.html</link><description>One of the challenges of setting up a cloud hosting environment is
ensuring that systems are as configured and that the desired state
is one which can be rebuilt if there is a problem.&amp;nbsp; We at
&lt;a href="http://www.efficito.com/"&gt;Efficito&lt;/a&gt; focus on data
backups and rebuilding software images to consistent states rather
than backing up full images and restoring them.&amp;nbsp; This helps
ensure that in the event of a disaster we can ensure that VMs are
restored to a consistent software state with data restored from
backup.&lt;br /&gt;
&lt;br /&gt;
Our choice on architecture was guided by the following
requirements:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Configuration and building of virtual machines should be
subject to automation without human intervention, with full
integration of payment frameworks and the like.&lt;/li&gt;
&lt;li&gt;Configuration and building of virtual machines should be such
that virtual machines can be fully rebuilt in the event of disaster
recovery requirements.&lt;/li&gt;
&lt;li&gt;Configuration changes should be able to be automated and
retriable.&lt;/li&gt;
&lt;li&gt;This can be specific to hosted clouds for specific applications
(we only host &lt;a href="http://www.ledgersmb.org/"&gt;LedgerSMB&lt;/a&gt; as
an ERP solution).&lt;/li&gt;
&lt;/ol&gt;
Further posts will probably cover very small pieces of our
system.&amp;nbsp; The entire system cannot be published here in part
because we want to preserve our trade secrets.&amp;nbsp; This post
however just covers some ways we use &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; as the centerpiece of
this environment.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;The Basic Structure and Role of PostgreSQL&lt;/h4&gt;
&lt;br /&gt;
Our approach is relatively simple.&amp;nbsp; Data comes in through
either an administrative or customer portal, transmitted to a
limited API which then goes into our configuration database.&amp;nbsp;
Information can be requests for new virtual machines, configuration
changes and the like.&amp;nbsp; Additionally payment notifications can
come in through these interfaces as well.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL is then attached to the configuration system which picks
up notifications of needed configuration changes and orchestrates
these on the system.&amp;nbsp; This also allows us to pull information
on our service deployments into our financial system for billing
purposes (we use LedgerSMB beta versions of 1.4 internally, eating
our own[...]</description><guid isPermaLink="false">tag:blogger.com,1999:blog-3346090548501966296.post-7904364739611952508</guid><pubDate>Tue, 11 Jun 2013 01:16:00 GMT</pubDate></item><item><title>Szymon Guz: PostgreSQL Functional Indexes</title><link>http://blog.endpoint.com/2013/06/postgresql-functional-indexes.html</link><description>&lt;p&gt;PostgreSQL has got the great feature named “functional indexes”.
A normal index just stores sorted values of some field. It is great
for searching, as the values are already sorted.&lt;/p&gt;
&lt;p&gt;You can create an index with a simple query like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;CREATE INDEX i_test ON test (i);&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;It will store all values of column i from table test. This index
can be used with a query like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;SELECT * FROM test WHERE i &amp;lt; 100 ORDER BY i;&lt;/code&gt;
&lt;/pre&gt;
&lt;h2&gt;Functional Indexes&lt;/h2&gt;
&lt;p&gt;There is also something I like most. Index can store all values
you want, they don’t need to be values from the table. You can use
values calculated from the table columns. They will be sorted, so
searching with those indexes will be pretty fast.&lt;/p&gt;
&lt;p&gt;Creating such index is simple:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;CREATE INDEX i_test_lower_i ON test (lower(i));&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The main rule is: this index can be used if you have the same
function call in your query, something like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;SELECT * FROM test WHERE lower(i) = 'aaa';&lt;/code&gt;
&lt;/pre&gt;
&lt;h2&gt;Example&lt;/h2&gt;
&lt;p&gt;Let’s check something more complicated. My test table looks
like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;CREATE TABLE test(t timestamp);&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I filled this table with sample data. We need some bigger number
of rows:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;INSERT INTO test(t) SELECT generate_series(now() - '1 year'::interval, now(), '1 minute');&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This way there are 500k rows.&lt;/p&gt;
&lt;p&gt;I need to get two row sets from database. First I will get the
rows with dates from the last 10 days. Later I will get all rows
with dates from current year.&lt;/p&gt;
&lt;h3&gt;The Last 10 Days&lt;/h3&gt;
&lt;p&gt;I can get the rows with dates from the last 10 days like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;postgres=# explain analyze select t from test where t::date &amp;gt; (now() - '10 days'::interval)::date;
                                                  QUERY PLAN                                                   
---------------------------------------------------------------------------------------------------------------
 Seq Scan on test  (cost=0.00..14152.02 rows=175200 width=8) (actual time=265.640..272.701 rows=13558 loops=1)
   Filter: ((t)::date &amp;gt; ((now() - '10 days'::interval))::date)
   Rows Removed by Filter: 512043
 Total runtime: 273.152 ms
(4 rows)&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;For speeding this up I will crea&lt;/p&gt;[...]</description><guid isPermaLink="true">tag:blogger.com,1999:blog-7997313029981170997.post-9065203583112458004</guid><pubDate>Mon, 10 Jun 2013 15:17:00 GMT</pubDate></item><item><title>Dan Langille: Using compression with PostgreSQL’s pg_dump</title><link>http://dan.langille.org/2013/06/10/using-compression-with-postgresqls-pg_dump/</link><description>I attended a few of the talks at PGCon 2013 last month. One talk,
for which I took several notes and made a few choice tweets. The
main one I’m following up on is using the -Fc option on pg_dump. It
was during Magnus Haganders’ talk on PostgreSQL Backup Strategies
that I posted that tweet. &lt;a class="excerpt-more" href=
"http://dan.langille.org/2013/06/10/using-compression-with-postgresqls-pg_dump/"&gt;
[...]&lt;/a&gt;
</description><guid isPermaLink="false">http://dan.langille.org/?p=2288</guid><pubDate>Mon, 10 Jun 2013 08:23:18 GMT</pubDate></item><item><title>Guillaume LELARGE: sqlite foreign data wrapper</title><link>http://blog.guillaume.lelarge.info/index.php/post/2013/06/09/sqlite-foreign-data-wrapper</link><description>&lt;p&gt;Last week, one of my customers asked me during a training why
there is no &lt;a href="http://wiki.postgresql.org/wiki/Foreign_data_wrappers"  hreflang="en"&gt;foreign data wrapper&lt;/a&gt; for sqlite (actually, you can have
one with &lt;a href="http://multicorn.org/"  hreflang="en"&gt;multicorn&lt;/a&gt;, but there's no native one). I have no idea why
but I was happy to learn that no sqlite FDW already existed. I
wanted to write one for quite some time now, and it appeared to be
the perfect idea.&lt;/p&gt;
&lt;p&gt;So, in the evening, I started working on one. I took as
foundation the &lt;a href="https://bitbucket.org/adunstan/blackhole_fdw"  hreflang="en"&gt;blackhole foreign data wrapper&lt;/a&gt;, written by &lt;a href="http://adpgtech.blogspot.fr/"  hreflang="en"&gt;Andrew Dunstan&lt;/a&gt;. It
helped a lot to start quickly. I found a bit surprising that it
didn't include #ifdef for some functions and hooks, so that it
could be compatible with 9.1 and 9.2. I added them in a patch that
you can find &lt;a href="https://bitbucket.org/gleu/blackhole_fdw/commits/bea9d6112d0b9b97c641e76e4e60378e5431ee89"  hreflang="en"&gt;here&lt;/a&gt; if you need them. Otherwise, you can simply
delete some parts of the blackhole code.&lt;/p&gt;
&lt;p&gt;After that, I tried to find how to open and close a sqlite
database, and how to read a table in it. They have a really nice
example in their &lt;a href="http://www.sqlite.org/quickstart.html"  hreflang="en"&gt;"Quick start document"&lt;/a&gt; and &lt;a href="http://www.sqlite.org/cintro.html"  hreflang="en"&gt;"Introduction To
The SQLite C/C++ Interface"&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I wanted something really simple to start with. Almost two years
ago, at &lt;a href="http://pgconf.eu/"  hreflang="en"&gt;pgconf.eu&lt;/a&gt;, I
went to see &lt;a href="http://pgsnake.blogspot.fr/"  hreflang="en"&gt;Dave Page&lt;/a&gt;'s talk on FDW (&lt;a href="http://wiki.postgresql.org/images/0/0e/Center_of_your_dataverse.pdf"  hreflang="en"&gt;PostgreSQL at the center of your dataverse&lt;/a&gt;). So I
already knew that you mainly need three functions to read a table:
BeginForeignScan, IterateForeignScan, EndForeignScan. The first one
has to open the connection (if it's not opened yet). The second one
will be executed as many times as there are rows to grab. On its
first execution, it must launch the query and get the first row. On
every other iteration, it will grab a new row. And the third
function helps cleaning memory. So I started to include the sqlite
tutorial code in the blackhole FDW. And it worked great. I had to
write some other functions, specifically the handler and the
validator, but,in an hour, I had something working. Of course, it
wasn't pretty. The database filename was written in the code, with
no option to change it. The query executed remotely was also
written in the code, which means you couldn't change the tablename
without recompiling.&lt;/p&gt;
&lt;p&gt;So I started &lt;/p&gt;[...]</description><guid isPermaLink="false">urn:md5:462ad3d8cbda66332938ec9fa7d95b1d</guid><pubDate>Sun, 09 Jun 2013 08:42:00 GMT</pubDate></item><item><title>Francisco Figueiredo Jr: Npgsql Code First Entity Framework 4.3.1 Sample</title><link>http://fxjr.blogspot.com/2013/06/npgsql-code-first-entity-framework-431.html</link><description>
&lt;br /&gt;
&lt;div class="c1"&gt;After reading the excellent article about &lt;a href="http://brice-lambson.blogspot.com.br/2012/10/entity-framework-on-postgresql.html"&gt;
entity framework on Postgresql&lt;/a&gt; by Brice Lambson, I decided to
write this post to document my experience playing with Entity
Framework 4.3.1 and Npgsql. This post will be an adaptation of the
&lt;a href="http://msdn.microsoft.com/en-us/data/jj193542"&gt;Code First
To a New Database&lt;/a&gt; walkthrough in order to make it work with
Npgsql.&amp;nbsp;&lt;/div&gt;
&lt;div class="c1"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;&lt;span class="c2"&gt;First Steps&lt;/span&gt;&lt;/h3&gt;
&lt;div class="c1"&gt;You should follow the first 4 steps of Code First
To a New Database. Go ahead, I''l wait for you.&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;span class="c2"&gt;Next steps&lt;/span&gt;&lt;/h3&gt;
Here is where the adaptation of the walkthrough begins. As Brice
noted in his post, Npgsql currently doesn't support database
creation. ( I'm working on that and hope to get news about it
soon.) So, for while, you have to create the database
manually.&lt;br /&gt;
&lt;br /&gt;
Those are the steps you have to do to create the database and the
model:&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
First, run this command in the terminal to create the database (or
you can use &lt;a href="http://www.pgadmin.org/"&gt;pgAdmin&lt;/a&gt; if you
prefer a GUI):&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class="c3"&gt;&amp;gt; createdb
ef_code_first_sample&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="c4"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
After that, you have to run the following commands inside the
database you have just created (to simplify permissions, remember
to run this script connected as the same user who is specified in
your connection string):&lt;br /&gt;
&lt;div&gt;&lt;span class="c5"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="c3"&gt;create table "Blog" ("BlogId" serial, "Name"
varchar(255));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="c3"&gt;create table "Post" ("PostId" serial, "Title"
varchar(255), "Content" varchar(8000), "BlogId" int);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="c5"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="c1"&gt;And here comes the first trick you have to use when
working with EF and Npgsql: &lt;b&gt;the table names as well as column
names need to be double quoted&lt;/b&gt;.&amp;nbsp;&lt;/div&gt;
&lt;div class="c1"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="c1"&gt;Entity Framework generates code with table and
column names double quoted and, to Postgresql, using double quotes
means you want to preserve the casing of the names. So you need to
create the tables with the correct case or else, Postgresql will
complain it can't find your tables.&lt;/div&gt;
&lt;div class="c1"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;With the database and tables created, let's make some more
configuration before we can run the sample.&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;Entity Framework installation&lt;/h3&gt;
&lt;div class="c1"&gt;Unfortunately Npgsql doesn't support EF 5.
Currently it supports 4.3.1 and &lt;a href="https://github.com/franciscojunior/Npgsql2/pull/19"&gt;there is a
pull request&lt;/a&gt;&amp;nbsp;by&amp;nbsp;Pēteris Ņikiforovs to add support for
EF 6. Yeah, Npgsql will have support for latest EF v&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;[...]</description><guid isPermaLink="true">tag:blogger.com,1999:blog-15237920.post-2217486797922482034</guid><pubDate>Sat, 08 Jun 2013 21:06:00 GMT</pubDate></item><item><title>Chris Travers: Tangent:  Design thougths about next gen secure communications in today's world</title><link>http://ledgersmbdev.blogspot.com/2013/06/tangent-design-thougths-about-next-gen.html</link><description>With the revelations of massive surveillance by the NSA on
Americans, I have thought a bit about how to securely set up end to
end cryptography in order to offer guarantees of security.&amp;nbsp;
This is by no means limited to offering security relative to
governments, but includes the fact that organized criminals can
mount attacks similar to wiretaps using man in in the middle and
other possible attack techniques.&lt;br /&gt;
&lt;br /&gt;
Designing a perfectly secure system is probably not possible.&amp;nbsp;
A determined enough attacker will be able to gain access to any
communications given enough effort, resources, and
determination.&amp;nbsp; The goals of the system I am describing
however would be to maximize the resources required,&amp;nbsp; and thus
force evesdroppers to focus on only the most valuable targets
possible and causing as narrow compromises as possible.&amp;nbsp;
Additionally metadata is to some extent impossible to protect to
the same extent content is.&lt;br /&gt;
&lt;br /&gt;
In general SSL is good enough for key negotiation etc. if the
system can be made resistant (not perfectly secure) against man in
the middle attacks and if authorities can be sufficiently trusted
and validated over time.&lt;br /&gt;
&lt;br /&gt;
Most key exchange approaches focus solely on minimizing risk at the
moment of key exchange (i.e. reducing synchronic risk).&amp;nbsp; This
approach is different in that it focuses on resistance to exposure
over time (reducing diachronic risk) and seeking to provide as much
notification of compromised communications as possible.&lt;br /&gt;
&lt;br /&gt;
Such an approach will *not* protect people against government
spying in jurisdictions where keys can be demanded via subpoena or
even warrant.&amp;nbsp; However this approach seeks to force
authorities to seek the keys from the people under surveillance and
not rely on digital surveillance.&lt;br /&gt;
&lt;br /&gt;
In general as much as I dislike SSL/TLS (as I dislike pretty much
every attempt to port OSI protocols to TCP/IP) it is well developed
and well understood and the security dimensions of the protocol are
well documented.&amp;nbsp; Additionally unlike IPSec, it is appropriate
for cases where the data may need [...]</description><guid isPermaLink="false">tag:blogger.com,1999:blog-3346090548501966296.post-2418356857599771520</guid><pubDate>Sat, 08 Jun 2013 08:30:00 GMT</pubDate></item><item><title>Michael Paquier: Improvements for pg_top: new features and better user experience</title><link>http://michael.otacoo.com/postgresql-2/improvements-for-pg_top-new-features-and-better-user-experience/</link><description>pg_top is a monitoring tool designed for PostgreSQL in a way
similar to top. When using it you can get a grab at the process
activity of your server with an output similar to that: last pid:
425; load avg: 0.07, 0.03, 0.02; up 0+00:52:08 12:22:02 1
processes: 1 sleeping CPU states: 0.5% user, 0.0% &lt;a href=
"http://michael.otacoo.com/postgresql-2/improvements-for-pg_top-new-features-and-better-user-experience/"&gt;
[...]&lt;/a&gt;
</description><guid isPermaLink="false">http://michael.otacoo.com/?p=1960</guid><pubDate>Fri, 07 Jun 2013 04:00:18 GMT</pubDate></item><item><title>Greg Smith: Help with getting reliable database writes</title><link>http://highperfpostgres.com/2013/06/help-with-getting-reliable-database-writes/</link><description>&lt;p&gt;First today is a PostgreSQL community blogger note. Those of you
who publish to the Planet PostgreSQL blog feed should take a look
at the updated &lt;a href=
"https://wiki.postgresql.org/wiki/Planet_PostgreSQL" target=
"_blank" title="Planet PostgreSQL Policy"&gt;Planet PostgreSQL
Policy&lt;/a&gt;. There’s a new clause there clarifying when it’s
appropriate to mention promotions of commercial products like
books. We’re trying to keep every blog post to the Planet feed
focused on providing useful information, and just informing people
of things like product giveaways doesn’t meet that standard.
Several of these have gone by recently, but moving forward that
will be considered a violation of the rules.&lt;/p&gt;
&lt;p&gt;Speaking of what it’s safe to write about, I’ve published the
next installment in my growing documentation set around disks that
work well with PostgreSQL. &lt;a href=
"http://highperfpostgres.com/disk-plug-pull-testing/" target=
"_blank" title="Disk Plug Pull Testing"&gt;Disk Plug Pull Testing&lt;/a&gt;
covers how to use the diskchecker.pl program to validate your disks
are working as expected for database use. I’m going to include that
information in every disk review I do moving forward, even though I
normally only talk about ones that pass this test. I think it’s
that important to emphasize how vital this is. If someone
recommends a drive and doesn’t explicitly tell you they run a plug
pull test, be suspicious.&lt;/p&gt;
&lt;p&gt;I’m also working on a series of &lt;a href=
"http://highperfpostgres.com/guides/" target="_blank" title=
"Postgres Guides"&gt;Postgres Guides&lt;/a&gt; for how to setup related
hardware like RAID controllers. So far there’s a long discussion of
the &lt;a href=
"http://highperfpostgres.com/guides/lsi-megaraid-setup-for-postgresql/"
target="_blank" title="LSI MegaRAID Setup for PostgreSQL"&gt;LSI
MegaRAID&lt;/a&gt; controllers there. I’m almost done with an Adaptec
controller one too. It’s hard to figure all this out and the
information needed changes regularly. I’m going to make this spot
the primary place I maintain this data at, mainly so I can keep
everything consistent.&lt;/p&gt;
&lt;p&gt;The post &lt;a href=
"http://highperfpostgres.com/2013/06/help-with-getting-reliable-database-writes/"&gt;
Help with getting reliable database writes&lt;/a&gt; appeared first on
&lt;a href="http://highperfpostgres.com"&gt;High Performance
PostgreSQL&lt;/a&gt;.&lt;/p&gt;

</description><guid isPermaLink="false">http://highperfpostgres.com/?p=254</guid><pubDate>Fri, 07 Jun 2013 01:22:47 GMT</pubDate></item><item><title>gabrielle roth: PDXPUG:  June meeting:  Lightning Talks (really)</title><link>http://pdxpug.wordpress.com/2013/06/06/pdxpug-june-meeting-lightning-talks-really/</link><description>&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: 7-9pm Thu June 20, 2013&lt;br /&gt;
&lt;strong&gt;Where&lt;/strong&gt;: Iovation&lt;br /&gt;
&lt;strong&gt;Who&lt;/strong&gt;: Group&lt;br /&gt;
&lt;strong&gt;What&lt;/strong&gt;: Lightning Talks&lt;/p&gt;
&lt;p&gt;Last month we had a surprise special guest – Emily Strickland
spoke to us about the way &lt;a href="http://www.rentrak.com/" target=
"_blank"&gt;Rentrak&lt;/a&gt; uses Postgres. It turned into a big group
discussion, my favorite kind of meeting.&lt;/p&gt;
&lt;p&gt;We’ll be doing &lt;a href=
"http://en.wikipedia.org/wiki/Lightning_Talk"&gt;Lightning Talks&lt;/a&gt;
for our June meeting. This time we mean it &lt;img alt=":)" class=
"wp-smiley" src=
"http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif" /&gt; The
link to sign up is &lt;a href=
"http://www.postgresql.org/message-id/CAHRs-_f9uZmkQiv1KuU+vCnM69CqDLERgma2vihs3s=2hYV6jg@mail.gmail.com"
target="_blank"&gt;on the mailing list&lt;/a&gt;. See the &lt;a href=
"http://pdxpug.wordpress.com/2013/04/25/pdxpug-may-meeting-lightning-talks/"
target="_blank"&gt;May meeting announcement&lt;/a&gt; for more
information.&lt;/p&gt;
&lt;p&gt;Packt has promised us some books to give away as well: a couple
copies each of &lt;a href=
"http://www.packtpub.com/postgresql-90-high-performance/book"
target="_blank"&gt;PostgreSQL 9.0 High Performance&lt;/a&gt; and the
&lt;a href="http://www.packtpub.com/postgresql-9-admin-cookbook/book"
target="_blank"&gt;PostgreSQL 9 Admin Cookbook&lt;/a&gt;, as well as some of
their newer eBooks: &lt;a href=
"http://www.packtpub.com/how-to-postgresql-backup-and-restore/book"
target="_blank"&gt;Instant PostgreSQL Backup and Restore&lt;/a&gt; and
&lt;a href="http://link.packtpub.com/sS2huY" target="_blank"&gt;Instant
PostgreSQL Starter&lt;/a&gt;. You must be present to win, of course.&lt;/p&gt;
&lt;p&gt;–&lt;/p&gt;
&lt;p&gt;Our meeting will be held at Iovation, on the 32nd floor of the
US Bancorp Tower at 111 SW 5th (5th &amp;amp; Oak). It’s right on the
Green &amp;amp; Yellow Max lines. Underground bike parking is available
in the parking garage; outdoors all around the block in the usual
spots. No bikes in the office, sorry!&lt;/p&gt;
&lt;p&gt;Building security will close access to the floor at 7:30.&lt;/p&gt;
&lt;p&gt;After-meeting beer location: Huber’s. See you there!&lt;/p&gt;
&lt;br /&gt;
&lt;a href=
"http://feeds.wordpress.com/1.0/gocomments/pdxpug.wordpress.com/268/"
rel="nofollow"&gt;&lt;img alt="" border="0" src=
"http://feeds.wordpress.com/1.0/comments/pdxpug.wordpress.com/268/" /&gt;
&lt;/a&gt; &lt;img alt="" border="0" height="1" src=
"http://stats.wordpress.com/b.gif?host=pdxpug.wordpress.com&amp;amp;blog=30930172&amp;amp;post=268&amp;amp;subd=pdxpug&amp;amp;ref=&amp;amp;feed=1"
width="1" /&gt;
</description><guid isPermaLink="false">http://pdxpug.wordpress.com/?p=268</guid><pubDate>Fri, 07 Jun 2013 00:19:48 GMT</pubDate></item><item><title>Joshua Drake: The steaming pile that is Precise with kernel 3.2</title><link>http://www.commandprompt.com/blogs/joshua_drake/2013/06/the_steaming_pile_that_is_precise_with_kernel_32/</link><description>I don't know if it is a mainline kernel problem but I can tell you
that on Ubuntu Precise, Linux kernel 3.2 is a disaster for
PostgreSQL. I am not even going to go into a huge rant about it. I
am just posting the numbers. See for yourself. There should be a
public service announcement about it.
&lt;p&gt;before upgrade to 3.9&lt;/p&gt;
&lt;pre&gt;
08:35:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
08:45:01 AM     all     30.91      0.00      5.66     40.05      0.00     23.38
08:55:02 AM     all     29.32      0.00      5.10     39.66      0.00     25.92
09:05:02 AM     all     31.71      0.00      6.24     40.99      0.00     21.06
09:15:01 AM     all     32.45      0.00      6.59     46.74      0.00     14.21
09:25:01 AM     all     20.62      0.00      5.39     60.00      0.00     14.00
09:35:01 AM     all     31.03      0.00      3.61     33.95      0.00     31.41
09:45:01 AM     all     36.54      0.00      3.22     34.13      0.00     26.11
09:55:02 AM     all     40.17      0.00      3.66     30.98      0.00     25.19
10:05:01 AM     all     33.49      0.00      3.04     32.28      0.00     31.19
10:15:01 AM     all     48.63      0.00      2.87     25.50      0.00     23.00
10:25:01 AM     all     51.34      0.00      3.56     26.06      0.00     19.04
10:35:01 AM     all     39.41      0.00      3.44     29.86      0.00     27.29
10:45:02 AM     all     36.07      0.00      8.79     30.94      0.00     24.20
10:55:03 AM     all     38.04      0.00      7.98     32.98      0.00     21.01
11:05:11 AM     all     39.25      0.00      8.81     36.75      0.00     15.19
11:15:02 AM     all     35.19      0.00      8.76     41.98      0.00     14.07
11:25:03 AM     all     38.21      0.00      9.65     38.86      0.00     13.28
11:35:02 AM     all     42.92      0.00     11.66     34.28      0.00     11.14
11:45:02 AM     all     39.40      0.00      9.96     39.03      0.00     11.61
11:55:01 AM     all     28.72      0.00      3.27     36.32      0.00     31.69
&lt;/pre&gt;
&lt;p&gt;after upgrade to 3.9&lt;/p&gt;
&lt;pre&gt;
08:35:02 AM     all     40&lt;/pre&gt;[...]</description><guid isPermaLink="true">http://www.commandprompt.com/blogs/joshua_drake/2013/06/the_steaming_pile_that_is_precise_with_kernel_32/</guid><pubDate>Thu, 06 Jun 2013 19:03:14 GMT</pubDate></item><item><title>David Wheeler: Agile Database Development Tutorial</title><link>http://feedproxy.google.com/~r/justatheory/pgsum/~3/Qjdr5KzGGG0/agile-db-dev.html</link><description>&lt;p&gt;I gave a tutorial at &lt;a href=
"http://www.pgcon.org/2013/"&gt;PGCon&lt;/a&gt; a couple weeks back,
entitled “&lt;a href=
"http://www.pgcon.org/2013/schedule/events/615.en.html"&gt;Agile
Database Development&lt;/a&gt; with Git, Sqitch, and pgTAP.” It went
well, I think. The Keynote document and an exported PDF have been
&lt;a href=
"http://www.pgcon.org/2013/schedule/events/615.en.html"&gt;posted on
PGCon.org&lt;/a&gt;, and also uploaded to &lt;a href=
"https://speakerdeck.com/theory/agile-database-development"&gt;Speaker
Deck&lt;/a&gt;. And embedded below, too. Want to follow along? Clone the
&lt;a href="https://github.com/theory/agile-flipr"&gt;tutorial Git
repository&lt;/a&gt; and follow along. Here’s the teaser:&lt;/p&gt;
&lt;p&gt;&lt;a href=
"http://justatheory.com/computers/databases/postgresql/agile-db-dev.html"&gt;
Read More »&lt;/a&gt;&lt;/p&gt;
&lt;img height="1" src=
"http://feeds.feedburner.com/~r/justatheory/pgsum/~4/Qjdr5KzGGG0"
width="1" alt="" /&gt;
</description><guid isPermaLink="true">tag:justatheory.com,2013:/computers/databases/postgresql/agile-db-dev</guid><pubDate>Thu, 06 Jun 2013 19:02:00 GMT</pubDate></item><item><title>Josh Berkus: First-ever pgCon Unconference: Success</title><link>http://www.databasesoup.com/2013/06/first-ever-pgcon-unconference-success.html</link><description>&lt;div class="separator c2"&gt;&lt;a href=
"http://fuzzychef.smugmug.com/Computers/Postgres-Community/i-jKLNgvL/0/M/IMG_20130525_104630-M.jpg"
class="c1"&gt;&lt;img border="0" height="240" src=
"http://fuzzychef.smugmug.com/Computers/Postgres-Community/i-jKLNgvL/0/M/IMG_20130525_104630-M.jpg"
width="320" alt="" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Our first-ever unconference at pgCon was a smashing success this
year, greatly enhancing collaboration and development for the
upcoming versions of PostgreSQL.&amp;nbsp; Among other things, I think
we got a specification for pluggable storage out of it, which is
far beyond anything I'd expected.&amp;nbsp; Were you there?&amp;nbsp; How
did you like it?&amp;nbsp; Give your feedback in the comments.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator c2"&gt;&lt;a href=
"http://fuzzychef.smugmug.com/Computers/Postgres-Community/i-Wm8vRt2/0/L/IMG_20130525_175418-L.jpg"
class="c1"&gt;&lt;img border="0" height="240" src=
"http://fuzzychef.smugmug.com/Computers/Postgres-Community/i-Wm8vRt2/0/L/IMG_20130525_175418-L.jpg"
width="320" alt="" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
About 75 people attended, and hashed various topics out in 12
discussion sessions. These included expanding PostgreSQL testing,
creating demo databases, enhancing full text search, upcoming JSON
features, pg_upgrade, and of course the two-part Pluggable
Storage/Foreign Data Wrapper discussion.&amp;nbsp; Anyway, it's all on
the wiki if you missed it.&lt;br /&gt;
&lt;br /&gt;
We're definitely doing one next year, so plan to stay an extra day
at pgCon.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
I thank the following people for making the first unconference a
success: Salesforce.com, our unconference sponsor;&amp;nbsp; Stacey
Haysler, Nikhil Sontakke, Susanne Ebrecht, Hartmut and Ian Barwick
for helping to run the event; and Dan Langille, conference
organizer.&amp;nbsp; Thank you folks!&lt;br /&gt;
&lt;br /&gt;
Yes, I know the Unconference was almost two weeks ago, but I lost
my phone in Ottawa and this is the first I could get pictures up.
</description><guid isPermaLink="true">tag:blogger.com,1999:blog-7476449567742726187.post-7894587720513766964</guid><pubDate>Thu, 06 Jun 2013 01:42:00 GMT</pubDate></item><item><title>Joshua Tolley: Window functions in action</title><link>http://blog.endpoint.com/2013/06/window-functions-in-action.html</link><description>&lt;div class="c3"&gt;&lt;a href="https://commons.wikimedia.org/wiki/File"&gt;
&lt;img border="0" src=
"https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Window_boxes%2C_Derry%2C_August_2009.JPG/800px-Window_boxes%2C_Derry%2C_August_2009.JPG"
width="300" alt="" /&gt;&lt;/a&gt;
&lt;p class="c2"&gt;&lt;small class="c1"&gt;Image by Wikimedia user &lt;a href="https://commons.wikimedia.org/wiki/User"&gt;Ardfern&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Yesterday I ran on to a nice practical application of a number
of slightly unusual SQL features, in particular, window functions.
PostgreSQL has had window functions for quite a while now (since
version 8.4, in fact, the oldest version still officially
supported), but even though they're part of the SQL standard,
window functions aren't necessarily a feature people use every day.
As a bonus, I also threw in some common table expressions (also
known as CTEs, also a SQL standard feature), to help break up what
could have been a more confusing, complex query.&lt;/p&gt;
&lt;p&gt;A client of ours noticed a problem in some new code they were
working on. It was possible for users to submit duplicate orders to
the system in quick succession, by double-clicking or something
similar. This was fixed in the code easily enough, but we needed to
clean up the duplicate orders in the database. Which meant we had
to find them. We defined a group of duplicates as all orders
involving the same line items, with one of a set of possible status
codes, created in an interval of less than five minutes by the same
user.&lt;/p&gt;
&lt;p&gt;This discussion of the time interval between two different
records should immediately signal "window functions" (or possibly a
self-join, but window functions are much easier in this case). A
window function takes a set of rows and lets you chop them up into
subsets, processing the subsets in various ways. In this case, we
want to take all the rows in the orders table with a particular
status value, group them by the customer who placed the order as
well as by the items in the order, and then evaluate each of those
groups.&lt;/p&gt;
&lt;p&gt;As might be expected, the items associated with an order are in
a different table from the orders themselves. There are probably
several different ways I could have compared the items; I chose to
accumulate all the items in an order into an array, and compare the
resulting arrays (I imagine this would be awfully slow if orders
had many different items attached to them, but it wasn't a pr&lt;/p&gt;[...]</description><guid isPermaLink="true">tag:blogger.com,1999:blog-7997313029981170997.post-3676872019054840843</guid><pubDate>Wed, 05 Jun 2013 15:48:00 GMT</pubDate></item><item><title>Tatsuo Ishii: Settinng up everything at one time</title><link>http://pgsqlpgpool.blogspot.com/2013/06/settinng-up-everything-at-one-time.html</link><description>While developping pgpool-II 3.3, I created a small script to make
developer's life a little bit easier. However, the tool might be
useful for PostgreSQL/pgpool-II beginners. So I decided to
introduce it in my blog.&lt;br /&gt;
&lt;br /&gt;
The script is called "pgpool_setup".&amp;nbsp; It creates followings by
just one command under current directory. The directory must be
empty. PostgreSQL and pgpool binaries must be installed and in your
command search path beforehand.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;PostgreSQL clusters. You can choose "streaming replication
mode" or "native replication mode". The former you already know, I
assume. The latter is just a set of identical PostgreSQL clusters
except the port numbers are different.&lt;/li&gt;
&lt;li&gt;If you choose streaming replication mode, one primary server
and standby servers are ready after the command runs (even with WAL
archival is enabled).&lt;/li&gt;
&lt;li&gt;By default those PostgreSQL cluster port number start from
11000 and continues 11001, 11002 and so on.&lt;/li&gt;
&lt;li&gt;The port numbers of pgpool and pcp follow.&lt;/li&gt;
&lt;li&gt;One pgpool server, with failover/online recovery/followmaster
command are all set.&lt;/li&gt;
&lt;li&gt;A test database "test" is created.&lt;/li&gt;
&lt;li&gt;pcp commands(which are for pgpool administrator) account and
password are ready for you.&lt;/li&gt;
&lt;/ul&gt;
By running pgpool_setup, you are ready to start pgpool and
PostgreSQL with complete settings (at least for testing pupose) on
your computer. I use this tool to create multiple groups&amp;nbsp; of
pgpool+PostgreSQL set on my laptop.&lt;br /&gt;
&lt;br /&gt;
So here's a sample session.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
$ pgpool_setup&lt;br /&gt;Satrting set up in streaming replication mode&lt;br /&gt;creating startall and shutdownall&lt;br /&gt;creating failover script&lt;br /&gt;creating database cluster /home/t-ishii/work/git.postgresql.org/tmp2/data0...done.&lt;br /&gt;update postgreql.conf&lt;br /&gt;creating pgpool_remote_start&lt;br /&gt;creating basebackup.sh&lt;br /&gt;creating recovery.conf&lt;br /&gt;creating database cluster /home/t-ishii/work/git.postgresql.org/tmp2/data1...done.&lt;br /&gt;update postgreql.conf&lt;br /&gt;creating pgpool_remote_start&lt;br /&gt;creating basebackup.sh&lt;br /&gt;creating recovery.conf&lt;br /&gt;temporarily start data0 cluster to create extensions&lt;br /&gt;temporarily start pgpool-II to create standby nodes&lt;br /&gt;waiting for failover happens...done.&lt;br /&gt; node_id &lt;/pre&gt;[...]</description><guid isPermaLink="true">tag:blogger.com,1999:blog-3802120172110116696.post-304351431272017455</guid><pubDate>Wed, 05 Jun 2013 02:30:00 GMT</pubDate></item><item><title>Thom Brown: 1,001 chained streaming-only replication instances</title><link>http://thombrown.blogspot.com/2013/06/1001-chained-streaming-only-replication.html</link><description>&lt;p&gt;On my laptop I've managed to create 1,001 local chained
(one-to-one) streaming-only (meaning no archive directory)
asynchronous replication instances. The output of the status of the
list is here: &lt;a href=
"https://gist.github.com/darkixion/5694200"&gt;https://gist.github.com/darkixion/5694200&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also tested the promotion of the 1st standby to see if it
would cope with propagation to the final 1,000th standby, and it
worked flawlessly. This didn't work on my copy of Linux Mint
without some adjustments to the kernel semaphores values, and it
does take a while for all the standbys in the chain to reach full
recovery. However, promotion propagation is very fast.&lt;/p&gt;
&lt;p&gt;Try it for yourself (if you have enough RAM that is). You may
find it quicker to use my &lt;a href=
"http://darkixion.github.io/pg_rep_test/"&gt;pg_rep_test tool&lt;/a&gt;.
Just don't do this manually... it'll take far too long.&lt;/p&gt;
&lt;p&gt;Thanks to Heikki for putting in the changes that made this
archiveless cascading replication possible. :)&lt;/p&gt;

</description><guid isPermaLink="true">tag:blogger.com,1999:blog-3748796162921493670.post-7902396275490013256</guid><pubDate>Tue, 04 Jun 2013 18:07:00 GMT</pubDate></item><item><title>Andrew Dunstan: This is what beta is for</title><link>http://adpgtech.blogspot.com/2013/06/this-is-what-beta-is-for.html</link><description>Today on IRC someone who has been testing out the new JSON stuff
complained about a case I hadn't catered for, namely someone
representing a Unicode character outside the Basic Multilingual
Plane as a surrogate pair of characters constructed with the '\u'
JSON escape. This is explicitly allowed in the JSON spec, so it
needs to be handled. It's going to be a bit ugly to fix this, I
suspect, but I'm glad to find out about it now rather than later.
Thank goodness for beta testers.
</description><guid isPermaLink="false">tag:blogger.com,1999:blog-2356137376934964551.post-1922165289678779322</guid><pubDate>Tue, 04 Jun 2013 17:13:00 GMT</pubDate></item><item><title>Chris Travers: New ventures and new directions for this blog</title><link>http://ledgersmbdev.blogspot.com/2013/06/new-ventures-and-new-directions-for.html</link><description>I have agreed to help found a LedgerSMB hosting business called
&lt;a href="http://www.efficito.com/"&gt;Efficito&lt;/a&gt;.&amp;nbsp; We have a
very basic web page up (which is in the process of further
development) but we intend to offer hosting specifically of
LedgerSMB 1.3 and higher to customers who want it.&amp;nbsp; If there
is interest, please feel free to &lt;a href=
"mailto:chris@efficito.com"&gt;email me&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
One thing we have committed to do is to leverage PostgreSQL for the
overall management of our hosting services.&amp;nbsp; We intend to use
the database as a point of original entry, allowing other processes
to enact changes saved in the database.&amp;nbsp; This is something
very different from a standard 3-Tier architecture in that the
entry of data into the database triggers real-world side-effects in
a distributed environment.&lt;br /&gt;
&lt;br /&gt;
Obviously I cannot disclose our full codebase to the world, but I
expect to be covering a number of aspects of how we will use
PostgreSQL, and include small snippets of past or current versions
of the code in these posts.&amp;nbsp; The examples will be naturally
minimalistic and lack the context of the full system, but they
should be interesting from a question of how one works with
PostgreSQL in an automated environment and a number of other
topics.&lt;br /&gt;
&lt;br /&gt;
In essence what started off as a blog about LedgerSMB, which has
expanded to include object-relational design generally, will now be
expanded yet again to include database-centric automation.&lt;br /&gt;
&lt;br /&gt;
I expect to cover&amp;nbsp; a few pieces in the near future including
cross-type referential integrity where inet addresses match cidr
blocks, and the use of ip4r to construct exclusion constraints for
network ranges in table types.&amp;nbsp; The first post is probably
more generally useful because understanding how to manually do
referential integrity can help solve broader problems, like
referential integrity over inheritance trees.&lt;br /&gt;
&lt;br /&gt;
Anyway I hope you enjoy some of the newer areas of focus as well.
</description><guid isPermaLink="false">tag:blogger.com,1999:blog-3346090548501966296.post-5682313992784219433</guid><pubDate>Tue, 04 Jun 2013 12:20:00 GMT</pubDate></item><item><title>Tatsuo Ishii: pgpool-II 3.3 alpha 1 is out!</title><link>http://pgsqlpgpool.blogspot.com/2013/06/pgpool-ii-33-alpha-1-is-out.html</link><description>We are going to release new version of pgpool-II 3.3 soon. Previous
version 3.2 was released in last August. Since then over 12,000
copies are downloaded. 3.2 was very successfull, since 3.1 was only
downloaded only 5,000 in almost same period. So we expect 3.3 to be
even more successfull than 3.2. So what's new in 3.2 anyway?&lt;br /&gt;
&lt;br /&gt;
Well 3.3 focuses on maturing 3.2: especially "watchdog" part. The
watchdog was new in 3.2, allows to prevent a single point of
failure of pgpool itself. I know we already have pgpool-HA, but the
watchdog does more. It can make more than two pgpool's working
together, for example, on line recovery.&lt;br /&gt;
&lt;br /&gt;
In 3.3 the watchdog is much more enhanced:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;New life check method (“heart beat”) added&lt;/li&gt;
&lt;li&gt;Redundant heart beat device support&lt;/li&gt;
&lt;li&gt;Secure protocol for heart beat and other messages&lt;/li&gt;
&lt;li&gt;Interlocking of fail over/fail back/follow maser script&lt;/li&gt;
&lt;li&gt;Monitor and auto restart watchdog process if it goes down&lt;/li&gt;
&lt;/ul&gt;
So please come and try &lt;a href=
"http://www.pgpool.net/download.php?f=pgpool-II-3.3.0-alpha1.tar.gz"&gt;
3.3 alpha&lt;/a&gt; now!&lt;br /&gt;
&lt;br /&gt;
</description><guid isPermaLink="true">tag:blogger.com,1999:blog-3802120172110116696.post-2911281201734102036</guid><pubDate>Tue, 04 Jun 2013 06:57:00 GMT</pubDate></item><item><title>Michael Paquier: Postgres 9.4 devel: MVCC catalog access take 2</title><link>http://michael.otacoo.com/postgresql-2/postgres-9-4-devel-mvcc-catalog-access-take-2-2/</link><description>Based on a 2nd version of the patch implementing MVCC catalog
access, here is a second set of results after the first try done
last week. The same tests as last week are done, aka the backend
startup time and the CREATE/DROP of multiple objects. The formula
used to calculate performance comparison is the same &lt;a href=
"http://michael.otacoo.com/postgresql-2/postgres-9-4-devel-mvcc-catalog-access-take-2-2/"&gt;
[...]&lt;/a&gt;
</description><guid isPermaLink="false">http://michael.otacoo.com/?p=1954</guid><pubDate>Tue, 04 Jun 2013 04:51:19 GMT</pubDate></item></channel></rss>