Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/release-18.sgml`
f042fceb4b06a956aff548fcfb88a385d34a84c3800588ce0000000100000fa6

Prevent COPY FROM from treating \. as an end-of-file marker when reading CSV files (Daniel Vérité, Tom Lane)
<ulink url="&commit_baseurl;770233748">&sect;</ulink>
<ulink url="&commit_baseurl;da8a4c166">&sect;</ulink>
</para>

<para>
psql will still treat \. as an end-of-file marker when reading CSV files from STDIN.  Older psql clients connecting to Postgres 18 servers might experience \copy problems.  This
release also enforces that \. must appear alone on a line.
</para>
</listitem>

<!--
Author: Michael Paquier <michael@paquier.xyz>
2024-10-03 [e2bab2d79] Remove support for unlogged on partitioned tables
-->

<listitem>
<para>
Disallow unlogged partitioned tables (Michael Paquier)
<ulink url="&commit_baseurl;e2bab2d79">&sect;</ulink>
</para>

<para>
Previously ALTER TABLE SET [UN]LOGGED did nothing, and the creation of an unlogged partitioned table did not cause its children to be unlogged.
</para>
</listitem>

<!--
Author: Fujii Masao <fujii@postgresql.org>
2024-09-12 [fefa76f70] Remove old RULE privilege completely.
-->

<listitem>
<para>
Remove non-functional support for RULE privileges in GRANT/REVOKE (Fujii Masao)
<ulink url="&commit_baseurl;fefa76f70">&sect;</ulink>
</para>

<para>
These have been non-functional since Postgres 8.2.
</para>
</listitem>

<!--
Author: David Rowley <drowley@postgresql.org>
2024-08-12 [f0d112759] Remove "parent" column from pg_backend_memory_contexts
-->

<listitem>
<para>
Remove column pg_backend_memory_contexts.parent (Melih Mutlu)
<ulink url="&commit_baseurl;f0d112759">&sect;</ulink>
</para>

<para>
This is now longer needed since pg_backend_memory_contexts.path was added.
</para>
</listitem>

<!--
Author: David Rowley <drowley@postgresql.org>
2024-07-25 [32d3ed816] Add path column to pg_backend_memory_contexts view
Author: David Rowley <drowley@postgresql.org>
2025-04-18 [d9e03864b] Make levels 1-based in
pg_log_backend_memory_contexts()
Author: Fujii Masao <fujii@postgresql.org>
2025-04-21 [706cbed35] doc: Fix memory context level in pg_log_backend_memory_c
-->

<listitem>
<para>
Change pg_backend_memory_contexts.level and pg_log_backend_memory_contexts() to be one-based (Melih Mutlu, Atsushi Torikoshi, David Rowley, Fujii Masao)
<ulink url="&commit_baseurl;32d3ed816">&sect;</ulink>
<ulink url="&commit_baseurl;d9e03864b">&sect;</ulink>
<ulink url="&commit_baseurl;706cbed35">&sect;</ulink>
</para>

<para>
These were previously zero-based.
</para>
</listitem>

<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2024-10-16 [04bec894a04] initdb: Change default to using data checksums.
-->

<listitem>
<para>
initdb defaults to enabling data checksums
<ulink url="&commit_baseurl;04bec894a04">&sect;</ulink>
</para>

<para>
The previous default behavior (checksums disabled) can be obtained using the
new option --no-data-checksums.  Note that pg_upgrade will reject upgrading
between clusters with different checksum settings, so if the old cluster does
not have checksums enabled (the previous default), then the new cluster will
need to be initialized with --no-data-checksums in order to allow pg_upgrade
to succeed.
</para>
</listitem>

   </itemizedlist>

  </sect2>

  <sect2 id="release-18-changes">
   <title>Changes</title>

    <para>
     Below you will find a detailed account of the changes between
    <productname>PostgreSQL</productname> 18 and the previous major
    release.
    </para>

   <sect3 id="release-18-server">
    <title>Server</title>

    <sect4 id="release-18-optimizer">
     <title>Optimizer</title>

     <itemizedlist>

<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2025-02-17 [fc069a3a6] Implement Self-Join Elimination
-->

<listitem>
<para>
Remove some unnecessary table self-joins (Andrey Lepikhov, Alexander Kuzmenkov, Alexander Korotkov, Alena Rybakina)
<ulink url="&commit_baseurl;fc069a3a6">&sect;</ulink>
</para>

<para>
This optimization can be disabled using server variable enable_self_join_elimination.
</para>
</listitem>

<!--
Author: Alexander Korotkov

Title: PostgreSQL 18: Compatibility Changes - COPY, Partitioned Tables, Privileges, Memory Contexts, Checksums
Summary
This section details compatibility changes in PostgreSQL 18. It covers preventing COPY FROM treating '\.' as an EOF marker in CSV files (potentially causing issues with older psql clients), disallowing unlogged partitioned tables, removing non-functional RULE privileges, removing the pg_backend_memory_contexts.parent column, changing pg_backend_memory_contexts.level and pg_log_backend_memory_contexts() to be one-based, and defaulting initdb to enable data checksums (requiring --no-data-checksums for pg_upgrade if the old cluster doesn't have checksums).