<?xml version="1.0" encoding="UTF-8" ?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0"><channel><title>Stephen Frost | CrunchyData Blog</title>
<atom:link href="https://www.crunchydata.com/blog/author/stephen-frost/rss.xml" rel="self" type="application/rss+xml" />
<link>https://www.crunchydata.com/blog/author/stephen-frost</link>
<image><url>https://www.crunchydata.com/build/_assets/default.png-W4XGD4DB.webp</url>
<title>Stephen Frost | CrunchyData Blog</title>
<link>https://www.crunchydata.com/blog/author/stephen-frost</link>
<width>256</width>
<height>256</height></image>
<description>PostgreSQL experts from Crunchy Data share advice, performance tips, and guides on successfully running PostgreSQL and Kubernetes solutions</description>
<language>en-us</language>
<pubDate>Tue, 27 Apr 2021 05:00:00 EDT</pubDate>
<dc:date>2021-04-27T09:00:00.000Z</dc:date>
<dc:language>en-us</dc:language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<item><title><![CDATA[ Choice of Table Column Types and Order When Migrating to PostgreSQL ]]></title>
<link>https://www.crunchydata.com/blog/choice-of-table-column-types-and-order-when-migrating-to-postgresql</link>
<description><![CDATA[ An underappreciated element of PostgreSQL performance can be the data types chosen and their organization in tables. For sites that are always looking for that incremental performance improvement, managing the exact layout and utilization of every byte of a row (also known as a tuple) can be worthwhile. ]]></description>
<content:encoded><![CDATA[ <p><em>Contributing author <a href=/blog/author/david-youatt>David Youatt</a></em><p>An underappreciated element of PostgreSQL <a href=/blog/optimize-postgresql-server-performance>performance</a> can be the <a href=/blog/back-to-basics-with-postgresql-data-types>data types</a> chosen and their organization in tables. For sites that are always looking for that incremental performance improvement, managing the exact layout and utilization of every byte of a row (also known as a tuple) can be worthwhile. This is an important consideration for databases that are <a href=/blog/migrating-from-oracle-to-postgresql-questions-and-considerations>migrating</a> from other databases to PostgreSQL as the data types available in PostgreSQL and how they are laid out is unlike many other platforms.<h2 id=when-to-use-the-numericdecimal-data-type-vs-other-numeric-types-in-postgresql><a href=#when-to-use-the-numericdecimal-data-type-vs-other-numeric-types-in-postgresql>When to use the NUMERIC/DECIMAL Data Type Vs. Other Numeric Types in PostgreSQL</a></h2><p>What is important, when trying to squeeze out every bit of performance, is optimizing the organization of your data and minimizing overhead. Much of this is done by the PostgreSQL programmer and the compiler, but there are things you can do to improve performance, including choosing the right column type and order of columns in table definitions.<h2 id=variable-length><a href=#variable-length>Variable length</a></h2><p>The NUMERIC type (same as DECIMAL) makes sense for things like money, because PG stores the value precisely, including decimal places for fractions, and the range of numbers that can be represented precisely is larger than can be represented by an integer or big integer, and supports storing fractional parts of numbers. Computations are precise with no rounding, but the storage format is base-10000 and, importantly, its storage is variable size. There are several options for storing numbers in most databases, including PostgreSQL. The <a href=https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL>PostgreSQL documentation</a> is the authoritative source (or look at the source code) for types to represent numbers.<p>On-disk storage of NUMERIC is actually base-10000, not base-10. This means that there are actually 4 base-10 digits per base-10000 digit and each base-10000 digit takes up 2 bytes. The reason that the variable storage size matters is that variable-length data adds an additional header—1 byte when the variable-length data is less than 127 bytes, 4 bytes otherwise—and even just comparing two numeric values against each other is much more expensive than doing the same for integers or bigints.<p>So, how does this work in practice? Storage of the vast majority of numerics will be less than 127 bytes, in which case you have:<ul><li>1 byte for the length (assuming less than 127 bytes)<li>2 bytes for the numeric header<li>2 bytes for each base-10000 digit (for up to 4 base-10 digits)</ul><p>and therefore, numerics tend to require between 5 and 11 bytes to store.<p>We can compare that against the storage required for integer and bigints using the function pg_catalog.pg_column_size():<pre><code class=language-pgsql>=> select
  c1 as numeric, pg_column_size(c1) as numeric_size,
  c2 as int, pg_column_size(c2) as int_size,
  c3 as bigint, pg_column_size(c3) as bigint_size
from t1;

     numeric      | numeric_size |    int     | int_size |      bigint      | bigint_size
------------------+--------------+------------+----------+------------------+-------------
                1 |            5 |          1 |        4 |                1 |           8
               12 |            5 |         12 |        4 |               12 |           8
              123 |            5 |        123 |        4 |              123 |           8
             1234 |            5 |       1234 |        4 |             1234 |           8
            12345 |            7 |      12345 |        4 |            12345 |           8
           123456 |            7 |     123456 |        4 |           123456 |           8
          1234567 |            7 |    1234567 |        4 |          1234567 |           8
         12345678 |            7 |   12345678 |        4 |         12345678 |           8
        123456789 |            9 |  123456789 |        4 |        123456789 |           8
       1234567890 |            9 | 1234567890 |        4 |       1234567890 |           8
      12345678901 |            9 |            |          |      12345678901 |           8
     123456789012 |            9 |            |          |     123456789012 |           8
    1234567890123 |           11 |            |          |    1234567890123 |           8
   12345678901234 |           11 |            |          |   12345678901234 |           8
  123456789012345 |           11 |            |          |  123456789012345 |           8
 1234567890123456 |           11 |            |          | 1234567890123456 |           8
(16 rows)
</code></pre><p>Looking at this, we can see that 'integer' is always going to be smaller (and faster!) to use than 'numeric', and 'bigint' will be smaller once you get up into the hundreds of millions (and it'll also be faster, of course).<h2 id=alternative-types-with-fixed-length><a href=#alternative-types-with-fixed-length>Alternative Types with Fixed Length</a></h2><p>Unfortunately, people often use the NUMERIC/DECIMAL type when migrating from other databases to PostgreSQL, even though the actual values in a given column are integers (because it’s a primary key, for example). You’ll get far better performance and typically less space used by using either INTEGER or BIGINT in those cases.<p>PG also supports float or double types (REAL and DOUBLE PRECISION, hello FORTRAN), which may be appropriate if exact precision isn’t required (such as with measurements). Of course, PostgreSQL supports the standard SQL type syntax of float(n) where n = 1..24 maps to REAL and n = 25..53 maps to DOUBLE PRECISION, and just float means DOUBLE PRECISION. If you've ever had to be aware of the details of IEEE 754, or know about the related exponent and fraction bits, those ranges will look familiar.<p>Using a fixed width data type likely will be more efficient and can be smaller in space required than NUMERIC (it does depend on the exact values being stored).<h2 id=type-size-alignment-and-order><a href=#type-size-alignment-and-order>Type Size, Alignment, and Order</a></h2><p>If you’re worried about how much space is needed to store your data on disk, and you probably should be, the column order also matters. When doing binary IO, PG accesses binary data in the row directly, doesn’t serialize data. PostgreSQL doesn’t reorder, compress across columns (though a value in a given column may be compressed) or generally make attempts to avoid wasted space. That’s left up to the database designer to consider and decide on.<p>One aspect of this direct mapping from disk to memory is that memory access alignment must be respected, at a minimum for performance but sometimes also for function, depending on the architecture. Meaning that data types must be stored at certain offsets in memory, which can introduce alignment “holes”. To ensure you don’t introduce alignment holes, you should order the columns in your table definition with the largest fixed-width columns first, followed by smaller fixed-width columns, and then variable-length fields at the end.<p>For example, if you have columns with sizes integer, bigint, you would want to create the table with columns in this order: bigint, integer.<p>If you create it as integer, bigint, then you’ll end up with a 4-byte alignment hole (just completely dead and wasted space) between the integer and the bigint.<p>For example:<pre><code class=language-txt>0    4    8   12   16   20   24   28   32
+----+----+----+----+----+----+----+----+
|int4| W  |  bigint |int4|  W |  bigint | ...
+----+----+----+----+----+----+----+----+
</code></pre><p>Where "W" is wasted space, because the bigint will be naturally aligned on an 8-byte address. By reordering the column definitions, you can avoid the wasted space, in memory and for binary storage:<pre><code class=language-txt>0    4    8   12   16   20   24   28   32
+----+----+----+----+----+----+----+----+
| bigint  |  bigint |int4|int4| ...
+----+----+----+----+----+----+----+----+
</code></pre><p>In just this simple example, you have saved 8-bytes of memory and storage, or 8 out of 32 bytes or 25%. Imagine if you have wide rows with many columns, and a large table with many rows.<p>PostgreSQL will tell what size a type is and how it will be aligned with this query:<pre><code class=language-pgsql>SELECT typname,typbyval,typlen,typalign FROM pg_catalog.pg_type ORDER BY 3 DESC,1;
</code></pre><p>Here are the first few lines. Note that length of -1 is a variable length type. Note that several of the wider types are geometric types, and note that uuid is as long as two bigints, which you should keep in mind if you consider using a UUID.<pre><code class=language-pgsql>        typname                | typbyval | typlen | typalign
---------------------------------------+----------+--------+----------
 name                                  | f        |     64 | c
 sql_identifier                        | f        |     64 | c
 box                                   | f        |     32 | d
 lseg                                  | f        |     32 | d
 circle                                | f        |     24 | d
 line                                  | f        |     24 | d
 interval                              | f        |     16 | d
 point                                 | f        |     16 | d
 uuid                                  | f        |     16 | c
 aclitem                               | f        |     12 | i
 timetz                                | f        |     12 | d
 float8                                | t        |      8 | d
 int8                                  | t        |      8 | d
 internal                              | t        |      8 | d
 macaddr8                              | f        |      8 | i
 money                                 | t        |      8 | d
</code></pre><p>and for NUMERIC:<pre><code class=language-pgsql>typname | typbyval | typlen | typalign
---------+----------+--------+----------
 numeric | f        |     -1 | i
(1 row)
</code></pre><h2 id=why><a href=#why>Why?</a></h2><p>Because when PostgreSQL does binary IO to storage, it uses the in-memory storage layout. It doesn't pack and unpack individual items (columns) to minimize size.<h2 id=but-why><a href=#but-why>But Why?</a></h2><p>CPUs want data to be "naturally aligned" to their natural address location. For example, the natural alignment for a byte is on a 1-byte address boundary, for a short integer on a 2-byte address, for a 32-bit integer (and float) on 4-byte address, 64-bit integer (and double) on an 8-byte boundary. RISC CPUs like ARM and MIPS strictly enforce this. If your data is not naturally aligned, you get a runtime error. Intel architectures will adjust misaligned data at runtime, but at a high performance cost. Fortunately, this is mostly controlled by the compiler when the PostgreSQL source code is compiled, though overly clever programmers can cause misalignments.<p>In general, the PostgreSQL source code plus the compiler decides memory alignment for you, but it does not change the order that you define things. You can help by using types with fixed length (not DECIMAL or NUMERIC), and if you can, by declaring your table's columns in order from largest fixed size to smallest fixed size followed by variable sized data like NUMERIC/DECIMAL. Note that ordering your columns like this not only reduces memory use and storage requirements, but also affects performance by resulting in better HW cache use, and better TLB use, but that's getting way off in to the weeds.<p>Note that standard fixed-length types like int2, integer (int4), bigint (int8), REAL (float4), DOUBLE PRECISION (float8) will use CPU native types and instructions, while operations on multi-precision types will be implemented partly in software.<h2 id=summary><a href=#summary>Summary</a></h2><p>The short story is that you can help your performance cause, storage-wise, memory-wise and cpu-wise by:<ul><li>using the NUMERIC/DECIMAL when you really need it, like counting money<li>choosing alternative types like INTEGER, BIGINT, REAL, DOUBLE PRECISION when you don't<li>declaring your tables' columns from largest fixed to smallest fixed size follow by variable length types like NUMERIC/DECIMAL</ul> ]]></content:encoded>
<category><![CDATA[ Production Postgres ]]></category>
<author><![CDATA[ Stephen.Frost@crunchydata.com (Stephen Frost) ]]></author>
<dc:creator><![CDATA[ Stephen Frost ]]></dc:creator>
<guid isPermalink="false">https://blog.crunchydata.com/blog/choice-of-table-column-types-and-order-when-migrating-to-postgresql</guid>
<pubDate>Tue, 27 Apr 2021 05:00:00 EDT</pubDate>
<dc:date>2021-04-27T09:00:00.000Z</dc:date>
<atom:updated>2021-04-27T09:00:00.000Z</atom:updated></item>
<item><title><![CDATA[ How to setup Windows Active Directory with PostgreSQL GSSAPI Kerberos Authentication ]]></title>
<link>https://www.crunchydata.com/blog/windows-active-directory-postgresql-gssapi-kerberos-authentication</link>
<description><![CDATA[ PostgreSQL provides a many authentications methods to allow you to pick the one that makes the most sense for your environment. This guide will show you how to use your Windows Active Directory to authenticate to PostgreSQL via GSSAPI Kerberos authentication. ]]></description>
<content:encoded><![CDATA[ <p><a href=https://postgresql.org>PostgreSQL</a> provides a bevy of <a href=https://www.postgresql.org/docs/current/client-authentication.html>authentication methods</a> to allow you to pick the one that makes the most sense for your environment. One desired implementation that I have found customers wanting is to use Windows <a href=https://en.wikipedia.org/wiki/Active_Directory>Active Directory</a> with PostgreSQL's <a href=https://www.postgresql.org/docs/current/gssapi-auth.html>GSSAPI</a> authentication interface using <a href=https://en.wikipedia.org/wiki/Kerberos_(protocol)>Kerberos</a>. I've put together this guide to help you take advantage of this setup in your own environment.<h2 id=setting-up-windows-active-directory><a href=#setting-up-windows-active-directory>Setting up Windows Active Directory</a></h2><p>The first step in setting up a Windows Active Directory is to create a regular user account. The password can be anything but shouldn't expire and it needs to be unique in the environment. In this instance, we'll use pg1postgres.<p>Once the user account exists, we have to create a mapping between that user account and the service principal and create a keytab file. These steps can be combined using the Windows ktpass command, like so:<pre><code class=language-shell>ktpass /out pg1.keytab /princ postgres@pg1.domain.local@DOMAIN.LOCAL /mapuser pg1postgres /crypto AES256-SHA1 +rndpass /target DOMAIN.LOCAL -ptype KRB5_NT_PRINCIPAL
</code></pre><p>This should create a pg1.keytab file which has to then be copied to the PostgreSQL server on Ubuntu.<p>Lastly, in the Windows system, go into the User account, under Properties for the pg1postgres user, on the 'Account' tab, be sure to check the box that says "This account supports Kerberos AES 256 bit encryption."<h2 id=setting-up-postgresql-on-ubuntu><a href=#setting-up-postgresql-on-ubuntu>Setting up PostgreSQL on Ubuntu</a></h2><p>On the Ubuntu PostgreSQL server, move the pg1.keytab file into /etc/postgresql/, change the ownership to be postgres:postgres and the file mode to be 600.<p>On both the client and servers, the krb5-user package should be installed. In an Active Directory environment, that's likely all that will be required since the rest of the information is available in DNS.<p>In postgresql.conf, configure krb_server_keyfile to point to the keytab file, like so:<pre><code class=language-ini>krb_server_keyfile = '/etc/postgresql/pg1.keytab'
</code></pre><p>In pg_hba.conf, configure the appropriate rows to use the <a href=https://www.postgresql.org/docs/11/gssapi-auth.html>gss authentication mechanism</a>, like so:<pre><code class=language-text>host all all 0.0.0.0/0 gss
</code></pre><p>Once these steps are done, PostgreSQL is ready to accept Kerberos (aka GSSAPI) based authentication from clients.<h2 id=creating-kerberos-users-in-postgresql><a href=#creating-kerberos-users-in-postgresql>Creating Kerberos users in PostgreSQL</a></h2><p>When Kerberos / GSSAPI authentication is used, the "authentication system" user authenticated to PostgreSQL will be user@DOMAIN. In our example, this will be <code>sfrost@DOMAIN.LOCAL</code>. In order for a user to authenticate with Kerberos and log in, that user needs to exist in PostgreSQL, or a mapping needs to exist to map to a user in PostgreSQL. For instance, here is what things look like without a mapping:<p>As a user who can create roles, run:<pre><code class=language-pgsql>postgres=# create user "sfrost@DOMAIN.LOCAL"; CREATE ROLE
</code></pre><p>Then, to log in using Kerberos as that user, run psql like so:<p>(if you do not have a ticket already, run: <code>kinit sfrost@DOMAIN.LOCAL</code>)<pre><code class=language-shell>psql -U sfrost@DOMAIN.LOCAL -h pg1.domain.local -d postgres
</code></pre><p>Note that in Kerberos, a user is always logging into a server and we have to specify what that server is- in this case "-h pg1.domain.local" is telling psql that we want to log into the pg1.domain.local server, even though that's actually the local system. Further, psql, by default, will try to log into PostgreSQL using the current Unix username, which is "sfrost" in this case, but there is no "sfrost" PostgreSQL user, so we have to use <code>-U sfrost@DOMAIN.LOCAL</code> to tell psql to use that username to log in. Alternatively, the user created in PostgreSQL could be "sfrost" and a mapping created to allow the Kerberos user <code>sfrost@DOMAIN.LOCAL</code> to log in as that user. See the PostgreSQL documentation of pg_ident.conf for details.<h2 id=requirements-for-kerberos-authentication><a href=#requirements-for-kerberos-authentication>Requirements for Kerberos Authentication</a></h2><p>There's a number of things which Kerberos depends on for proper authentication:<ul><li>Reverse DNS must be set up and returning the correct result. This is what Kerberos uses to find the service in Active Directory.<li>The clocks on all of the systems need to be reasonably close to each other (within about 5 minutes)<li>The reverse DNS result for the IP that the server is answering on needs to match the service principal used in the ktpass command.<li>If running psql on Windows, it may be necessary to deal with case differences- specifically, the service principal might have to be specified to psql in the connection string, or created in active directory as <code>POSTGRES/pg1.domain.local@DOMAIN.LOCAL</code> instead (though psql on unix systems would then have to use the connection string option).<li>There are additional complications when it comes to integration with Web servers, such as when running pgAdmin4 as an independent web server, because the web server needs to be configured to authenticate with its own service account using SPNEGO, and that service account needs to be configured in Active Directory to allow delegation, and the web client needs to be able to authenticate and delegate authentication to the web server to allow it to log into PostgreSQL. (This would be good to have a dedicated article on).<li>The PostgreSQL server needs to live in the Active Directory domain and in its DNS, or in a domain with a cross-realm trust with the AD server. For a larger environment, with many PostgreSQL servers, it may make sense to have a Unix-based KDC, such as the MIT KDC, and then have a cross-realm trust between the Active Directory environment and the Unix/PostgreSQL environment.</ul> ]]></content:encoded>
<category><![CDATA[ Production Postgres ]]></category>
<author><![CDATA[ Stephen.Frost@crunchydata.com (Stephen Frost) ]]></author>
<dc:creator><![CDATA[ Stephen Frost ]]></dc:creator>
<guid isPermalink="false">https://blog.crunchydata.com/blog/windows-active-directory-postgresql-gssapi-kerberos-authentication</guid>
<pubDate>Mon, 04 Mar 2019 04:00:00 EST</pubDate>
<dc:date>2019-03-04T09:00:00.000Z</dc:date>
<atom:updated>2019-03-04T09:00:00.000Z</atom:updated></item>
<item><title><![CDATA[ A Committer's Preview of PGConf.EU 2016 - Part 3 ]]></title>
<link>https://www.crunchydata.com/blog/a-committers-preview-of-pgconf.eu-2016-part-3</link>
<description><![CDATA[ Part 3, Stephen Frost, major committer to PostgreSQL, wraps up the PGConf.EU 2016 conference. ]]></description>
<content:encoded><![CDATA[ <p>Today, I am wrapping up my preview of next week's <a href=https://2016.pgconf.eu/>PGConf.EU conference</a>. I'm really excited about all of the excellent topics and speakers that we get to choose from! Once again, here's the full <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/>Schedule</a>.<p>On Friday morning, I have to recommend <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/365-arthur-zakirov/><em>Arthur Zakirov and</em></a> <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/164-oleg-bartunov/><em>Oleg Bartunov</em></a>’s talk on <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1362-better-full-text-search-in-postgresql/>Better Full Text Search in PostgreSQL</a></strong>, even if you don’t use any Full Text Search today, they will be discussing the new RUM indexing capability which is currently being worked on.  If that isn’t your thing, then definitely check out <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/352-jan-wieck/><em>Jan Wieck</em></a>’s talk on <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1324-peeking-into-the-black-hole-called-plpgsql-the-new-pl-profiler/>Peeking into the black hole called PL/pgSQL - The new PL profiler</a></strong>.<p>After the coffee break is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/351-marcin-cieslak/><em>Marcin Cieślak</em></a>’s talk which pits <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1323-battleground-keeping-postgresql-port-alive-in-a-mysql-dominated-environment-mediawiki/>PostgreSQL against MySQL for the MediaWiki project</a></strong> and looks to be an extremely interesting talk, though I must admit that <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/185-vik-fearing/><em>Vik</em></a>’s example-driven examination of how useful <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1406-how-did-we-live-without-lateral/><strong>LATERAL</strong></a> is looks like a great talk for anyone who is not familiar with LATERAL.  Next, Crunchy Data's own <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/274-david-steele/><em>David Steele</em></a> is back and talking about <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1369-audit-logging-for-postgresql/>Audit Logging for PostgreSQL</a></strong>, a subject which is near and dear to my heart and one that I am hopeful we will make progress in with PG10 and beyond.<p>Last, but certainly not least, is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/318-stefanie-janine-stolting/><em>Stefanie Janine Stölting</em></a>’s talk coined <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1321-one-database-to-rule-em-all/>One Database to Rule 'em All</a></strong>, which I have to get behind because of the reference to the One Ring and Tolkien’s masterpiece, though also because PostgreSQL’s ability to be the central repository of huge amounts of federated data is just plain amazing and if you aren’t familiar with Foreign Data Wrappers, you need to get familiar with them.<p>The final set of talks on Friday also all look very interesting and I plan to attend them, prior to heading out to the bar!<p>Thanks! ]]></content:encoded>
<author><![CDATA[ Stephen.Frost@crunchydata.com (Stephen Frost) ]]></author>
<dc:creator><![CDATA[ Stephen Frost ]]></dc:creator>
<guid isPermalink="false">https://blog.crunchydata.com/blog/a-committers-preview-of-pgconf.eu-2016-part-3</guid>
<pubDate>Thu, 27 Oct 2016 05:00:00 EDT</pubDate>
<dc:date>2016-10-27T09:00:00.000Z</dc:date>
<atom:updated>2016-10-27T09:00:00.000Z</atom:updated></item>
<item><title><![CDATA[ A Committer's Preview of PGConf.EU 2016 - Part 2 ]]></title>
<link>https://www.crunchydata.com/blog/a-committers-preview-of-pgconf.eu-2016-part-2</link>
<description><![CDATA[ Part 2, Stephen Frost, major committer to PostgreSQL, presents a preview of talks coming up at PGConf.EU 2016 where you can learn the latest PostgreSQL Support Tricks. ]]></description>
<content:encoded><![CDATA[ <p>Today, I will continue with my preview of the exciting talks at the upcoming <a href=https://2016.pgconf.eu/>PGConf.EU</a> conference. In <a href=/blog/a-committers-preview-of-pgconf.eu-2016-part-1>Part 1</a>, I discussed the talks that will happen on Wednesday. Today, I want to dive into the Thursday sessions.<p>Starting in early on Thursday morning,if you haven’t tracked all the fantastic progress we’ve made with PostgreSQL 9.6 then definitely go to <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/1-magnus-hagander/><em>Magnus Hagander</em></a>’s talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1259-whats-new-in-postgresql-96/><strong>What's New in PostgreSQL 9.6</strong></a>.  If all of that is old news to you and you’re looking at PG10 with the other developers, then the talk to be at is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/279-anastasia-lubennikova/><em>Anastasia Lubennikova and</em></a> <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/363-konstantin/><em>Konstantin</em></a>’s on <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1356-page-level-compression-and-encryption-in-postgres/>Page Level Compression and Encryption in Postgres</a></strong>, which is an absolutely amazing and fantastic direction for PostgreSQL to be going in and I’m quite excited about it.<p>Following that, be sure to come to my talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1398-understanding-postgresql-query-plans-aka-explain/><strong>Understanding PostgreSQL Query Plans</strong></a>. ;)<p>After the morning coffee break <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/227-giuseppe-broccolo/><em>Giuseppe Broccolo</em></a> and <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/132-julien-rouhaud/><em>Julien Rouhaud</em></a> will be talking about <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1358-extend-brin-support-to-postgis-block-range-indexing-on-geospatial-data/>Extend BRIN Support to PostGIS: Block Range INdexing on Geospatial Data</a></strong>, which looks like a fantastic capability and an excellent way to have very small but extremely fast indexes on geospatial data.  This is high on my list of talks to check out as we discover more and more cases where we must answer queries based on both time ranges and spatial areas at the same time very quickly.  Following that is a very interesting talk by <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/368-dennis-butterstein/><em>Dennis Butterstein</em></a> known as <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1390-firing-the-interpreter-a-case-study-of-llvm-based-expression-compilation-just-in-time/>Firing the Interpreter. A Case Study of LLVM-based Expression Compilation - Just in Time</a></strong>, which looks like a very interesting way to compile your queries down to a lower level for execution instead of the current approach which works with Executor nodes to implement the query.  Another deep internals talk but one which shows a great deal of promise for almost free order-of-magnitude performance improvements in PostgreSQL.<p>After lunch, I’ll have to go to <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/17-simon-riggs/><em>Simon Rigg</em></a>’s <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1394-hot-other-update-optimizations/><strong><code>HOT</code> &#38 Other <code>UPDATE</code> Optimizations</strong></a> as the mailing lists have been all buzzing about WARM and true secondary indexes and this looks like a very interesting opportunity to extend PostgreSQL in directions we have not reached out to yet.  If internals are not your thing, then both of the other talks look great- <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1319-securing-postgresql/><strong>Securing PostgreSQL</strong></a> is key for every DBA to understand how to do, and if you feel comfortable there, then a nice break would be to check out the <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1350-a-billion-rows-pet-project-on-a-desktop-hardware/><strong>Billion Rows Pet Project</strong></a>.<p>Lastly on Thursday, I would have to recommend <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/57-cedric-villemain/><em>Cédric Villemain</em></a>’s talk on <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1327-transactions-across-multiple-datastores/>Transactions Across Multiple Datastores</a></strong>.  Perhaps you don’t need to deal with that today (though I find that unlikely), but you’ll definitely have to deal with that in the future and it is extremely important to understand the techniques and best practices for scaling across multiple datastores.<p>Also, don’t miss the <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1418-lightning-talks/>Lightning Talks</a></strong> - <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/78-harald-armin-massa/><em>Harald</em></a> does a fantastic job with them and it is a ton of fun.<p>Check back tomorrow for my Part 3 of the PGConf.EU preview in which I discuss Friday's sessions! ]]></content:encoded>
<author><![CDATA[ Stephen.Frost@crunchydata.com (Stephen Frost) ]]></author>
<dc:creator><![CDATA[ Stephen Frost ]]></dc:creator>
<guid isPermalink="false">https://blog.crunchydata.com/blog/a-committers-preview-of-pgconf.eu-2016-part-2</guid>
<pubDate>Wed, 26 Oct 2016 05:00:00 EDT</pubDate>
<dc:date>2016-10-26T09:00:00.000Z</dc:date>
<atom:updated>2016-10-26T09:00:00.000Z</atom:updated></item>
<item><title><![CDATA[ A Committer's Preview of PGConf.EU 2016 - Part 1 ]]></title>
<link>https://www.crunchydata.com/blog/a-committers-preview-of-pgconf.eu-2016-part-1</link>
<description><![CDATA[ Part 1, Stephen Frost, major committer to PostgreSQL, gives an overview of upcoming PGConf.EU 2016 ]]></description>
<content:encoded><![CDATA[ <p>Only one week left til PGConf.EU in Tallinn, Estonia!<p>Next week will be PGConf.EU’s 8th conference, having traveled to many different parts of Europe, and lately moving on a North-East trajectory, two years ago in Madrid, last year in Vienna, is now in Tallinn, Estonia with <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/>another fantastic line-up of talks</a>.<p>Here are the talks which I am most interested in this year.  Warning for the unwary, I’m a PostgreSQL Committer, so I tend to be quite developer heavy when it comes to my talk selections.<p>First off, if you are interested in training, and can manage to find a slot, <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/39-hans-jurgen-schonig/><em>Hans-Jürgen Schönig</em></a>’s <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1291-detecting-performance-problems-and-fixing-them/><strong>Detecting Performance Problems and Fixing Them</strong></a> looks to be a fantastic all-day training class.<p>On to the regular talks, in the first slot on Wednesday are three great talks, my first pick going to <em><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/274-david-steele/>David Steele</a></em> (full disclosure: who also works for Crunchy Data) for his talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1370-reviewing-postgresql-patches-for-fun-and-profit/><strong>Reviewing PostgreSQL Patches for Fun and Profit</strong></a>.  David ran for PostgreSQL 9.6, as Commitfest Manager, what is generally accepted as the toughest Commitfest for any PostgreSQL release- the last one.  If you are interested in helping to get new features into PostgreSQL, this is the talk to be at.  A close second, and more in line with your typical DBA’s role, is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/77-christophe-pettus/><em>Christophe Pettus</em></a>’s talk <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1320-unclogging-the-vacuum/><strong>Unclogging the VACUUM</strong></a>.  Most any PostgreSQL DBA will agree that understanding VACUUM is key to understanding how to get the best out of PostgreSQL (and, perhaps more importantly, how to avoid the worst).<p>In the next slot is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/296-stella-nisenbaum/><em>Stella Nisenbaum</em></a>’s <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1313-becoming-a-sql-guru/><strong>Becoming an SQL Guru</strong></a>, which I strongly encourage anyone who isn’t deeply in with <dfn>Common Table Expressions</dfn> (<abbr>CTEs</abbr>), Lateral joins, or Windowing Functions or other advanced SQL to attend.  SQL is the language you use to talk to the database- learn to talk SQL at a college level instead of early secondary school level.  On the flip side is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/210-petr-jelinek/><em>Petr Jelinek</em></a>’s fantastic talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1376-pglogical-the-logical-replication-for-postgresql/><strong>PGLogical</strong></a>, where he talks about the latest and greatest in logical replication, an excellent alternative to binary replication for many use-cases.<p>Following lunch on Wednesday is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/64-alexander-korotkov/><em>Alexander Korotkov</em></a>’s talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1345-the-future-is-csn/><strong>The Future is CSN</strong></a>, which I tend to agree with and hope to attend, but I caution that it is a very developer and internals oriented talk.  If you are not familiar with transaction IDs, snapshots, XMINs, XMAXs, the ProcArrayLock and other internals, this might not be the talk for you.  If you aren’t up for the hacking talk then perhaps check out <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/34-gianni-ciolli/>Gianni</a>’s <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1373-advanced-sql-with-postgresql/>*<strong>*Advanced**</strong> <strong>SQL</strong></a> talk, or take a break and listen to <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/334-federico-campoli/>Federico</a> talk about <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1273-life-on-a-rollercoaster-backup-and-recovery-with-large-databases/><strong>Large-scale Backup Challenges</strong></a>.<p>In the next slot, my pick is <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/284-andreas-seltenreich/><em>Andreas Seltenreich</em></a>’s talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1364-hunting-postgresql-bugs-with-sqlsmith/><strong>Hunting PostgreSQL Bugs with SQLSmith</strong></a>.  I’m always interested in finding new ways to test PostgreSQL and make sure that we are producing correct results.  For the last two slots of the day, I’m looking at <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/5-jehan-guillaume-ioguix-de-rorthais/><em>Jehan-Guillaume (ioguix) de Rorthais</em></a>’s talk on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1363-paf-auto-failover-and-more/><strong>PAF: Auto Failover and More</strong></a>, followed by <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/369-micha-gutkowski/><em>Michał Gutkowski and</em></a> <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/374-rafal-hawrylak/><em>Rafal Hawrylak</em></a>’s talk on <strong>PostgreSQL in TomTom</strong>, though <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/307-emre-hasegeli/><em>Emre Hasegeli</em></a>’s talk on <strong><a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1274-managing-thousands-of-database-servers/>Managing thousands of Database Servers</a></strong> also looks fantastic, and if you haven’t followed all the developments on <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/session/1360-parallel-query-in-postgresql/><strong>Parallel Query</strong></a>, definitely check out <a href=https://www.postgresql.eu/events/schedule/pgconfeu2016/speaker/159-amit-kapila/><em>Amit Kapila</em></a>’s talk on it during that slot.<p>That pretty much wraps up Wednesday for us. Check back here for my next post which will give you a preview of my favorite talks that will happen on Thursday! ]]></content:encoded>
<author><![CDATA[ Stephen.Frost@crunchydata.com (Stephen Frost) ]]></author>
<dc:creator><![CDATA[ Stephen Frost ]]></dc:creator>
<guid isPermalink="false">https://blog.crunchydata.com/blog/a-committers-preview-of-pgconf.eu-2016-part-1</guid>
<pubDate>Tue, 25 Oct 2016 05:00:00 EDT</pubDate>
<dc:date>2016-10-25T09:00:00.000Z</dc:date>
<atom:updated>2016-10-25T09:00:00.000Z</atom:updated></item></channel></rss>