<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[Tiger Data Blog]]></title>
        <description><![CDATA[Insights, product updates, and tips from TigerData (Creators of TimescaleDB) engineers on Postgres, time series & AI. IoT, crypto, and analytics tutorials & use cases.]]></description>
        <link>https://www.tigerdata.com/blog</link>
        <image>
            <url>https://www.tigerdata.com/icon.ico</url>
            <title>Tiger Data Blog</title>
            <link>https://www.tigerdata.com/blog</link>
        </image>
        <generator>RSS for Node</generator>
        <lastBuildDate>Tue, 07 Apr 2026 10:00:15 GMT</lastBuildDate>
        <atom:link href="https://www.tigerdata.com/blog" rel="self" type="application/rss+xml"/>
        <ttl>60</ttl>
        <item>
            <title><![CDATA[What We’re Excited About PostgreSQL 17]]></title>
            <description><![CDATA[As we count the days until September’s release, here are the features we’re excited about in PostgreSQL 17.]]></description>
            <link>https://www.tigerdata.com/blog/what-were-excited-about-postgresql-17</link>
            <guid isPermaLink="true">https://www.tigerdata.com/blog/what-were-excited-about-postgresql-17</guid>
            <category><![CDATA[PostgreSQL]]></category>
            <dc:creator><![CDATA[Aleksander Alekseev]]></dc:creator>
            <pubDate>Thu, 16 May 2024 12:59:30 GMT</pubDate>
            <media:content medium="image" href="https://timescale.ghost.io/blog/content/images/2024/05/What-we-re-excited-about-postgres-17--1-.png">
            </media:content>
            <content:encoded><![CDATA[<p>The next major PostgreSQL release (PostgreSQL 17) is <a href="https://www.postgresql.org/developer/roadmap/"><u>scheduled for September</u></a>.</p><figure class="kg-card kg-image-card"><img src="https://media.tenor.com/R7dseIrp4N8AAAAC/party-the-office.gif" class="kg-image" alt="" loading="lazy" width="410" height="200"></figure><p>In 2023, PostgreSQL regained the attention it deserves as a rock-solid relational database. It was voted the <a href="https://survey.stackoverflow.co/2023/?ref=timescale.com#most-popular-technologies-database-prof"><u>most popular DB in the Stack Overflow Developer Survey</u></a> and named <a href="https://db-engines.com/en/blog_post/106"><u>database management system of the year by DB-Engines</u></a>. Here at Timescale, we also consolidated our status as fierce PostgreSQL fans: besides having built Timescale on PostgreSQL, we believe PostgreSQL is evolving as a platform and becoming the <a href="https://timescale.ghost.io/blog/postgres-for-everything/"><u>bedrock for the future of data</u></a>. So, excuse us for being a <em>bit </em>excited about PostgreSQL 17.</p><p>In its latest releases, we’ve watched PostgreSQL develop toward higher performance, scalability, security, and compatibility while introducing new features to meet the evolving needs of users and applications, especially enterprise ones. The improvements to privilege administration, logical replication, and monitoring are examples of that. More importantly, during this time, <a href="https://timescale.ghost.io/blog/how-and-why-to-become-a-postgresql-contributor/"><u>we contributed</u></a>, <a href="https://timescale.ghost.io/blog/what-does-a-postgresql-commitfest-manager-do-and-should-you-become-one/"><u>managed commitfests</u></a>, and created new features and products to expand it—from <a href="https://timescale.ghost.io/blog/how-we-made-real-time-data-aggregation-in-postgres-faster-by-50-000/"><u>boosting real-time aggregation by 50,000&nbsp;%</u></a> to <a href="https://docs.timescale.com/ai/latest/"><u>powering production AI applications</u></a>.</p><p>In this blog post, we gathered Timescale contributors and enthusiasts to discuss a few of the most exciting PostgreSQL 17 commits. As we count the days until September, we’ll also examine PostgreSQL’s direction for this release. Finally, we’ll share some of our commits, as we help build up PostgreSQL as a <a href="https://timescale.ghost.io/blog/postgres-for-everything/"><u>versatile development platform for everything</u></a>.&nbsp;</p><h2 id="postgresql-17-where-it-came-from-and-where-it%E2%80%99s-headed">PostgreSQL 17: Where It Came From and Where It’s Headed</h2><p>Looking at the several PostgreSQL 17 commits, <a href="https://www.linkedin.com/in/afiskon/?ref=timescale.com"><u>Aleksander Alekseev</u></a>, long-time PostgreSQL contributor and Timescaler, says significant changes to modernize PostgreSQL are underway. “I believe the future of Postgres is bright,” he notes, adding that “new people are <a href="https://www.postgresql.org/message-id/ccbc2cfa-7711-4a52-bd8e-8746e28550a2%40joeconway.com"><u>joining the project</u></a>.” Perhaps influenced by the new wave of contributors, the changes to PostgreSQL 17 reflect the project’s commitment to embracing modern methodologies and adapting to the ever-evolving tech landscape</p><p>One such notable change in version 17, says Aleksander, is the decision to <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0b16bb8776bb834eb1ef8204ca95dd7667ab948b"><u>drop support for AIX</u></a>, an operating system developed by IBM. AIX, while historically significant, has seen declining usage in recent years, prompting PostgreSQL to reallocate resources towards supporting more widely adopted platforms. This strategic move enables PostgreSQL to focus on enhancing compatibility with modern operating systems.&nbsp;</p><p>While they may seem more focused today, the PostgreSQL community's efforts to make PostgreSQL a solid database for modern data needs were already visible in previous versions, including the current one, PostgreSQL 16. As a specific example, Aleksander mentions the transition from Autotools to the Meson build system. Autotools, a long-standing suite of tools for configuring, building, and installing software packages, has been a stalwart in the development process of PostgreSQL.&nbsp;</p><p>However, with the advent of <a href="https://mesonbuild.com/"><u>Meson</u></a>, a contemporary build system known for its simplicity, speed, and scalability, PostgreSQL managed to streamline its development workflows. Meson offers advantages such as improved performance, easier maintenance, and better cross-platform compatibility, which PostgreSQL currently extends to its users.</p><h2 id="what-we%E2%80%99re-excited-about-postgresql-17">What We’re Excited About PostgreSQL 17</h2><p>Now that we’ve seen where PostgreSQL 17 is headed, let’s discuss some of the commits that have caught our 👀.</p><h3 id="pgcreatesubscriber">pg_createsubscriber</h3><p>Suggested by Timescaler and PostgreSQL contributor <a href="https://br.linkedin.com/in/fabriziomello"><u>Fabrízio de Mello</u></a>, <a href="https://www.postgresql.org/docs/devel/app-pgcreatesubscriber.html"><u>pg_createsubscriber is a new PostgreSQL 17 tool</u></a> that allows users to create a new logical replica from a physical standby server. “The main advantage of this tool over a common logical replication setup is the initial data copy, which can take longer on large databases and have side effects, like autovacuum issues, due to the long-running transaction to copy data from one server to another. This tool will also help reduce the catchup phase,” explains Fabrízio.</p><h3 id="support-for-merge-partitions-and-split-partitions">Support for MERGE PARTITIONS and SPLIT PARTITIONS</h3><p>While <code>ALTER TABLE</code> is a well-known statement that changes the structure of a PostgreSQL table, PostgreSQL 17 comes along with two new commands: <code>MERGE PARTITIONS</code> and <code>SPLIT PARTITIONS</code>. As the name indicates, these new DDL commands merge or split several partitions. “The current implementation has certain limitations though,” says Aleksander. “It works as a single process and holds the <code>ACCESS EXCLUSIVE LOCK</code> on the parent table during all operations. This is why the new DDL commands are not advisable for large partitioned tables under a high load,” he adds.</p><h3 id="add-support-for-incremental-file-system-backup">Add support for incremental file system backup</h3><p>“This is another feature worth mentioning,” says Aleksander. Adding support for incremental file system backup in PostgreSQL enhances the database's ability to perform efficient and effective backups. Incremental backups only save changes made since the last backup (full or incremental). This significantly reduces the volume of data to be backed up compared to full backups, which capture the entire database. And since incremental backups involve less data, the backup process is faster, minimizing the impact on system performance and reducing downtime. </p><p>Developed by Robert Haas, Jakub Wartak, and Tomas Vondra, <a href="http://rhaas.blogspot.com/2024/05/hacking-on-postgresql-is-really-hard.html"><u>this commit has been struggling with stability issues</u></a>, as explained by Robert on his blog. “Hopefully it won’t be reverted (as many other commits this month),” comments Aleksander.</p><h3 id="enable-the-failover-of-logical-slots">Enable the failover of logical slots&nbsp;</h3><p>Picked by two Timescalers, Fabrízio and our head of Developer Advocacy, <a href="https://twitter.com/jamessewell"><u>James Blackwood-Sewell</u></a>, this commit by Hou Zhijie, Shveta Malik, and Ajin Cherian lets high-availability <a href="https://www.timescale.com/learn/postgresql-database-replication-guide"><u>PostgreSQL use logical replication</u></a> and not lose downstream data in case of a failover. Enabling the failover of logical replication slots in PostgreSQL enhances the robustness and reliability of logical replication setups by allowing logical slots to be transferred and maintained across different database instances.</p><h3 id="allow-explain-to-report-optimizer-memory-usage">Allow EXPLAIN to report optimizer memory usage</h3><p>“This commit by Ashutosh Bapat is another good one,” notes Aleksander. Allowing the <code>EXPLAIN</code> command to report optimizer memory usage in PostgreSQL provides valuable insights into the resources consumed by the query planner and optimizer during the preparation of query execution plans.“It will allow the developer to choose the query that uses less memory,” explains Aleksander. This makes it especially helpful for those trying to fine-tune PostgreSQL’s performance.</p><div class="kg-card kg-callout-card kg-callout-card-purple"><div class="kg-callout-emoji">💻</div><div class="kg-callout-text"><a href="https://www.timescale.com/learn/postgres-guides#:~:text=Overview-,Performance,-Guide%20to%20PostgreSQL"><u>If you’re struggling to improve your PostgreSQL performance, these resources will help you get the most out of your database</u></a>.</div></div><p><br><br>Any on this list, really</p><p><a href="https://timescale.ghost.io/blog/how-postgresql-aggregation-works-and-how-it-inspired-our-hyperfunctions-design/"><u>Bruce Momjian has always been an inspiration to us—bow tie included</u></a>—so we can safely say that any of the contributions <a href="https://momjian.us/pgsql_docs/release-17.html#RELEASE-17-SERVER"><u>on this list</u></a>, which Aleksander describes as “overall performance improvements” make us excited about getting our hands on the new PostgreSQL version.&nbsp;</p><h2 id="what-we-committed-to-postgresql-17">What We Committed to PostgreSQL 17</h2><p>In total, 90 commits (3.5 percent of all commits) were authored, co-authored, and/or reviewed by Timescalers during the PostgreSQL 17 cycle. 😎We’re not going to bother you by going over all of them, but we asked our team of upstreamers to name some of their personal favorites.</p><h3 id="the-slru-move-to-64-bit-indexes">The SLRU move to 64-bit indexes</h3><p>“Personally, I’m most excited about the series of patches that moved SLRU (simple least recently used) caches to the 64-bit indexes,” says Aleksander. While we’re not there yet, this opens the path to 64-bit XIDs, which will mitigate the problem of <a href="https://timescale.ghost.io/blog/how-to-fix-transaction-id-wraparound/"><u>XID wraparound</u></a> certain users face under specific workloads, such as mixing long-living OLAP (online analytical processing) transactions and <a href="https://www.tigerdata.com/learn/understanding-oltp" rel="noreferrer">OLTP</a> (on-line transaction processing) workloads on the same PostgreSQL instance.&nbsp;</p><h3 id="transitive-comparisons">Transitive comparisons</h3><p>Another Timescaler who contributed to PostgreSQL was database architect <a href="https://se.linkedin.com/in/matskindahl"><u>Mats Kindahl</u></a>. Mats helped with refactoring to ensure transitive comparisons in PostgreSQL, which brings several benefits to users. Transitive comparisons allow for more concise and intuitive query expressions, improve <a href="https://www.tigerdata.com/blog/best-practices-for-query-optimization-in-postgresql" rel="noreferrer">query optimization</a>, enhance index usage, and facilitate data modeling, as developers can define relationships between entities more naturally.</p><h3 id="standardexplainonequery">standard_ExplainOneQuery</h3><p>Mats also worked on the introduction of&nbsp; <code>standard_ExplainOneQuery</code> in PostgreSQL 17. This addition helps ensure consistent behavior when adding explain hooks, making it easier to predict and understand the effects of explain hooks on query explanation. Developers can focus on implementing specific hooks without worrying about the nuances of query explanation behavior, leading to more efficient development processes and facilitating query performance tuning.</p><h3 id="uuidv7">UUIDv7</h3><p>On the reviewing front, Aleksander reviewed (along with other contributors) the <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=794f10f6b920670cb9750b043a2b2587059d5051"><u>partial merge of UUIDv7 support</u></a> authored by Andrey Borodin. “While there are several UUIDv7 implementations available, the UUIDv7 standard is currently in draft condition,” explains Aleksander, adding that PostgreSQL will only support when the standard is finalized. Once it’s fully supported by PostgreSQL, UUIDv7 will help make time-based queries more efficient.&nbsp;</p><h2 id="expanding-postgresql">Expanding PostgreSQL</h2><p>Here you have it, a reflection on the direction of PostgreSQL 17, the new updates we’re excited about, and some of the contributions we made. If like us, you want to carry on (or start) building on PostgreSQL, give Timescale a try. Features like hypertables (automatically partitioned PostgreSQL tables), continuous aggregates (automatically refreshed materialized views), and advanced data management techniques will significantly enhance PostgreSQL's ability to manage your most demanding workloads effectively.</p><p>If you want to expand PostgreSQL’s capabilities while using the PostgreSQL you know and love, <a href="https://console.cloud.timescale.com/signup"><u>create a free Timescale account today</u></a>. </p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How (and why) to become a PostgreSQL contributor]]></title>
            <description><![CDATA[Contributing to open-source projects can be intimidating – and PostgreSQL is no exception. As a long-time PostgreSQL contributor, Aleks shares his hard-earned tips to help you make your first contribution, or contribute more.]]></description>
            <link>https://www.tigerdata.com/blog/how-and-why-to-become-a-postgresql-contributor</link>
            <guid isPermaLink="true">https://www.tigerdata.com/blog/how-and-why-to-become-a-postgresql-contributor</guid>
            <category><![CDATA[Engineering]]></category>
            <category><![CDATA[PostgreSQL]]></category>
            <dc:creator><![CDATA[Aleksander Alekseev]]></dc:creator>
            <pubDate>Thu, 17 Jun 2021 13:02:28 GMT</pubDate>
            <media:content medium="image" href="https://timescale.ghost.io/blog/content/images/2021/06/neil-and-zulma-scott-hjv3VO-jpnc-unsplash.jpg">
            </media:content>
            <content:encoded><![CDATA[<p><em>Contributing to open-source projects can be intimidating – and PostgreSQL is no exception. As a long-time PostgreSQL contributor, Aleks shares his hard-earned tips to help you make your first contribution, or start contributing more.</em></p><p>PostgreSQL is one of the <a href="https://db-engines.com/en/blog_post/85">most popular and loved databases in the world</a>. It’s no secret that we are big fans of PostgreSQL at Timescale: We’ve built TimescaleDB on top of it, we employ open-source PostgreSQL contributors (<a href="https://www.linkedin.com/in/afiskon/">like me</a>!), and we’ve developed features to make using PostgreSQL better for time-series scenarios (like <a href="https://timescale.ghost.io/blog/blog/how-we-made-distinct-queries-up-to-8000x-faster-on-postgresql/">Skip Scan</a>, which makes certain queries in PostgreSQL 8000x faster). But, in addition to helping improve the database itself, we’re committed to the success of the PostgreSQL community at large. </p><p>Open-source is not just my passion; it’s my career. I’ve been a PostgreSQL contributor since 2016, and recently joined Timescale as a full-time open-source PostgreSQL contributor. I’ve contributed not only to PostgreSQL but also to <a href="https://github.com/insolar/insolar">Insolar</a>, <a href="https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff;h=f62e32bce4edf84dd415d3d494535d8b9a65e365">Sigrok</a>, and other open-source projects. I’m the author of <a href="https://github.com/afiskon/pg_protobuf">pg_protobuf</a> and <a href="https://github.com/postgrespro/zson">ZSON</a> extensions for PostgreSQL and <a href="https://github.com/afiskon/stm32-ssd1306">several</a> open-source <a href="https://github.com/afiskon/stm32-si5351">libraries</a> for STM32 microcontrollers.</p><p>I love open-source because it enables us to see what’s inside the software, learn from it, and improve it. The quality standards are higher in open-source software than in proprietary software because you can’t hide any cut corners. Last but not least, open-source software can’t refuse to sell or prolong your license because of geopolitical events or whatnot. (I encountered this at least twice in my career.)</p><p>Which brings me to the impetus for this post. Earlier this year, we ran the “State of PostgreSQL” survey to learn how people use PostgreSQL, from their community experiences to popular tools and areas to improve. </p><p>You can see the <a href="https://www.timescale.com/state-of-postgres-results">State of PostgreSQL 2021</a> report to explore all findings and trends – but one result stood out for me:<br></p><blockquote><strong>85% of respondents haven’t contributed to PostgreSQL codebase, docs, or commitfests, and only 4% have contributed several times.</strong></blockquote><p>The survey also highlighted several places where we, as a PostgreSQL community, can be more welcoming to new developers to help them use<em> and</em> contribute to PostgreSQL.</p><p>For example, one respondent said: “First code contributions can be traumatic...sometimes we’re not very welcome [sic] with new developers. We should improve...”</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://timescale.ghost.io/blog/content/images/2021/06/State-of-PG_Contributions_Updated.png" class="kg-image" alt="Graph showing contribution percentages of Postgres users." loading="lazy" width="1390" height="986" srcset="https://timescale.ghost.io/blog/content/images/size/w600/2021/06/State-of-PG_Contributions_Updated.png 600w, https://timescale.ghost.io/blog/content/images/size/w1000/2021/06/State-of-PG_Contributions_Updated.png 1000w, https://timescale.ghost.io/blog/content/images/2021/06/State-of-PG_Contributions_Updated.png 1390w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">85% of respondents in the </span><a href="https://www.timescale.com/state-of-postgres-results"><span style="white-space: pre-wrap;">2021 State of PostgreSQL survey</span></a><span style="white-space: pre-wrap;"> haven’t contributed to the PostgreSQL codebase, docs, or commitfests</span></figcaption></figure><p>That got me thinking about how we can make it easier for folks to overcome the initial fear and other barriers - be it technical difficulty, confusing processes, or lack of information - that often surround contributing to an open-source project. After all, we want more people to be a part of the PostgreSQL community and to make contributions; that’s how we make it even better.</p><p>To help more people get started, I wanted to share my observations, what I’ve learned over the past 5+ years, what I wish I knew when I started, and advice I typically give new contributors. </p><p>In my experience, little depends on the specifics of the project. So, while I’ll use PostgreSQL-specific examples, the following guidance is quite universal, whether you want to contribute to PostgreSQL for the first (or second, or third) time – or have another open-source project in mind. </p><p>I also included a few ways to give back to the community or help a project grow <em>beyond </em>code contributions: the important, yet easily overlooked, elements of building a sustainable, healthy open-source community.</p><h2 id="step-1-identify-your-motivation">Step #1: Identify your motivation</h2><p>One of the most important questions to ask is: “Why do you want to be an open-source contributor?” Unless you recognize and understand your motivation, it will be difficult for you to find time for the project, especially as time goes on. </p><p>Here is a list of potential reasons why you might want to start working on an open-source project:</p><p><strong>To gain a unique experience:</strong> If you're a backend developer who's been writing microservices for a while, you might look for a new challenge. Open-source software presents many (many!) such challenges and new technologies to learn.</p><p><strong>To learn the internals of your favorite operating system/ database/ language/ compiler:</strong> Understanding the internals of your favorite open-source project allows you to use it more efficiently and to learn its limitations. As an example, not many users know that running SELECT queries <a href="https://wiki.postgresql.org/wiki/Hint_Bits">may cause</a> <em>writes </em>to the disk by PostgreSQL. Or that <a href="https://www.postgresql.org/message-id/20160729141552.4062e19b%40fujitsu">creating multiple temporary tables</a> may significantly affect the performance of the entire database. Or that <code>synchronous_commit = remote_apply</code> doesn’t actually wait for replicas before committing the transaction. (The transaction is committed instantaneously. The user is just not notified about this, which <a href="https://www.postgresql.org/message-id/CAJ7c6TNp=9STwXX_1Rvp+OpszHqtMKXqUJcAXwgz9w95P8J56Q@mail.gmail.com">may cause problems</a>.)</p><p><strong>To work with great people:</strong> Open-source attracts some of the most talented people from around the world. There is always something you can learn from them, big or small. The original idea of the <a href="https://github.com/postgrespro/zson">ZSON extension</a> came from <a href="https://akorotkov.github.io/">Alexander Korotkov</a> and <a href="http://www.sigaev.ru/">Teodor Sigaev</a>, both PostgreSQL committers I was lucky to work with. ZSON is now the most popular project I have on GitHub (390+ stars at the moment of writing) – and <a href="https://commitfest.postgresql.org/33/3152/">there is a possibility</a> that it will be shipped with PostgreSQL by default.</p><p><strong>To make users happier: </strong>Let’s say <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=44ca4022f3f9297bab5cbffdd97973dbba1879ed;hp=ea4b8bd6188ecb17ba37d">you contributed several lines of code</a> and, as a result, made PostgreSQL 10% faster in some scenarios. PostgreSQL is used by thousands of companies whose products are used by millions of customers. It’s satisfying to realize that your small patch made all of these users just a little bit happier, even if you might not explicitly hear from them.</p><p><strong>To boost your resume:</strong> It’s natural to seek a job that better suits you. Several years of contributing to a well-known open-source software will open new doors for you, from more technical experience to connections with various community members who you may wind up working with later.</p><p>To be fair, there are probably dozens of other reasons why you might want to start contributing to an open-source project. This list isn’t exhaustive, and each case is unique, but I tried to distill a few of the reasons I see again and again.</p><p>Once you’ve taken some time to reflect on and establish <em>why </em>you want to contribute, the next step is to familiarize yourself with the project’s development process.</p><h2 id="step-2-learn-about-the-development-process">Step #2: Learn about the development process</h2><p>Before starting the work on a new patch, there are several things to learn about the project:</p><ul><li>How to compile the code</li><li>How to run the tests</li><li>How to build the documentation</li><li>How to debug / profile / benchmark the code</li><li>How to format the code</li><li>How to submit a patch</li></ul><p>You can usually find this information, or most of it, in the project’s GitHub README or somewhere in the documentation. For PostgreSQL, <a href="https://www.postgresql.org/docs/current/installation.html">look at the installation docs</a>.</p><p>PostgreSQL is written in C, uses the <a href="https://en.wikipedia.org/wiki/GNU_Autotools">GNU Autotools</a> build system, and relies on Perl scripting language for testing and SGML for documentation. It uses Git as the version control system, and the repository itself is self-hosted (although there is a <a href="https://github.com/postgres/postgres">mirror on GitHub</a>).</p><p>PostgreSQL can be compiled and tested like this:</p><pre><code class="language-SQL">git clone http://git.postgresql.org/git/postgresql.git
cd postgresql
./configure --prefix=/home/user/pginstall --enable-tap-tests --enable-cassert --enable-debug
make world
make check-world</code></pre><p>The details are a little bit more complicated, though. Firstly, you have to install <a href="https://wiki.postgresql.org/wiki/Compile_and_Install_from_source_code#Build.2Binstall_the_source_code">several dependencies</a>, which is done differently depending on the operating system. </p><p>For instance, on Ubuntu 20.04 LTS you will need:</p><pre><code class="language-SQL"># for basic build
sudo apt install gcc make flex bison libreadline-dev zlib1g-dev
# to build the documentation as well
sudo apt install docbook docbook-dsssl docbook-xsl libxml2-utils \
openjade opensp xsltproc</code></pre><p>Secondly, there are several <a href="https://www.postgresql.org/message-id/559708.1618930923@sss.pgh.pa.us">common mistakes</a> that you can make, e.g., forgetting to run <code>make distclean</code> after changing the header files. </p><p>There is a <a href="https://github.com/afiskon/pgscripts">set of scripts</a> on GitHub which will help you to avoid these mistakes. </p><p>Here is how to use it:</p><pre><code class="language-SQL"># where to install Postgres (you can add this line to your ~/.bash_profile)
export PGINSTALL="/home/user/pginstall"
# build and test Postgres
./full-build.sh
# install it to $PGINSTALL
./single-install.sh
# execute a little more tests on running Postgres
make installcheck-world
# check the documentation:
open ~/pginstall/share/doc/postgresql/html/index.html</code></pre><p>Additionally, the PostgreSQL community uses mailing lists as the main communication channel for discussions <em>and </em>submitting and reviewing patches. </p><p>To get an idea of the types of messages, subscribe to <a href="https://www.postgresql.org/list/pgsql-hackers/">pgsql-hackers@</a> (be aware that there are many messages per day on this mailing list). Two other important mailing lists are <a href="https://www.postgresql.org/list/pgsql-general/">pgsql-general@</a> and <a href="https://www.postgresql.org/list/pgsql-bugs/">pgsql-bugs@</a>, and there are <a href="https://www.postgresql.org/list/">many others</a> for assorted topics. </p><p>(As an aside: in the State of PostgreSQL survey, in going through the <a href="https://drive.google.com/drive/u/0/folders/10SZ8XMOKkwZ848bQ5GnMf_JnlrNVmOAO">anonymized survey source data</a>, a number of responses mentioned that the mailing lists weren’t the friendliest way to track bugs and may be a barrier to getting involved. For example,<em> “Mailing lists are considered "hard" by people nowadays. Not the most welcoming interface for interacting with the community for quite a large number of people I'd expect</em>.”)</p><p>After you’ve gotten familiar with the development process, it’s time to start thinking about ideas for your first patch.</p><h2 id="step-3-identify-your-first-patch">Step #3: Identify your first patch</h2><p>Your first patch doesn’t have to be anything fancy. Here are several examples that I think make good first patches, both for PostgreSQL and as general places to start:</p><p><strong>Find and fix mistakes in comments and documentation.</strong> Start with something simple. In my experience, projects are bound to have <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=2d8a1e22b109680204cb015a30e5a733a233ed64;hp=aa698d753566f68bdd54881d30b1a515b0327b0e">typos</a> and <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=090b287fc59e7a44da8c3e0823eecdc8ea4522f2;hp=cc402116ca156babcd3ef941317f462a96277e3a">mistakes</a> in the code comments and in the documentation. Use your favorite text editor with a spell checker to find them. This is a really great place to start and overcome the fear of contributing: that there is no risk of breaking anything. Interestingly, this is exactly how I submitted <a href="https://github.com/torvalds/linux/commit/3409f9ab71d7db96eed849f49a6c8116c62dc251">my first (and so far the only) patch</a> to the Linux kernel. (My <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cc988fbb0bf60a83b628b5615e6bade5ae9ae6f4;hp=879d71393de001880e031">first patch</a> to PostgreSQL was rather complicated and thus not very representative.)</p><p><strong>Participate in code review, testing, and discussions.</strong> Many software developers like to write the code, but few like to review and test it. One of the most valuable contributions one can make to PostgreSQL is <a href="https://wiki.postgresql.org/wiki/Reviewing_a_Patch">being a reviewer</a>. As a reviewer, your primary task is to check that the patch compiles, passes the tests, implements the claimed functionality, and includes documentation. And, of course, it’s worth checking that it doesn’t have any obvious bugs.</p><p><strong>Find and fix a bug.</strong> Check the bugtracker, or, in the case of PostgreSQL, check the archive of <a href="https://www.postgresql.org/list/pgsql-bugs/">pgsql-bugs@</a> mailing list. Try to reproduce the bug. If it doesn’t reproduce, it might already be fixed by another patch, or maybe the steps to reproduce it aren’t very clear. In any case, reply to the mailing list to let the community know what you find. If you managed to reproduce the bug, you are lucky; from there, write a corresponding test and change the code so that it passes the test.</p><p><strong>Find a bottleneck and optimize the code.</strong> After using a piece of software for a while, you discover cases when its performance is far from ideal. Use suitable tools (e.g., <a href="https://www.brendangregg.com/perf.html">perf</a> and <a href="https://www.brendangregg.com/ebpf.html">eBPF</a>) to find the bottleneck and then eliminate it. Before submitting the patch, <a href="https://www.postgresql.org/message-id/20151224111925.56e267e9%40fujitsu">make sure it doesn’t cause performance degradation</a> in some other scenarios.</p><p><strong>Write tests.</strong> Use a suitable tool to test code coverage. For PostgreSQL (C or C++), that tool would be <code>lcov</code>. With a code coverage report on hand, write a test that increases the code coverage.</p><p><strong>Improve documentation.</strong> Ideally, documentation is structured in a way that allows users to download it as a PDF and read it like a book. PostgreSQL documentation is quite good in terms of covering many - many! - topics, but could benefit from more experienced/dedicated technical writers (e.g., people who could add more sample scenarios and illustrations to help new users understand concepts). With PostgreSQL, there are <a href="https://www.postgresql.org/docs/">71 chapters and 2300+ pages in total</a>, and the pages mostly describe configuration parameters and query syntax vs. examples of how to solve concrete tasks. <a href="https://docs.freebsd.org/en/books/handbook/">The FreeBSD Handbook</a> comes to mind as a good “read it like a book” example.  </p><p><strong>Refactor the code.</strong> Refactoring has a clear goal: you rewrite the code so that it does the same thing but is more readable. It’s worth noting that sometimes the PostgreSQL community can be a little skeptical about the value of such patches. The reason is that the community supports the last 5 major releases of PostgreSQL, so refactorings can make backporting of bugfixes more complicated.</p><p>I recommend accumulating small wins - by submitting several “first patch”-like contributions - before you move on to more ambitious patches. This will help you get familiar with the contribution process, tools, and community – not to mention increasing your confidence.</p><p>Once you’ve settled on an idea for your first patch, you’re all set to go ahead and start contributing! (I recommend reading the following section about common mistakes to avoid first 😊).</p><h2 id="step-4-prepare-to-contribute-how-to-avoid-common-mistakes">Step #4: Prepare to contribute: how to avoid common mistakes</h2><p>There are a few common “mistakes” people make when joining an open-source project, so I’ve compiled the following pieces of advice to help you to avoid some of these mistakes.</p><ul><li>Start with something simple</li><li>The smaller your patch, the more are chances that it will be accepted</li><li>Listen carefully to the feedback on your patch</li><li>Always be polite (including: never be sarcastic, trolling, etc...)</li><li>Not all patches get accepted, don’t take it personally</li><li>Contributors are people too; most people work on open source in their spare time</li><li><a href="https://grammarly.com/">Grammarly</a> is a great help for those of us for whom English is a second language (and native speakers too)</li></ul><p>Thus far, I’ve focused my discussion on contributing patches with new code or bugfixes. But, submitting patches is not the be-all and end-all of contributing to open-source projects.</p><p>Next, we’ll look at how to contribute to open-source projects and the surrounding community <em>without </em>writing code.</p><h2 id="step-5-consider-contributing-beyond-code">Step #5: Consider contributing beyond code</h2><p>There are many ways to contribute to a project besides writing the code and documentation – and these non-code contributions are invaluable. </p><p>Here are several of my favorite ideas, although the list does not claim to be complete:</p><p><strong>Help newcomers.</strong> There are always people who recently started to use a given open-source project (for reference, in the State of PostgreSQL survey, almost 50% of respondents said they were new-ish to the project, with 0-5 years experience.) Usually, there is a <a href="https://www.postgresql.org/list/pgsql-novice/">mailing list</a> and/or <a href="https://postgresteam.slack.com/">Slack</a> where they can ask questions. Join the corresponding channel and help newcomers.</p><p><strong>Participate in conferences.</strong> Make a presentation on something you used, learned, or have been working on lately. Share the knowledge. For PostgreSQL, there are several popular conferences, like <a href="https://pgconf.asia/EN/">PGconf.asia</a>, <a href="https://postgreslondon.org/">Postgres London</a>, and <a href="https://pgconf.us">PGconf.us</a>, as well as many local meetups.</p><p><strong>Create a blog / podcast / YouTube channel.</strong> This article, for instance, can be considered as a small contribution to open-source. Make sure your blog, podcast, etc., is added to the prominent community news aggregator(s), so people can learn about it. For PostgreSQL, this is <a href="https://planet.postgresql.org/">PostgreSQL Planet</a>.</p><p><strong>Write a book.</strong> Writing a book is an ambitious and very time-consuming goal, but there are many ways to do so. For example, <a href="https://www.manning.com/">Manning</a> is a publisher well known for helping new technical writers to publish their first book; or simply make a PDF in Google Docs and distribute it for free. </p><p><strong>Participate in Google Summer of Code or Google Season of Docs.</strong> <a href="https://summerofcode.withgoogle.com/">Google Summer of Code</a> (GSoC) is a program focused on bringing student software developers into open-source development. Participate as a student or as a mentor. If you are a technical writer, consider participating in <a href="https://developers.google.com/season-of-docs">Google Season of Docs</a> (GSoD). See <a href="https://wiki.postgresql.org/wiki/GSoC">GSoC</a> and <a href="https://wiki.postgresql.org/wiki/GSoD">GSoD</a> pages on PostgreSQL Wiki for more information.</p><p><strong>Donate hardware for CI system. </strong>CI stands for <a href="https://en.wikipedia.org/wiki/Continuous_integration">continuous integration</a> — and in the PostgreSQL world, it’s called <a href="https://buildfarm.postgresql.org/cgi-bin/show_status.pl">Buildfarm</a>. The community is interested in adding unusual platforms or combinations of architecture, operating system, and compiler to the Buildfarm. As an example, currently, there is no server with <a href="https://riscv.org/">RISC-V</a> architecture. RISC-V is an open instruction set architecture (ISA) that gets support from many leading hardware manufacturers, especially after the discovery of Meltdown and Spectre vulnerabilities. See <a href="https://buildfarm.postgresql.org/cgi-bin/register-form.pl">Application to join PostgreSQL Buildfarm</a><strong> </strong>for more details.</p><h2 id="resources-to-learn-more">Resources to learn more</h2><p>The following additional materials are recommended for self-study in the context of contributing to PostgreSQL:</p><ul><li><a href="https://www.oreilly.com/library/view/c-in-a/9781491924174/">C in a Nutshell, 2nd Edition</a> by Peter Prinz, Tony Crawford</li><li><a href="https://autotools.io/index.html">Autotools Mythbuster</a> by Diego Elio Pettenò, David J. Cozatt</li><li><a href="https://www.amazon.com/Learning-Perl-Making-Things-Possible/dp/1491954329/">Learning Perl</a> and <a href="https://www.amazon.com/Intermediate-Perl-Beyond-Basics-Learning/dp/1449393098/">Intermediate Perl</a> by Randal L. Schwartz, et al.</li><li><a href="https://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672/">Refactoring</a> by Martin Fowler, et al.</li><li><a href="https://www.amazon.com/Systems-Performance-Brendan-Gregg/dp/0136820158/">Systems Performance, 2nd Edition</a> by Brendan Gregg</li><li><a href="https://www.amazon.com/Performance-Tools-Addison-Wesley-Professional-Computing/dp/0136554822/">BPF Performance Tools</a> by Brendan Gregg</li><li><a href="https://www.amazon.com/Database-System-Implementation-Hector-Garcia-Molina/dp/0130402648/">Database System Implementation</a> by Hector Garcia-Molina, et al.</li><li><a href="https://afiskon.github.io/pgcon2018.html">Growing up new PostgreSQL developers</a>, by Anastasia Lubennikova and myself. See the bonus slides with recommended white papers.</li></ul><h2 id="final-thoughts">Final thoughts</h2><p>This post is merely a collection of advice, best practices, and various other things I’ve observed over the years to help would-be contributors make the jump from “never contributed” to “contributed once or twice” (and, ultimately, hopefully some make it to “contributed many times”).</p><p>There are <strong>many </strong>more technical and community experience topics that I didn't cover here. If you have something you’d like to read more about (e.g., debugging, profiling, and benchmarking PostgreSQL, or maybe about writing extensions), reach out to let me and the team know: <a href="mailto:aleksander@timescale.com">aleksander@timescale.com</a>. </p><p>We’re also looking for ways to help the community, share knowledge, and contribute to things community members are already working on.</p><p>Lastly, I’d be remiss if I didn’t mention that we’re hiring across multiple teams  🙌. TimescaleDB is the leading open-source relational database for time-series data. It’s packaged as a <a href="https://www.tigerdata.com/blog/top-8-postgresql-extensions" rel="noreferrer">PostgreSQL extension</a> (an extension like <code>CREATE EXTENSION</code>, not a fork, nor a set of patches). </p><p>If you know C and SQL, have experience with PostgreSQL, and want to be a full-time database developer, I encourage you to consider joining Timescale. Timescale is a remote-first company, with people located on all continents (except Antarctica – but if that’s you, we’re happy to outfit your home office with a space heater). </p><p>If you’d like to discuss technical topics with me, Timescale engineers, and other developers and community members, you can find us in the <a href="https://slack.timescale.com/">TimescaleDB Slack</a> (8K+ members).</p><p>Happy contributing 🐘🚀</p>]]></content:encoded>
        </item>
    </channel>
</rss>