diff options
Diffstat (limited to 'doc')
38 files changed, 555 insertions, 4227 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index cbd4e40a320..fa86c569dc4 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1582,7 +1582,7 @@ <structfield>rolpassword</structfield> <type>text</type> </para> <para> - Password (possibly encrypted); null if none. The format depends + Encrypted password; null if none. The format depends on the form of encryption used. </para></entry> </row> @@ -1627,11 +1627,6 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l <replaceable>ServerKey</replaceable> are in Base64 encoded format. This format is the same as that specified by <ulink url="https://datatracker.ietf.org/doc/html/rfc5803">RFC 5803</ulink>. </para> - - <para> - A password that does not follow either of those formats is assumed to be - unencrypted. - </para> </sect1> @@ -2629,7 +2624,6 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l </para> <para> Has the constraint been validated? - Currently, can be false only for foreign keys and CHECK constraints </para></entry> </row> diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 23d2b1be424..59a0874528a 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -140,7 +140,7 @@ An example of what this file might look like is: <programlisting> # This is a comment -log_connections = yes +log_connections = all log_destination = 'syslog' search_path = '"$user", public' shared_buffers = 128MB @@ -337,7 +337,7 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter <option>-c name=value</option> command-line parameter, or its equivalent <option>--name=value</option> variation. For example, <programlisting> -postgres -c log_connections=yes --log-destination='syslog' +postgres -c log_connections=all --log-destination='syslog' </programlisting> Settings provided in this way override those set via <filename>postgresql.conf</filename> or <command>ALTER SYSTEM</command>, @@ -1155,6 +1155,22 @@ include_dir 'conf.d' </listitem> </varlistentry> + <varlistentry id="guc-md5-password-warnings" xreflabel="md5_password_warnings"> + <term><varname>md5_password_warnings</varname> (<type>boolean</type>) + <indexterm> + <primary><varname>md5_password_warnings</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + Controls whether a <literal>WARNING</literal> about MD5 password + deprecation is produced when a <command>CREATE ROLE</command> or + <command>ALTER ROLE</command> statement sets an MD5-encrypted password. + The default value is <literal>on</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry id="guc-krb-server-keyfile" xreflabel="krb_server_keyfile"> <term><varname>krb_server_keyfile</varname> (<type>string</type>) <indexterm> @@ -2347,7 +2363,7 @@ include_dir 'conf.d' </listitem> </varlistentry> - <varlistentry id="guc_file_copy_method" xreflabel="file_copy_method"> + <varlistentry id="guc-file-copy-method" xreflabel="file_copy_method"> <term><varname>file_copy_method</varname> (<type>enum</type>) <indexterm> <primary><varname>file_copy_method</varname> configuration parameter</primary> @@ -2763,6 +2779,7 @@ include_dir 'conf.d' </para> </listitem> </itemizedlist> + The default is <literal>worker</literal>. </para> <para> This parameter can only be set at server start. @@ -2771,7 +2788,7 @@ include_dir 'conf.d' </varlistentry> <varlistentry id="guc-io-workers" xreflabel="io_workers"> - <term><varname>io_workers</varname> (<type>int</type>) + <term><varname>io_workers</varname> (<type>integer</type>) <indexterm> <primary><varname>io_workers</varname> configuration parameter</primary> </indexterm> @@ -2877,7 +2894,8 @@ include_dir 'conf.d' Sets the maximum number of parallel workers that can be started by a single utility command. Currently, the parallel utility commands that support the use of parallel workers are - <command>CREATE INDEX</command> when building a B-tree or BRIN index, + <command>CREATE INDEX</command> when building a B-tree, + GIN, or BRIN index, and <command>VACUUM</command> without <literal>FULL</literal> option. Parallel workers are taken from the pool of processes established by <xref linkend="guc-max-worker-processes"/>, limited @@ -5748,7 +5766,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" </listitem> </varlistentry> - <varlistentry id="guc-enable_self_join_elimination" xreflabel="enable_self_join_elimination"> + <varlistentry id="guc-enable-self-join-elimination" xreflabel="enable_self_join_elimination"> <term><varname>enable_self_join_elimination</varname> (<type>boolean</type>) <indexterm> <primary><varname>enable_self_join_elimination</varname> configuration parameter</primary> @@ -7511,12 +7529,12 @@ local0.* /var/log/postgresql <entry><literal>setup_durations</literal></entry> <entry> Logs the time spent establishing the connection and setting up the - backend at the time the connection is ready to execute its first - query. The log message includes the total setup duration, starting - from the postmaster accepting the incoming connection and ending - when the connection is ready for query. It also includes the time - it took to fork the new backend and the time it took to - authenticate the user. + backend until the connection is ready to execute its first + query. The log message includes three durations: the total + setup duration (starting from the postmaster accepting the + incoming connection and ending when the connection is ready + for query), the time it took to fork the new backend, and + the time it took to authenticate the user. </entry> </row> @@ -7907,10 +7925,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' </listitem> </varlistentry> - <varlistentry id="guc-log-lock-failure" xreflabel="log_lock_failure"> - <term><varname>log_lock_failure</varname> (<type>boolean</type>) + <varlistentry id="guc-log-lock-failures" xreflabel="log_lock_failures"> + <term><varname>log_lock_failures</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_lock_failure</varname> configuration parameter</primary> + <primary><varname>log_lock_failures</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8118,22 +8136,6 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' </listitem> </varlistentry> - <varlistentry id="guc-md5-password-warnings" xreflabel="md5_password_warnings"> - <term><varname>md5_password_warnings</varname> (<type>boolean</type>) - <indexterm> - <primary><varname>md5_password_warnings</varname> configuration parameter</primary> - </indexterm> - </term> - <listitem> - <para> - Controls whether a <literal>WARNING</literal> about MD5 password - deprecation is produced when a <command>CREATE ROLE</command> or - <command>ALTER ROLE</command> statement sets an MD5-encrypted password. - The default value is <literal>on</literal>. - </para> - </listitem> - </varlistentry> - </variablelist> </sect2> <sect2 id="runtime-config-logging-csvlog"> @@ -8600,7 +8602,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; timing information is displayed in <link linkend="vacuum-progress-reporting"><structname>pg_stat_progress_vacuum</structname></link>, <link linkend="analyze-progress-reporting"><structname>pg_stat_progress_analyze</structname></link>, - in the output of <xref linkend="sql-vacuum"/> when the + in the output of <xref linkend="sql-vacuum"/> and + <xref linkend="sql-analyze"/> when the <literal>VERBOSE</literal> option is used, and by autovacuum for auto-vacuums and auto-analyzes when <xref linkend="guc-log-autovacuum-min-duration"/> is set. @@ -9338,7 +9341,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-truncate" xreflabel="vacuum_truncate"> <term><varname>vacuum_truncate</varname> (<type>boolean</type>) <indexterm> - <primary><varname>vacuum_truncate</varname> configuration parameter</primary> + <primary><varname>vacuum_truncate</varname></primary> + <secondary>configuration parameter</secondary> </indexterm> </term> <listitem> @@ -9542,7 +9546,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-max-eager-freeze-failure-rate" xreflabel="vacuum_max_eager_freeze_failure_rate"> <term><varname>vacuum_max_eager_freeze_failure_rate</varname> (<type>floating point</type>) <indexterm> - <primary><varname>vacuum_max_eager_freeze_failure_rate</varname> configuration parameter</primary> + <primary><varname>vacuum_max_eager_freeze_failure_rate</varname></primary> + <secondary>configuration parameter</secondary> </indexterm> </term> <listitem> diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fcd1cb85352..65bc070d2e5 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -421,6 +421,16 @@ CREATE TABLE people ( </listitem> <listitem> <para> + A virtual generated column cannot have a user-defined type, and the + generation expression of a virtual generated column must not reference + user-defined functions or types, that is, it can only use built-in + functions or types. This applies also indirectly, such as for functions + or types that underlie operators or casts. (This restriction does not + exist for stored generated columns.) + </para> + </listitem> + <listitem> + <para> A generated column cannot have a column default or an identity definition. </para> </listitem> @@ -2223,8 +2233,9 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Allows <command>VACUUM</command>, <command>ANALYZE</command>, <command>CLUSTER</command>, <command>REFRESH MATERIALIZED VIEW</command>, - <command>REINDEX</command>, and <command>LOCK TABLE</command> on a - relation. + <command>REINDEX</command>, <command>LOCK TABLE</command>, + and database object statistics manipulation functions + (see <xref linkend="functions-admin-statsmod"/>) on a relation. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml index db4bcce56ea..7b61b4841aa 100644 --- a/doc/src/sgml/docguide.sgml +++ b/doc/src/sgml/docguide.sgml @@ -60,9 +60,7 @@ maintained by the <ulink url="https://www.oasis-open.org"> OASIS group</ulink>. The <ulink url="https://www.oasis-open.org/docbook/"> official DocBook site</ulink> has good introductory and reference documentation and - a complete O'Reilly book for your online reading pleasure. The - <ulink url="http://newbiedoc.sourceforge.net/metadoc/docbook-guide.html"> - NewbieDoc Docbook Guide</ulink> is very helpful for beginners. + a complete O'Reilly book for your online reading pleasure. The <ulink url="https://www.freebsd.org/docproj/"> FreeBSD Documentation Project</ulink> also uses DocBook and has some good information, including a number of style guidelines that might be diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index fef9584f908..bcde3cfd037 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -180,7 +180,7 @@ <!ENTITY sourcerepo SYSTEM "sourcerepo.sgml"> <!ENTITY release SYSTEM "release.sgml"> -<!ENTITY release-18 SYSTEM "release-18.sgml"> +<!ENTITY release-19 SYSTEM "release-19.sgml"> <!ENTITY limits SYSTEM "limits.sgml"> <!ENTITY acronyms SYSTEM "acronyms.sgml"> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b405525a465..298791858be 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1824,13 +1824,23 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in which <parameter>operand</parameter> falls in a histogram having <parameter>count</parameter> equal-width buckets spanning the range <parameter>low</parameter> to <parameter>high</parameter>. - Returns <literal>0</literal> + The buckets have inclusive lower bounds and exclusive upper bounds. + Returns <literal>0</literal> for an input less + than <parameter>low</parameter>, or <literal><parameter>count</parameter>+1</literal> for an input - outside that range. + greater than or equal to <parameter>high</parameter>. + If <parameter>low</parameter> > <parameter>high</parameter>, + the behavior is mirror-reversed, with bucket <literal>1</literal> + now being the one just below <parameter>low</parameter>, and the + inclusive bounds now being on the upper side. </para> <para> <literal>width_bucket(5.35, 0.024, 10.06, 5)</literal> <returnvalue>3</returnvalue> + </para> + <para> + <literal>width_bucket(9, 10, 0, 10)</literal> + <returnvalue>2</returnvalue> </para></entry> </row> @@ -1842,8 +1852,8 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in <para> Returns the number of the bucket in which <parameter>operand</parameter> falls given an array listing the - lower bounds of the buckets. Returns <literal>0</literal> for an - input less than the first lower + inclusive lower bounds of the buckets. + Returns <literal>0</literal> for an input less than the first lower bound. <parameter>operand</parameter> and the array elements can be of any type having standard comparison operators. The <parameter>thresholds</parameter> array <emphasis>must be @@ -14374,7 +14384,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <sect1 id="functions-uuid"> <title>UUID Functions</title> - <indexterm zone="datatype-uuid"> + <indexterm zone="functions-uuid"> <primary>UUID</primary> <secondary>generating</secondary> </indexterm> @@ -28666,143 +28676,6 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres} <row> <entry role="func_table_entry"><para role="func_signature"> <indexterm> - <primary>pg_get_process_memory_contexts</primary> - </indexterm> - <function>pg_get_process_memory_contexts</function> ( <parameter>pid</parameter> <type>integer</type>, <parameter>summary</parameter> <type>boolean</type>, <parameter>timeout</parameter> <type>float</type> ) - <returnvalue>setof record</returnvalue> - ( <parameter>name</parameter> <type>text</type>, - <parameter>ident</parameter> <type>text</type>, - <parameter>type</parameter> <type>text</type>, - <parameter>path</parameter> <type>integer[]</type>, - <parameter>level</parameter> <type>integer</type>, - <parameter>total_bytes</parameter> <type>bigint</type>, - <parameter>total_nblocks</parameter> <type>bigint</type>, - <parameter>free_bytes</parameter> <type>bigint</type>, - <parameter>free_chunks</parameter> <type>bigint</type>, - <parameter>used_bytes</parameter> <type>bigint</type>, - <parameter>num_agg_contexts</parameter> <type>integer</type>, - <parameter>stats_timestamp</parameter> <type>timestamptz</type> ) - </para> - <para> - This function handles requests to display the memory contexts of a - <productname>PostgreSQL</productname> process with the specified - process ID. The function can be used to send requests to backends as - well as <glossterm linkend="glossary-auxiliary-proc">auxiliary processes</glossterm>. - </para> - <para> - The returned record contains extended statistics per each memory - context: - <itemizedlist spacing="compact"> - <listitem> - <para> - <parameter>name</parameter> - The name of the memory context. - </para> - </listitem> - <listitem> - <para> - <parameter>ident</parameter> - Memory context ID (if any). - </para> - </listitem> - <listitem> - <para> - <parameter>type</parameter> - The type of memory context, possible - values are: AllocSet, Generation, Slab and Bump. - </para> - </listitem> - <listitem> - <para> - <parameter>path</parameter> - Memory contexts are organized in a - tree model with TopMemoryContext as the root, and all other memory - contexts as nodes in the tree. The <parameter>path</parameter> - displays the path from the root to the current memory context. The - path is limited to 100 children per node, which each node limited - to a max depth of 100, to preserve memory during reporting. The - printed path will also be limited to 100 nodes counting from the - TopMemoryContext. - </para> - </listitem> - <listitem> - <para> - <parameter>level</parameter> - The level in the tree of the current - memory context. - </para> - </listitem> - <listitem> - <para> - <parameter>total_bytes</parameter> - The total number of bytes - allocated to this memory context. - </para> - </listitem> - <listitem> - <para> - <parameter>total_nblocks</parameter> - The total number of blocks - used for the allocated memory. - </para> - </listitem> - <listitem> - <para> - <parameter>free_bytes</parameter> - The amount of free memory in - this memory context. - </para> - </listitem> - <listitem> - <para> - <parameter>free_chunks</parameter> - The number of chunks that - <parameter>free_bytes</parameter> corresponds to. - </para> - </listitem> - <listitem> - <para> - <parameter>used_bytes</parameter> - The total number of bytes - currently occupied. - </para> - </listitem> - <listitem> - <para> - <parameter>num_agg_contexts</parameter> - The number of memory - contexts aggregated in the displayed statistics. - </para> - </listitem> - <listitem> - <para> - <parameter>stats_timestamp</parameter> - When the statistics were - extracted from the process. - </para> - </listitem> - </itemizedlist> - </para> - <para> - When <parameter>summary</parameter> is <literal>true</literal>, statistics - for memory contexts at levels 1 and 2 are displayed, with level 1 - representing the root node (i.e., <literal>TopMemoryContext</literal>). - Statistics for contexts on level 2 and below are aggregates of all - child contexts' statistics, where <literal>num_agg_contexts</literal> - indicate the number aggregated child contexts. When - <parameter>summary</parameter> is <literal>false</literal>, - <literal>the num_agg_contexts</literal> value is <literal>1</literal>, - indicating that individual statistics are being displayed. - </para> - <para> - Busy processes can delay reporting memory context statistics, - <parameter>timeout</parameter> specifies the number of seconds - to wait for updated statistics. <parameter>timeout</parameter> can be - specified in fractions of a second. - </para> - <para> - After receiving memory context statistics from the target process, it - returns the results as one row per context. If all the contexts don't - fit within the pre-determined size limit, the remaining context - statistics are aggregated and a cumulative total is displayed. The - <literal>num_agg_contexts</literal> column indicates the number of - contexts aggregated in the displayed statistics. When - <literal>num_agg_contexts</literal> is <literal>1</literal> it means - that the context statistics are displayed separately. - </para></entry> - </row> - - <row> - <entry role="func_table_entry"><para role="func_signature"> - <indexterm> <primary>pg_log_backend_memory_contexts</primary> </indexterm> <function>pg_log_backend_memory_contexts</function> ( <parameter>pid</parameter> <type>integer</type> ) @@ -28939,40 +28812,6 @@ LOG: Grand total: 1651920 bytes in 201 blocks; 622360 free (88 chunks); 1029560 because it may generate a large number of log messages. </para> - <para> - <function>pg_get_process_memory_contexts</function> can be used to request - memory contexts statistics of any <productname>PostgreSQL</productname> - process. For example: -<programlisting> -postgres=# SELECT * FROM pg_get_process_memory_contexts( - (SELECT pid FROM pg_stat_activity - WHERE backend_type = 'checkpointer'), - false, 0.5) LIMIT 1; --[ RECORD 1 ]----+------------------------------ -name | TopMemoryContext -ident | -type | AllocSet -path | {1} -level | 1 -total_bytes | 90304 -total_nblocks | 3 -free_bytes | 2880 -free_chunks | 1 -used_bytes | 87424 -num_agg_contexts | 1 -stats_timestamp | 2025-03-24 13:55:47.796698+01 -</programlisting> - <note> - <para> - While <function>pg_get_process_memory_contexts</function> can be used to - query memory contexts of the local backend, - <structname>pg_backend_memory_contexts</structname> - (see <xref linkend="view-pg-backend-memory-contexts"/> for more details) - will be less resource intensive when only the local backend is of interest. - </para> - </note> - </para> - </sect2> <sect2 id="functions-admin-backup"> @@ -29869,7 +29708,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset </row> <row> - <entry role="func_table_entry"><para role="func_signature"> + <entry id="pg-logical-slot-get-binary-changes" role="func_table_entry"><para role="func_signature"> <indexterm> <primary>pg_logical_slot_get_binary_changes</primary> </indexterm> @@ -30141,7 +29980,9 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset standby server. Temporary synced slots, if any, cannot be used for logical decoding and must be dropped after promotion. See <xref linkend="logicaldecoding-replication-slots-synchronization"/> for details. - Note that this function cannot be executed if + Note that this function is primarily intended for testing and + debugging purposes and should be used with caution. Additionally, + this function cannot be executed if <link linkend="guc-sync-replication-slots"><varname> sync_replication_slots</varname></link> is enabled and the slotsync worker is already running to perform the synchronization of slots. diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml index a373a8aa4b2..ee86e170055 100644 --- a/doc/src/sgml/gist.sgml +++ b/doc/src/sgml/gist.sgml @@ -1170,7 +1170,7 @@ my_sortsupport(PG_FUNCTION_ARGS) </varlistentry> <varlistentry> - <term><function>stratnum</function></term> + <term><function>translate_cmptype</function></term> <listitem> <para> Given a <literal>CompareType</literal> value from @@ -1189,11 +1189,22 @@ my_sortsupport(PG_FUNCTION_ARGS) </para> <para> + This support function corresponds to the index access method callback + function <structfield>amtranslatecmptype</structfield> (see <xref + linkend="index-functions"/>). The + <structfield>amtranslatecmptype</structfield> callback function for + GiST indexes merely calls down to the + <function>translate_cmptype</function> support function of the + respective operator family, since the GiST index access method has no + fixed strategy numbers itself. + </para> + + <para> The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> -CREATE OR REPLACE FUNCTION my_stratnum(integer) +CREATE OR REPLACE FUNCTION my_translate_cmptype(integer) RETURNS smallint AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -1202,7 +1213,7 @@ LANGUAGE C STRICT; And the operator family registration must look like this: <programlisting> ALTER OPERATOR FAMILY my_opfamily USING gist ADD - FUNCTION 12 ("any", "any") my_stratnum(int); + FUNCTION 12 ("any", "any") my_translate_cmptype(int); </programlisting> </para> @@ -1210,10 +1221,10 @@ ALTER OPERATOR FAMILY my_opfamily USING gist ADD The matching code in the C module could then follow this skeleton: <programlisting> -PG_FUNCTION_INFO_V1(my_stratnum); +PG_FUNCTION_INFO_V1(my_translate_cmptype); Datum -my_stratnum(PG_FUNCTION_ARGS) +my_translate_cmptype(PG_FUNCTION_ARGS) { CompareType cmptype = PG_GETARG_INT32(0); StrategyNumber ret = InvalidStrategy; @@ -1232,11 +1243,11 @@ my_stratnum(PG_FUNCTION_ARGS) <para> One translation function is provided by <productname>PostgreSQL</productname>: - <literal>gist_stratnum_common</literal> is for operator classes that + <literal>gist_translate_cmptype_common</literal> is for operator classes that use the <literal>RT*StrategyNumber</literal> constants. The <literal>btree_gist</literal> extension defines a second translation function, - <literal>gist_stratnum_btree</literal>, for operator classes that use + <literal>gist_translate_cmptype_btree</literal>, for operator classes that use the <literal>BT*StrategyNumber</literal> constants. </para> </listitem> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 695fe958c3e..298c4b38ef9 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,6 +1,6 @@ <!-- doc/src/sgml/libpq.sgml --> -<chapter id="libpq"> +<chapter id="libpq" xreflabel="libpq"> <title><application>libpq</application> — C Library</title> <indexterm zone="libpq"> @@ -2168,6 +2168,24 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname </listitem> </varlistentry> + <varlistentry id="libpq-connect-ssl-max-protocol-version" xreflabel="ssl_max_protocol_version"> + <term><literal>ssl_max_protocol_version</literal></term> + <listitem> + <para> + This parameter specifies the maximum SSL/TLS protocol version to allow + for the connection. Valid values are <literal>TLSv1</literal>, + <literal>TLSv1.1</literal>, <literal>TLSv1.2</literal> and + <literal>TLSv1.3</literal>. The supported protocols depend on the + version of <productname>OpenSSL</productname> used, older versions + not supporting the most modern protocol versions. If not set, this + parameter is ignored and the connection will use the maximum bound + defined by the backend, if set. Setting the maximum protocol version + is mainly useful for testing or if some component has issues working + with a newer protocol. + </para> + </listitem> + </varlistentry> + <varlistentry id="libpq-connect-min-protocol-version" xreflabel="min_protocol_version"> <term><literal>min_protocol_version</literal></term> <listitem> @@ -2216,24 +2234,6 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname </listitem> </varlistentry> - <varlistentry id="libpq-connect-ssl-max-protocol-version" xreflabel="ssl_max_protocol_version"> - <term><literal>ssl_max_protocol_version</literal></term> - <listitem> - <para> - This parameter specifies the maximum SSL/TLS protocol version to allow - for the connection. Valid values are <literal>TLSv1</literal>, - <literal>TLSv1.1</literal>, <literal>TLSv1.2</literal> and - <literal>TLSv1.3</literal>. The supported protocols depend on the - version of <productname>OpenSSL</productname> used, older versions - not supporting the most modern protocol versions. If not set, this - parameter is ignored and the connection will use the maximum bound - defined by the backend, if set. Setting the maximum protocol version - is mainly useful for testing or if some component has issues working - with a newer protocol. - </para> - </listitem> - </varlistentry> - <varlistentry id="libpq-connect-krbsrvname" xreflabel="krbsrvname"> <term><literal>krbsrvname</literal></term> <listitem> diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index f288c049a5c..c32e6bc000d 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -363,34 +363,25 @@ <para> Create some test tables on the publisher. <programlisting> -test_pub=# CREATE TABLE t1(a int, b text, PRIMARY KEY(a)); -CREATE TABLE -test_pub=# CREATE TABLE t2(c int, d text, PRIMARY KEY(c)); -CREATE TABLE -test_pub=# CREATE TABLE t3(e int, f text, PRIMARY KEY(e)); -CREATE TABLE +/* pub # */ CREATE TABLE t1(a int, b text, PRIMARY KEY(a)); +/* pub # */ CREATE TABLE t2(c int, d text, PRIMARY KEY(c)); +/* pub # */ CREATE TABLE t3(e int, f text, PRIMARY KEY(e)); </programlisting></para> <para> Create the same tables on the subscriber. <programlisting> -test_sub=# CREATE TABLE t1(a int, b text, PRIMARY KEY(a)); -CREATE TABLE -test_sub=# CREATE TABLE t2(c int, d text, PRIMARY KEY(c)); -CREATE TABLE -test_sub=# CREATE TABLE t3(e int, f text, PRIMARY KEY(e)); -CREATE TABLE +/* sub # */ CREATE TABLE t1(a int, b text, PRIMARY KEY(a)); +/* sub # */ CREATE TABLE t2(c int, d text, PRIMARY KEY(c)); +/* sub # */ CREATE TABLE t3(e int, f text, PRIMARY KEY(e)); </programlisting></para> <para> Insert data to the tables at the publisher side. <programlisting> -test_pub=# INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); -INSERT 0 3 -test_pub=# INSERT INTO t2 VALUES (1, 'A'), (2, 'B'), (3, 'C'); -INSERT 0 3 -test_pub=# INSERT INTO t3 VALUES (1, 'i'), (2, 'ii'), (3, 'iii'); -INSERT 0 3 +/* pub # */ INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); +/* pub # */ INSERT INTO t2 VALUES (1, 'A'), (2, 'B'), (3, 'C'); +/* pub # */ INSERT INTO t3 VALUES (1, 'i'), (2, 'ii'), (3, 'iii'); </programlisting></para> <para> @@ -399,41 +390,34 @@ INSERT 0 3 <link linkend="sql-createpublication-params-with-publish"><literal>publish</literal></link> operations. The publication <literal>pub3b</literal> has a row filter (see <xref linkend="logical-replication-row-filter"/>). -<programlisting> -test_pub=# CREATE PUBLICATION pub1 FOR TABLE t1; -CREATE PUBLICATION -test_pub=# CREATE PUBLICATION pub2 FOR TABLE t2 WITH (publish = 'truncate'); -CREATE PUBLICATION -test_pub=# CREATE PUBLICATION pub3a FOR TABLE t3 WITH (publish = 'truncate'); -CREATE PUBLICATION -test_pub=# CREATE PUBLICATION pub3b FOR TABLE t3 WHERE (e > 5); -CREATE PUBLICATION -</programlisting></para> +<programlisting><![CDATA[ +/* pub # */ CREATE PUBLICATION pub1 FOR TABLE t1; +/* pub # */ CREATE PUBLICATION pub2 FOR TABLE t2 WITH (publish = 'truncate'); +/* pub # */ CREATE PUBLICATION pub3a FOR TABLE t3 WITH (publish = 'truncate'); +/* pub # */ CREATE PUBLICATION pub3b FOR TABLE t3 WHERE (e > 5); +]]></programlisting></para> <para> Create subscriptions for the publications. The subscription <literal>sub3</literal> subscribes to both <literal>pub3a</literal> and <literal>pub3b</literal>. All subscriptions will copy initial data by default. <programlisting> -test_sub=# CREATE SUBSCRIPTION sub1 -test_sub-# CONNECTION 'host=localhost dbname=test_pub application_name=sub1' -test_sub-# PUBLICATION pub1; -CREATE SUBSCRIPTION -test_sub=# CREATE SUBSCRIPTION sub2 -test_sub-# CONNECTION 'host=localhost dbname=test_pub application_name=sub2' -test_sub-# PUBLICATION pub2; -CREATE SUBSCRIPTION -test_sub=# CREATE SUBSCRIPTION sub3 -test_sub-# CONNECTION 'host=localhost dbname=test_pub application_name=sub3' -test_sub-# PUBLICATION pub3a, pub3b; -CREATE SUBSCRIPTION +/* sub # */ CREATE SUBSCRIPTION sub1 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub application_name=sub1' +/* sub - */ PUBLICATION pub1; +/* sub # */ CREATE SUBSCRIPTION sub2 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub application_name=sub2' +/* sub - */ PUBLICATION pub2; +/* sub # */ CREATE SUBSCRIPTION sub3 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub application_name=sub3' +/* sub - */ PUBLICATION pub3a, pub3b; </programlisting></para> <para> Observe that initial table data is copied, regardless of the <literal>publish</literal> operation of the publication. <programlisting> -test_sub=# SELECT * FROM t1; +/* sub # */ SELECT * FROM t1; a | b ---+------- 1 | one @@ -441,7 +425,7 @@ test_sub=# SELECT * FROM t1; 3 | three (3 rows) -test_sub=# SELECT * FROM t2; +/* sub # */ SELECT * FROM t2; c | d ---+--- 1 | A @@ -456,7 +440,7 @@ test_sub=# SELECT * FROM t2; it means the copied table <literal>t3</literal> contains all rows even when they do not match the row filter of publication <literal>pub3b</literal>. <programlisting> -test_sub=# SELECT * FROM t3; +/* sub # */ SELECT * FROM t3; e | f ---+----- 1 | i @@ -468,18 +452,15 @@ test_sub=# SELECT * FROM t3; <para> Insert more data to the tables at the publisher side. <programlisting> -test_pub=# INSERT INTO t1 VALUES (4, 'four'), (5, 'five'), (6, 'six'); -INSERT 0 3 -test_pub=# INSERT INTO t2 VALUES (4, 'D'), (5, 'E'), (6, 'F'); -INSERT 0 3 -test_pub=# INSERT INTO t3 VALUES (4, 'iv'), (5, 'v'), (6, 'vi'); -INSERT 0 3 +/* pub # */ INSERT INTO t1 VALUES (4, 'four'), (5, 'five'), (6, 'six'); +/* pub # */ INSERT INTO t2 VALUES (4, 'D'), (5, 'E'), (6, 'F'); +/* pub # */ INSERT INTO t3 VALUES (4, 'iv'), (5, 'v'), (6, 'vi'); </programlisting></para> <para> Now the publisher side data looks like: <programlisting> -test_pub=# SELECT * FROM t1; +/* pub # */ SELECT * FROM t1; a | b ---+------- 1 | one @@ -490,7 +471,7 @@ test_pub=# SELECT * FROM t1; 6 | six (6 rows) -test_pub=# SELECT * FROM t2; +/* pub # */ SELECT * FROM t2; c | d ---+--- 1 | A @@ -501,7 +482,7 @@ test_pub=# SELECT * FROM t2; 6 | F (6 rows) -test_pub=# SELECT * FROM t3; +/* pub # */ SELECT * FROM t3; e | f ---+----- 1 | i @@ -521,7 +502,7 @@ test_pub=# SELECT * FROM t3; only replicate data that matches the row filter of <literal>pub3b</literal>. Now the subscriber side data looks like: <programlisting> -test_sub=# SELECT * FROM t1; +/* sub # */ SELECT * FROM t1; a | b ---+------- 1 | one @@ -532,7 +513,7 @@ test_sub=# SELECT * FROM t1; 6 | six (6 rows) -test_sub=# SELECT * FROM t2; +/* sub # */ SELECT * FROM t2; c | d ---+--- 1 | A @@ -540,7 +521,7 @@ test_sub=# SELECT * FROM t2; 3 | C (3 rows) -test_sub=# SELECT * FROM t3; +/* sub # */ SELECT * FROM t3; e | f ---+----- 1 | i @@ -567,8 +548,7 @@ test_sub=# SELECT * FROM t3; <para> First, create a publication for the examples to use. <programlisting> -test_pub=# CREATE PUBLICATION pub1 FOR ALL TABLES; -CREATE PUBLICATION +/* pub # */ CREATE PUBLICATION pub1 FOR ALL TABLES; </programlisting></para> <para> Example 1: Where the subscription says <literal>connect = false</literal> @@ -579,13 +559,12 @@ CREATE PUBLICATION <para> Create the subscription. <programlisting> -test_sub=# CREATE SUBSCRIPTION sub1 -test_sub-# CONNECTION 'host=localhost dbname=test_pub' -test_sub-# PUBLICATION pub1 -test_sub-# WITH (connect=false); +/* sub # */ CREATE SUBSCRIPTION sub1 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub' +/* sub - */ PUBLICATION pub1 +/* sub - */ WITH (connect=false); WARNING: subscription was created, but is not connected HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription. -CREATE SUBSCRIPTION </programlisting></para> </listitem> <listitem> @@ -594,7 +573,7 @@ CREATE SUBSCRIPTION specified during <literal>CREATE SUBSCRIPTION</literal>, the name of the slot to create is same as the subscription name, e.g. "sub1". <programlisting> -test_pub=# SELECT * FROM pg_create_logical_replication_slot('sub1', 'pgoutput'); +/* pub # */ SELECT * FROM pg_create_logical_replication_slot('sub1', 'pgoutput'); slot_name | lsn -----------+----------- sub1 | 0/19404D0 @@ -606,10 +585,8 @@ test_pub=# SELECT * FROM pg_create_logical_replication_slot('sub1', 'pgoutput'); On the subscriber, complete the activation of the subscription. After this the tables of <literal>pub1</literal> will start replicating. <programlisting> -test_sub=# ALTER SUBSCRIPTION sub1 ENABLE; -ALTER SUBSCRIPTION -test_sub=# ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* sub # */ ALTER SUBSCRIPTION sub1 ENABLE; +/* sub # */ ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION; </programlisting></para> </listitem> </itemizedlist> @@ -625,13 +602,12 @@ ALTER SUBSCRIPTION <para> Create the subscription. <programlisting> -test_sub=# CREATE SUBSCRIPTION sub1 -test_sub-# CONNECTION 'host=localhost dbname=test_pub' -test_sub-# PUBLICATION pub1 -test_sub-# WITH (connect=false, slot_name='myslot'); +/* sub # */ CREATE SUBSCRIPTION sub1 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub' +/* sub - */ PUBLICATION pub1 +/* sub - */ WITH (connect=false, slot_name='myslot'); WARNING: subscription was created, but is not connected HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription. -CREATE SUBSCRIPTION </programlisting></para> </listitem> <listitem> @@ -639,7 +615,7 @@ CREATE SUBSCRIPTION On the publisher, manually create a slot using the same name that was specified during <literal>CREATE SUBSCRIPTION</literal>, e.g. "myslot". <programlisting> -test_pub=# SELECT * FROM pg_create_logical_replication_slot('myslot', 'pgoutput'); +/* pub # */ SELECT * FROM pg_create_logical_replication_slot('myslot', 'pgoutput'); slot_name | lsn -----------+----------- myslot | 0/19059A0 @@ -651,10 +627,8 @@ test_pub=# SELECT * FROM pg_create_logical_replication_slot('myslot', 'pgoutput' On the subscriber, the remaining subscription activation steps are the same as before. <programlisting> -test_sub=# ALTER SUBSCRIPTION sub1 ENABLE; -ALTER SUBSCRIPTION -test_sub=# ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* sub # */ ALTER SUBSCRIPTION sub1 ENABLE; +/* sub # */ ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION; </programlisting></para> </listitem> </itemizedlist> @@ -669,18 +643,17 @@ ALTER SUBSCRIPTION <literal>enabled = false</literal>, and <literal>create_slot = false</literal> are also needed. <programlisting> -test_sub=# CREATE SUBSCRIPTION sub1 -test_sub-# CONNECTION 'host=localhost dbname=test_pub' -test_sub-# PUBLICATION pub1 -test_sub-# WITH (slot_name=NONE, enabled=false, create_slot=false); -CREATE SUBSCRIPTION +/* sub # */ CREATE SUBSCRIPTION sub1 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub' +/* sub - */ PUBLICATION pub1 +/* sub - */ WITH (slot_name=NONE, enabled=false, create_slot=false); </programlisting></para> </listitem> <listitem> <para> On the publisher, manually create a slot using any name, e.g. "myslot". <programlisting> -test_pub=# SELECT * FROM pg_create_logical_replication_slot('myslot', 'pgoutput'); +/* pub # */ SELECT * FROM pg_create_logical_replication_slot('myslot', 'pgoutput'); slot_name | lsn -----------+----------- myslot | 0/1905930 @@ -692,18 +665,15 @@ test_pub=# SELECT * FROM pg_create_logical_replication_slot('myslot', 'pgoutput' On the subscriber, associate the subscription with the slot name just created. <programlisting> -test_sub=# ALTER SUBSCRIPTION sub1 SET (slot_name='myslot'); -ALTER SUBSCRIPTION +/* sub # */ ALTER SUBSCRIPTION sub1 SET (slot_name='myslot'); </programlisting></para> </listitem> <listitem> <para> The remaining subscription activation steps are same as before. <programlisting> -test_sub=# ALTER SUBSCRIPTION sub1 ENABLE; -ALTER SUBSCRIPTION -test_sub=# ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* sub # */ ALTER SUBSCRIPTION sub1 ENABLE; +/* sub # */ ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION; </programlisting></para> </listitem> </itemizedlist> @@ -752,7 +722,7 @@ ALTER SUBSCRIPTION will return the relevant replication slots associated with the failover-enabled subscriptions. <programlisting> -test_sub=# SELECT +/* sub # */ SELECT array_agg(quote_literal(s.subslotname)) AS slots FROM pg_subscription s WHERE s.subfailover AND @@ -775,7 +745,7 @@ test_sub=# SELECT as they will either be dropped or re-created on the new primary server in those cases. <programlisting> -test_sub=# SELECT +/* sub # */ SELECT array_agg(quote_literal(slot_name)) AS slots FROM ( @@ -794,7 +764,7 @@ test_sub=# SELECT Check that the logical replication slots identified above exist on the standby server and are ready for failover. <programlisting> -test_standby=# SELECT slot_name, (synced AND NOT temporary AND NOT conflicting) AS failover_ready +/* standby # */ SELECT slot_name, (synced AND NOT temporary AND NOT conflicting) AS failover_ready FROM pg_replication_slots WHERE slot_name IN ('sub1','sub2','sub3', 'pg_16394_sync_16385_7394666715149055164'); @@ -1024,12 +994,9 @@ test_standby=# SELECT slot_name, (synced AND NOT temporary AND NOT conflicting) <para> Create some tables to be used in the following examples. <programlisting> -test_pub=# CREATE TABLE t1(a int, b int, c text, PRIMARY KEY(a,c)); -CREATE TABLE -test_pub=# CREATE TABLE t2(d int, e int, f int, PRIMARY KEY(d)); -CREATE TABLE -test_pub=# CREATE TABLE t3(g int, h int, i int, PRIMARY KEY(g)); -CREATE TABLE +/* pub # */ CREATE TABLE t1(a int, b int, c text, PRIMARY KEY(a,c)); +/* pub # */ CREATE TABLE t2(d int, e int, f int, PRIMARY KEY(d)); +/* pub # */ CREATE TABLE t3(g int, h int, i int, PRIMARY KEY(g)); </programlisting></para> <para> @@ -1038,43 +1005,40 @@ CREATE TABLE <literal>p2</literal> has two tables. Table <literal>t1</literal> has no row filter, and table <literal>t2</literal> has a row filter. Publication <literal>p3</literal> has two tables, and both of them have a row filter. -<programlisting> -test_pub=# CREATE PUBLICATION p1 FOR TABLE t1 WHERE (a > 5 AND c = 'NSW'); -CREATE PUBLICATION -test_pub=# CREATE PUBLICATION p2 FOR TABLE t1, t2 WHERE (e = 99); -CREATE PUBLICATION -test_pub=# CREATE PUBLICATION p3 FOR TABLE t2 WHERE (d = 10), t3 WHERE (g = 10); -CREATE PUBLICATION -</programlisting></para> +<programlisting><![CDATA[ +/* pub # */ CREATE PUBLICATION p1 FOR TABLE t1 WHERE (a > 5 AND c = 'NSW'); +/* pub # */ CREATE PUBLICATION p2 FOR TABLE t1, t2 WHERE (e = 99); +/* pub # */ CREATE PUBLICATION p3 FOR TABLE t2 WHERE (d = 10), t3 WHERE (g = 10); +]]></programlisting></para> <para> <command>psql</command> can be used to show the row filter expressions (if defined) for each publication. -<programlisting> -test_pub=# \dRp+ - Publication p1 +<programlisting><![CDATA[ +/* pub # */ \dRp+ + Publication p1 Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ----------+------------+---------+---------+---------+-----------+---------- postgres | f | t | t | t | t | f Tables: - "public.t1" WHERE ((a > 5) AND (c = 'NSW'::text)) + "public.t1" WHERE ((a > 5) AND (c = 'NSW'::text)) - Publication p2 + Publication p2 Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ----------+------------+---------+---------+---------+-----------+---------- postgres | f | t | t | t | t | f Tables: - "public.t1" - "public.t2" WHERE (e = 99) + "public.t1" + "public.t2" WHERE (e = 99) - Publication p3 + Publication p3 Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ----------+------------+---------+---------+---------+-----------+---------- postgres | f | t | t | t | t | f Tables: - "public.t2" WHERE (d = 10) - "public.t3" WHERE (g = 10) -</programlisting></para> + "public.t2" WHERE (d = 10) + "public.t3" WHERE (g = 10) +]]></programlisting></para> <para> <command>psql</command> can be used to show the row filter expressions (if @@ -1082,8 +1046,8 @@ Tables: of two publications, but has a row filter only in <literal>p1</literal>. See that table <literal>t2</literal> is a member of two publications, and has a different row filter in each of them. -<programlisting> -test_pub=# \d t1 +<programlisting><![CDATA[ +/* pub # */ \d t1 Table "public.t1" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- @@ -1096,7 +1060,7 @@ Publications: "p1" WHERE ((a > 5) AND (c = 'NSW'::text)) "p2" -test_pub=# \d t2 +/* pub # */ \d t2 Table "public.t2" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- @@ -1109,7 +1073,7 @@ Publications: "p2" WHERE (e = 99) "p3" WHERE (d = 10) -test_pub=# \d t3 +/* pub # */ \d t3 Table "public.t3" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- @@ -1120,43 +1084,33 @@ Indexes: "t3_pkey" PRIMARY KEY, btree (g) Publications: "p3" WHERE (g = 10) -</programlisting></para> +]]></programlisting></para> <para> On the subscriber node, create a table <literal>t1</literal> with the same definition as the one on the publisher, and also create the subscription <literal>s1</literal> that subscribes to the publication <literal>p1</literal>. <programlisting> -test_sub=# CREATE TABLE t1(a int, b int, c text, PRIMARY KEY(a,c)); -CREATE TABLE -test_sub=# CREATE SUBSCRIPTION s1 -test_sub-# CONNECTION 'host=localhost dbname=test_pub application_name=s1' -test_sub-# PUBLICATION p1; -CREATE SUBSCRIPTION +/* sub # */ CREATE TABLE t1(a int, b int, c text, PRIMARY KEY(a,c)); +/* sub # */ CREATE SUBSCRIPTION s1 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub application_name=s1' +/* sub - */ PUBLICATION p1; </programlisting></para> <para> Insert some rows. Only the rows satisfying the <literal>t1 WHERE</literal> clause of publication <literal>p1</literal> are replicated. <programlisting> -test_pub=# INSERT INTO t1 VALUES (2, 102, 'NSW'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (3, 103, 'QLD'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (4, 104, 'VIC'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (5, 105, 'ACT'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (6, 106, 'NSW'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (7, 107, 'NT'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (8, 108, 'QLD'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES (9, 109, 'NSW'); -INSERT 0 1 - -test_pub=# SELECT * FROM t1; +/* pub # */ INSERT INTO t1 VALUES (2, 102, 'NSW'); +/* pub # */ INSERT INTO t1 VALUES (3, 103, 'QLD'); +/* pub # */ INSERT INTO t1 VALUES (4, 104, 'VIC'); +/* pub # */ INSERT INTO t1 VALUES (5, 105, 'ACT'); +/* pub # */ INSERT INTO t1 VALUES (6, 106, 'NSW'); +/* pub # */ INSERT INTO t1 VALUES (7, 107, 'NT'); +/* pub # */ INSERT INTO t1 VALUES (8, 108, 'QLD'); +/* pub # */ INSERT INTO t1 VALUES (9, 109, 'NSW'); + +/* pub # */ SELECT * FROM t1; a | b | c ---+-----+----- 2 | 102 | NSW @@ -1170,7 +1124,7 @@ test_pub=# SELECT * FROM t1; (8 rows) </programlisting> <programlisting> -test_sub=# SELECT * FROM t1; +/* sub # */ SELECT * FROM t1; a | b | c ---+-----+----- 6 | 106 | NSW @@ -1184,10 +1138,9 @@ test_sub=# SELECT * FROM t1; <literal>p1</literal>. The <command>UPDATE</command> replicates the change as normal. <programlisting> -test_pub=# UPDATE t1 SET b = 999 WHERE a = 6; -UPDATE 1 +/* pub # */ UPDATE t1 SET b = 999 WHERE a = 6; -test_pub=# SELECT * FROM t1; +/* pub # */ SELECT * FROM t1; a | b | c ---+-----+----- 2 | 102 | NSW @@ -1201,7 +1154,7 @@ test_pub=# SELECT * FROM t1; (8 rows) </programlisting> <programlisting> -test_sub=# SELECT * FROM t1; +/* sub # */ SELECT * FROM t1; a | b | c ---+-----+----- 9 | 109 | NSW @@ -1216,10 +1169,9 @@ test_sub=# SELECT * FROM t1; transformed into an <command>INSERT</command> and the change is replicated. See the new row on the subscriber. <programlisting> -test_pub=# UPDATE t1 SET a = 555 WHERE a = 2; -UPDATE 1 +/* pub # */ UPDATE t1 SET a = 555 WHERE a = 2; -test_pub=# SELECT * FROM t1; +/* pub # */ SELECT * FROM t1; a | b | c -----+-----+----- 3 | 103 | QLD @@ -1233,7 +1185,7 @@ test_pub=# SELECT * FROM t1; (8 rows) </programlisting> <programlisting> -test_sub=# SELECT * FROM t1; +/* sub # */ SELECT * FROM t1; a | b | c -----+-----+----- 9 | 109 | NSW @@ -1249,10 +1201,9 @@ test_sub=# SELECT * FROM t1; transformed into a <command>DELETE</command> and the change is replicated. See that the row is removed from the subscriber. <programlisting> -test_pub=# UPDATE t1 SET c = 'VIC' WHERE a = 9; -UPDATE 1 +/* pub # */ UPDATE t1 SET c = 'VIC' WHERE a = 9; -test_pub=# SELECT * FROM t1; +/* pub # */ SELECT * FROM t1; a | b | c -----+-----+----- 3 | 103 | QLD @@ -1266,7 +1217,7 @@ test_pub=# SELECT * FROM t1; (8 rows) </programlisting> <programlisting> -test_sub=# SELECT * FROM t1; +/* sub # */ SELECT * FROM t1; a | b | c -----+-----+----- 6 | 999 | NSW @@ -1284,17 +1235,13 @@ test_sub=# SELECT * FROM t1; <para> Create a partitioned table on the publisher. <programlisting> -test_pub=# CREATE TABLE parent(a int PRIMARY KEY) PARTITION BY RANGE(a); -CREATE TABLE -test_pub=# CREATE TABLE child PARTITION OF parent DEFAULT; -CREATE TABLE +/* pub # */ CREATE TABLE parent(a int PRIMARY KEY) PARTITION BY RANGE(a); +/* pub # */ CREATE TABLE child PARTITION OF parent DEFAULT; </programlisting> Create the same tables on the subscriber. <programlisting> -test_sub=# CREATE TABLE parent(a int PRIMARY KEY) PARTITION BY RANGE(a); -CREATE TABLE -test_sub=# CREATE TABLE child PARTITION OF parent DEFAULT; -CREATE TABLE +/* sub # */ CREATE TABLE parent(a int PRIMARY KEY) PARTITION BY RANGE(a); +/* sub # */ CREATE TABLE child PARTITION OF parent DEFAULT; </programlisting></para> <para> @@ -1302,16 +1249,14 @@ CREATE TABLE publication parameter <literal>publish_via_partition_root</literal> is set as true. There are row filters defined on both the partitioned table (<literal>parent</literal>), and on the partition (<literal>child</literal>). -<programlisting> -test_pub=# CREATE PUBLICATION p4 FOR TABLE parent WHERE (a < 5), child WHERE (a >= 5) -test_pub-# WITH (publish_via_partition_root=true); -CREATE PUBLICATION -</programlisting> -<programlisting> -test_sub=# CREATE SUBSCRIPTION s4 -test_sub-# CONNECTION 'host=localhost dbname=test_pub application_name=s4' -test_sub-# PUBLICATION p4; -CREATE SUBSCRIPTION +<programlisting><![CDATA[ +/* pub # */ CREATE PUBLICATION p4 FOR TABLE parent WHERE (a < 5), child WHERE (a >= 5) +/* pub - */ WITH (publish_via_partition_root=true); +]]></programlisting> +<programlisting> +/* sub # */ CREATE SUBSCRIPTION s4 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub application_name=s4' +/* sub - */ PUBLICATION p4; </programlisting></para> <para> @@ -1320,12 +1265,10 @@ CREATE SUBSCRIPTION <literal>parent</literal> (because <literal>publish_via_partition_root</literal> is true). <programlisting> -test_pub=# INSERT INTO parent VALUES (2), (4), (6); -INSERT 0 3 -test_pub=# INSERT INTO child VALUES (3), (5), (7); -INSERT 0 3 +/* pub # */ INSERT INTO parent VALUES (2), (4), (6); +/* pub # */ INSERT INTO child VALUES (3), (5), (7); -test_pub=# SELECT * FROM parent ORDER BY a; +/* pub # */ SELECT * FROM parent ORDER BY a; a --- 2 @@ -1337,7 +1280,7 @@ test_pub=# SELECT * FROM parent ORDER BY a; (6 rows) </programlisting> <programlisting> -test_sub=# SELECT * FROM parent ORDER BY a; +/* sub # */ SELECT * FROM parent ORDER BY a; a --- 2 @@ -1350,16 +1293,13 @@ test_sub=# SELECT * FROM parent ORDER BY a; Repeat the same test, but with a different value for <literal>publish_via_partition_root</literal>. The publication parameter <literal>publish_via_partition_root</literal> is set as false. A row filter is defined on the partition (<literal>child</literal>). +<programlisting><![CDATA[ +/* pub # */ DROP PUBLICATION p4; +/* pub # */ CREATE PUBLICATION p4 FOR TABLE parent, child WHERE (a >= 5) +/* pub - */ WITH (publish_via_partition_root=false); +]]></programlisting> <programlisting> -test_pub=# DROP PUBLICATION p4; -DROP PUBLICATION -test_pub=# CREATE PUBLICATION p4 FOR TABLE parent, child WHERE (a >= 5) -test_pub-# WITH (publish_via_partition_root=false); -CREATE PUBLICATION -</programlisting> -<programlisting> -test_sub=# ALTER SUBSCRIPTION s4 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* sub # */ ALTER SUBSCRIPTION s4 REFRESH PUBLICATION; </programlisting></para> <para> @@ -1367,14 +1307,11 @@ ALTER SUBSCRIPTION row filter of <literal>child</literal> (because <literal>publish_via_partition_root</literal> is false). <programlisting> -test_pub=# TRUNCATE parent; -TRUNCATE TABLE -test_pub=# INSERT INTO parent VALUES (2), (4), (6); -INSERT 0 3 -test_pub=# INSERT INTO child VALUES (3), (5), (7); -INSERT 0 3 +/* pub # */ TRUNCATE parent; +/* pub # */ INSERT INTO parent VALUES (2), (4), (6); +/* pub # */ INSERT INTO child VALUES (3), (5), (7); -test_pub=# SELECT * FROM parent ORDER BY a; +/* pub # */ SELECT * FROM parent ORDER BY a; a --- 2 @@ -1386,7 +1323,7 @@ test_pub=# SELECT * FROM parent ORDER BY a; (6 rows) </programlisting> <programlisting> -test_sub=# SELECT * FROM child ORDER BY a; +/* sub # */ SELECT * FROM child ORDER BY a; a --- 5 @@ -1505,8 +1442,7 @@ test_sub=# SELECT * FROM child ORDER BY a; <para> Create a table <literal>t1</literal> to be used in the following example. <programlisting> -test_pub=# CREATE TABLE t1(id int, a text, b text, c text, d text, e text, PRIMARY KEY(id)); -CREATE TABLE +/* pub # */ CREATE TABLE t1(id int, a text, b text, c text, d text, e text, PRIMARY KEY(id)); </programlisting></para> <para> @@ -1515,15 +1451,14 @@ CREATE TABLE replicated. Notice that the order of column names in the column list does not matter. <programlisting> -test_pub=# CREATE PUBLICATION p1 FOR TABLE t1 (id, b, a, d); -CREATE PUBLICATION +/* pub # */ CREATE PUBLICATION p1 FOR TABLE t1 (id, b, a, d); </programlisting></para> <para> <literal>psql</literal> can be used to show the column lists (if defined) for each publication. <programlisting> -test_pub=# \dRp+ +/* pub # */ \dRp+ Publication p1 Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ----------+------------+---------+---------+---------+-----------+---------- @@ -1536,7 +1471,7 @@ Tables: <literal>psql</literal> can be used to show the column lists (if defined) for each table. <programlisting> -test_pub=# \d t1 +/* pub # */ \d t1 Table "public.t1" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- @@ -1559,24 +1494,19 @@ Publications: <literal>s1</literal> that subscribes to the publication <literal>p1</literal>. <programlisting> -test_sub=# CREATE TABLE t1(id int, b text, a text, d text, PRIMARY KEY(id)); -CREATE TABLE -test_sub=# CREATE SUBSCRIPTION s1 -test_sub-# CONNECTION 'host=localhost dbname=test_pub application_name=s1' -test_sub-# PUBLICATION p1; -CREATE SUBSCRIPTION +/* sub # */ CREATE TABLE t1(id int, b text, a text, d text, PRIMARY KEY(id)); +/* sub # */ CREATE SUBSCRIPTION s1 +/* sub - */ CONNECTION 'host=localhost dbname=test_pub application_name=s1' +/* sub - */ PUBLICATION p1; </programlisting></para> <para> On the publisher node, insert some rows to table <literal>t1</literal>. <programlisting> -test_pub=# INSERT INTO t1 VALUES(1, 'a-1', 'b-1', 'c-1', 'd-1', 'e-1'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES(2, 'a-2', 'b-2', 'c-2', 'd-2', 'e-2'); -INSERT 0 1 -test_pub=# INSERT INTO t1 VALUES(3, 'a-3', 'b-3', 'c-3', 'd-3', 'e-3'); -INSERT 0 1 -test_pub=# SELECT * FROM t1 ORDER BY id; +/* pub # */ INSERT INTO t1 VALUES(1, 'a-1', 'b-1', 'c-1', 'd-1', 'e-1'); +/* pub # */ INSERT INTO t1 VALUES(2, 'a-2', 'b-2', 'c-2', 'd-2', 'e-2'); +/* pub # */ INSERT INTO t1 VALUES(3, 'a-3', 'b-3', 'c-3', 'd-3', 'e-3'); +/* pub # */ SELECT * FROM t1 ORDER BY id; id | a | b | c | d | e ----+-----+-----+-----+-----+----- 1 | a-1 | b-1 | c-1 | d-1 | e-1 @@ -1589,7 +1519,7 @@ test_pub=# SELECT * FROM t1 ORDER BY id; Only data from the column list of publication <literal>p1</literal> is replicated. <programlisting> -test_sub=# SELECT * FROM t1 ORDER BY id; +/* sub # */ SELECT * FROM t1 ORDER BY id; id | b | a | d ----+-----+-----+----- 1 | b-1 | a-1 | d-1 @@ -1617,13 +1547,10 @@ test_sub=# SELECT * FROM t1 ORDER BY id; For example, note below that subscriber table generated column value comes from the subscriber column's calculation. <programlisting> -test_pub=# CREATE TABLE tab_gen_to_gen (a int, b int GENERATED ALWAYS AS (a + 1) STORED); -CREATE TABLE -test_pub=# INSERT INTO tab_gen_to_gen VALUES (1),(2),(3); -INSERT 0 3 -test_pub=# CREATE PUBLICATION pub1 FOR TABLE tab_gen_to_gen; -CREATE PUBLICATION -test_pub=# SELECT * FROM tab_gen_to_gen; +/* pub # */ CREATE TABLE tab_gen_to_gen (a int, b int GENERATED ALWAYS AS (a + 1) STORED); +/* pub # */ INSERT INTO tab_gen_to_gen VALUES (1),(2),(3); +/* pub # */ CREATE PUBLICATION pub1 FOR TABLE tab_gen_to_gen; +/* pub # */ SELECT * FROM tab_gen_to_gen; a | b ---+--- 1 | 2 @@ -1631,11 +1558,9 @@ test_pub=# SELECT * FROM tab_gen_to_gen; 3 | 4 (3 rows) -test_sub=# CREATE TABLE tab_gen_to_gen (a int, b int GENERATED ALWAYS AS (a * 100) STORED); -CREATE TABLE -test_sub=# CREATE SUBSCRIPTION sub1 CONNECTION 'dbname=test_pub' PUBLICATION pub1; -CREATE SUBSCRIPTION -test_sub=# SELECT * from tab_gen_to_gen; +/* sub # */ CREATE TABLE tab_gen_to_gen (a int, b int GENERATED ALWAYS AS (a * 100) STORED); +/* sub # */ CREATE SUBSCRIPTION sub1 CONNECTION 'dbname=test_pub' PUBLICATION pub1; +/* sub # */ SELECT * from tab_gen_to_gen; a | b ---+---- 1 | 100 @@ -2488,7 +2413,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER </para> <sect2 id="prepare-publisher-upgrades"> - <title>Prepare for publisher upgrades</title> + <title>Prepare for Publisher Upgrades</title> <para> <application>pg_upgrade</application> attempts to migrate logical @@ -2560,7 +2485,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER </sect2> <sect2 id="prepare-subscriber-upgrades"> - <title>Prepare for subscriber upgrades</title> + <title>Prepare for Subscriber Upgrades</title> <para> Setup the <link linkend="logical-replication-config-subscriber"> @@ -2610,7 +2535,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER </sect2> <sect2 id="upgrading-logical-replication-clusters"> - <title>Upgrading logical replication clusters</title> + <title>Upgrading Logical Replication Clusters</title> <para> While upgrading a subscriber, write operations can be performed in the @@ -2674,7 +2599,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER </para> <sect3 id="steps-two-node-logical-replication-cluster"> - <title>Steps to upgrade a two-node logical replication cluster</title> + <title>Steps to Upgrade a Two-node Logical Replication Cluster</title> <para> Let's say publisher is in <literal>node1</literal> and subscriber is in <literal>node2</literal>. The subscriber <literal>node2</literal> has @@ -2690,8 +2615,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER <link linkend="sql-altersubscription-params-disable"><command>ALTER SUBSCRIPTION ... DISABLE</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 DISABLE; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 DISABLE; </programlisting> </para> </step> @@ -2780,8 +2704,7 @@ pg_ctl -D /opt/PostgreSQL/data2_upgraded start -l logfile <xref linkend="two-node-cluster-disable-subscriptions-node2"/> and now, e.g.: <programlisting> -node2=# CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); -CREATE TABLE +/* node2 # */ CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); </programlisting> </para> </step> @@ -2793,8 +2716,7 @@ CREATE TABLE <link linkend="sql-altersubscription-params-enable"><command>ALTER SUBSCRIPTION ... ENABLE</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 ENABLE; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 ENABLE; </programlisting> </para> </step> @@ -2805,8 +2727,7 @@ ALTER SUBSCRIPTION <link linkend="sql-altersubscription-params-refresh-publication"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 REFRESH PUBLICATION; </programlisting> </para> </step> @@ -2822,7 +2743,7 @@ ALTER SUBSCRIPTION </sect3> <sect3 id="steps-cascaded-logical-replication-cluster"> - <title>Steps to upgrade a cascaded logical replication cluster</title> + <title>Steps to Upgrade a Cascaded Logical Replication Cluster</title> <para> Let's say we have a cascaded logical replication setup <literal>node1</literal>-><literal>node2</literal>-><literal>node3</literal>. @@ -2844,8 +2765,7 @@ ALTER SUBSCRIPTION <link linkend="sql-altersubscription-params-disable"><command>ALTER SUBSCRIPTION ... DISABLE</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 DISABLE; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 DISABLE; </programlisting> </para> </step> @@ -2896,8 +2816,7 @@ pg_ctl -D /opt/PostgreSQL/data1_upgraded start -l logfile <link linkend="sql-altersubscription-params-disable"><command>ALTER SUBSCRIPTION ... DISABLE</command></link>, e.g.: <programlisting> -node3=# ALTER SUBSCRIPTION sub1_node2_node3 DISABLE; -ALTER SUBSCRIPTION +/* node3 # */ ALTER SUBSCRIPTION sub1_node2_node3 DISABLE; </programlisting> </para> </step> @@ -2948,8 +2867,7 @@ pg_ctl -D /opt/PostgreSQL/data2_upgraded start -l logfile <xref linkend="cascaded-cluster-disable-sub-node1-node2"/> and now, e.g.: <programlisting> -node2=# CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); -CREATE TABLE +/* node2 # */ CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); </programlisting> </para> </step> @@ -2961,8 +2879,7 @@ CREATE TABLE <link linkend="sql-altersubscription-params-enable"><command>ALTER SUBSCRIPTION ... ENABLE</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 ENABLE; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 ENABLE; </programlisting> </para> </step> @@ -2973,8 +2890,7 @@ ALTER SUBSCRIPTION <link linkend="sql-altersubscription-params-refresh-publication"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 REFRESH PUBLICATION; </programlisting> </para> </step> @@ -3025,8 +2941,7 @@ pg_ctl -D /opt/PostgreSQL/data3_upgraded start -l logfile <xref linkend="cascaded-cluster-disable-sub-node2-node3"/> and now, e.g.: <programlisting> -node3=# CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); -CREATE TABLE +/* node3 # */ CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); </programlisting> </para> </step> @@ -3038,8 +2953,7 @@ CREATE TABLE <link linkend="sql-altersubscription-params-enable"><command>ALTER SUBSCRIPTION ... ENABLE</command></link>, e.g.: <programlisting> -node3=# ALTER SUBSCRIPTION sub1_node2_node3 ENABLE; -ALTER SUBSCRIPTION +/* node3 # */ ALTER SUBSCRIPTION sub1_node2_node3 ENABLE; </programlisting> </para> </step> @@ -3050,8 +2964,7 @@ ALTER SUBSCRIPTION <link linkend="sql-altersubscription-params-refresh-publication"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>, e.g.: <programlisting> -node3=# ALTER SUBSCRIPTION sub1_node2_node3 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* node3 # */ ALTER SUBSCRIPTION sub1_node2_node3 REFRESH PUBLICATION; </programlisting> </para> </step> @@ -3059,7 +2972,7 @@ ALTER SUBSCRIPTION </sect3> <sect3 id="steps-two-node-circular-logical-replication-cluster"> - <title>Steps to upgrade a two-node circular logical replication cluster</title> + <title>Steps to Upgrade a Two-node Circular Logical Replication Cluster</title> <para> Let's say we have a circular logical replication setup <literal>node1</literal>-><literal>node2</literal> and @@ -3082,8 +2995,7 @@ ALTER SUBSCRIPTION <link linkend="sql-altersubscription-params-disable"><command>ALTER SUBSCRIPTION ... DISABLE</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 DISABLE; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 DISABLE; </programlisting> </para> </step> @@ -3134,8 +3046,7 @@ pg_ctl -D /opt/PostgreSQL/data1_upgraded start -l logfile <link linkend="sql-altersubscription-params-enable"><command>ALTER SUBSCRIPTION ... ENABLE</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 ENABLE; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 ENABLE; </programlisting> </para> </step> @@ -3146,8 +3057,7 @@ ALTER SUBSCRIPTION <literal>node2</literal> between <xref linkend="circular-cluster-disable-sub-node2"/> and now, e.g.: <programlisting> -node1=# CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); -CREATE TABLE +/* node1 # */ CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); </programlisting> </para> </step> @@ -3160,8 +3070,7 @@ CREATE TABLE <link linkend="sql-altersubscription-params-refresh-publication"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>, e.g.: <programlisting> -node1=# ALTER SUBSCRIPTION sub1_node2_node1 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* node1 # */ ALTER SUBSCRIPTION sub1_node2_node1 REFRESH PUBLICATION; </programlisting> </para> </step> @@ -3173,8 +3082,7 @@ ALTER SUBSCRIPTION <link linkend="sql-altersubscription-params-disable"><command>ALTER SUBSCRIPTION ... DISABLE</command></link>, e.g.: <programlisting> -node1=# ALTER SUBSCRIPTION sub1_node2_node1 DISABLE; -ALTER SUBSCRIPTION +/* node1 # */ ALTER SUBSCRIPTION sub1_node2_node1 DISABLE; </programlisting> </para> </step> @@ -3225,8 +3133,7 @@ pg_ctl -D /opt/PostgreSQL/data2_upgraded start -l logfile <link linkend="sql-altersubscription-params-enable"><command>ALTER SUBSCRIPTION ... ENABLE</command></link>, e.g.: <programlisting> -node1=# ALTER SUBSCRIPTION sub1_node2_node1 ENABLE; -ALTER SUBSCRIPTION +/* node1 # */ ALTER SUBSCRIPTION sub1_node2_node1 ENABLE; </programlisting> </para> </step> @@ -3237,8 +3144,7 @@ ALTER SUBSCRIPTION the upgraded <literal>node1</literal> between <xref linkend="circular-cluster-disable-sub-node1"/> and now, e.g.: <programlisting> -node2=# CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); -CREATE TABLE +/* node2 # */ CREATE TABLE distributors (did integer PRIMARY KEY, name varchar(40)); </programlisting> </para> </step> @@ -3250,8 +3156,7 @@ CREATE TABLE <link linkend="sql-altersubscription-params-refresh-publication"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>, e.g.: <programlisting> -node2=# ALTER SUBSCRIPTION sub1_node1_node2 REFRESH PUBLICATION; -ALTER SUBSCRIPTION +/* node2 # */ ALTER SUBSCRIPTION sub1_node1_node2 REFRESH PUBLICATION; </programlisting> </para> </step> diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index 3f2bcd45a1e..fc288d691b9 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -169,7 +169,7 @@ COMMIT 693 $ pg_recvlogical -d postgres --slot=test --drop-slot Example 2: -$ pg_recvlogical -d postgres --slot=test --create-slot --two-phase +$ pg_recvlogical -d postgres --slot=test --create-slot --enable-two-phase $ pg_recvlogical -d postgres --slot=test --start -f - <keycombo action="simul"><keycap>Control</keycap><keycap>Z</keycap></keycombo> $ psql -d postgres -c "BEGIN;INSERT INTO data(data) VALUES('5');PREPARE TRANSACTION 'test';" @@ -370,10 +370,10 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU <function>pg_create_logical_replication_slot</function></link>, or by using the <link linkend="sql-createsubscription-params-with-failover"> <literal>failover</literal></link> option of - <command>CREATE SUBSCRIPTION</command> during slot creation, and then calling - <link linkend="pg-sync-replication-slots"> - <function>pg_sync_replication_slots</function></link> - on the standby. By setting <link linkend="guc-sync-replication-slots"> + <command>CREATE SUBSCRIPTION</command> during slot creation. + Additionally, enabling <link linkend="guc-sync-replication-slots"> + <varname>sync_replication_slots</varname></link> on the standby + is required. By enabling <link linkend="guc-sync-replication-slots"> <varname>sync_replication_slots</varname></link> on the standby, the failover slots can be synchronized periodically in the slotsync worker. For the synchronization to work, it is mandatory to @@ -398,6 +398,52 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU receiving the WAL up to the latest flushed position on the primary server. </para> + <note> + <para> + While enabling <link linkend="guc-sync-replication-slots"> + <varname>sync_replication_slots</varname></link> allows for automatic + periodic synchronization of failover slots, they can also be manually + synchronized using the <link linkend="pg-sync-replication-slots"> + <function>pg_sync_replication_slots</function></link> function on the standby. + However, this function is primarily intended for testing and debugging and + should be used with caution. Unlike automatic synchronization, it does not + include cyclic retries, making it more prone to synchronization failures, + particularly during initial sync scenarios where the required WAL files + or catalog rows for the slot may have already been removed or are at risk + of being removed on the standby. In contrast, automatic synchronization + via <varname>sync_replication_slots</varname> provides continuous slot + updates, enabling seamless failover and supporting high availability. + Therefore, it is the recommended method for synchronizing slots. + </para> + </note> + + <para> + When slot synchronization is configured as recommended, + and the initial synchronization is performed either automatically or + manually via pg_sync_replication_slot, the standby can persist the + synchronized slot only if the following condition is met: The logical + replication slot on the primary must retain WALs and system catalog + rows that are still available on the standby. This ensures data + integrity and allows logical replication to continue smoothly after + promotion. + If the required WALs or catalog rows have already been purged from the + standby, the slot will not be persisted to avoid data loss. In such + cases, the following log message may appear: +<programlisting> + LOG: could not synchronize replication slot "failover_slot" + DETAIL: Synchronization could lead to data loss as the remote slot needs WAL at LSN 0/3003F28 and catalog xmin 754, but the standby has LSN 0/3003F28 and catalog xmin 756 +</programlisting> + If the logical replication slot is actively used by a consumer, no + manual intervention is needed; the slot will advance automatically, + and synchronization will resume in the next cycle. However, if no + consumer is configured, it is advisable to manually advance the slot + on the primary using <link linkend="pg-logical-slot-get-changes"> + <function>pg_logical_slot_get_changes</function></link> or + <link linkend="pg-logical-slot-get-binary-changes"> + <function>pg_logical_slot_get_binary_changes</function></link>, + allowing synchronization to proceed. + </para> + <para> The ability to resume logical replication after failover depends upon the <link linkend="view-pg-replication-slots">pg_replication_slots</link>.<structfield>synced</structfield> @@ -455,9 +501,8 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU using the slot's contents without losing any changes. </para> <para> - Creation of a snapshot is not always possible. In particular, it will - fail when connected to a hot standby. Applications that do not require - snapshot export may suppress it with the <literal>NOEXPORT_SNAPSHOT</literal> + Applications that do not require + snapshot export may suppress it with the <literal>SNAPSHOT 'nothing'</literal> option. </para> </sect2> diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml index 4071da4ed94..c747a5818ab 100644 --- a/doc/src/sgml/pgstattuple.sgml +++ b/doc/src/sgml/pgstattuple.sgml @@ -270,6 +270,15 @@ leaf_fragmentation | 0 page than is accounted for by <literal>internal_pages + leaf_pages + empty_pages + deleted_pages</literal>, because it also includes the index's metapage. + <literal>avg_leaf_density</literal> is the fraction of the index size that + is taken up by user data. Since indexes have a default fillfactor of 90, + this should be around 90 for newly built indexes of non-negligible size, + but usually deteriorates over time. + <literal>leaf_fragmentation</literal> represents a measure of disorder. + A higher <literal>leaf_fragmentation</literal> indicates that the + physical order of the index leaf pages increasingly deviates from their + logical order. This can have a significant impact if a large part + of the index is read from disk. </para> <para> diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index bee817ea822..cb065bf5f88 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -1,6 +1,6 @@ <!-- doc/src/sgml/plpython.sgml --> -<chapter id="plpython"> +<chapter id="plpython" xreflabel="PL/Python"> <title>PL/Python — Python Procedural Language</title> <indexterm zone="plpython"><primary>PL/Python</primary></indexterm> diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index c4d3853cbf2..82fe3f93761 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -189,7 +189,7 @@ </sect2> <sect2 id="protocol-versions"> - <title>Protocol versions</title> + <title>Protocol Versions</title> <para> The current, latest version of the protocol is version 3.2. However, for @@ -226,7 +226,7 @@ </para> <table id="protocol-versions-table"> - <title>Protocol versions</title> + <title>Protocol Versions</title> <tgroup cols="3"> <thead> @@ -7292,8 +7292,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;" <term>Int64 (XLogRecPtr)</term> <listitem> <para> - The LSN of the abort. This field is available since protocol version - 4. + The LSN of the abort operation, present only when streaming is set to parallel. + This field is available since protocol version 4. </para> </listitem> </varlistentry> @@ -7302,9 +7302,9 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;" <term>Int64 (TimestampTz)</term> <listitem> <para> - Abort timestamp of the transaction. The value is in number - of microseconds since PostgreSQL epoch (2000-01-01). This field is - available since protocol version 4. + Abort timestamp of the transaction, present only when streaming is set to + parallel. The value is in number of microseconds since PostgreSQL epoch (2000-01-01). + This field is available since protocol version 4. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml index 9da8920e12e..1fc051e11a3 100644 --- a/doc/src/sgml/ref/alter_database.sgml +++ b/doc/src/sgml/ref/alter_database.sgml @@ -83,7 +83,7 @@ ALTER DATABASE <replaceable class="parameter">name</replaceable> RESET ALL must be empty for this database, and no one can be connected to the database. Tables and indexes in non-default tablespaces are unaffected. The method used to copy files to the new tablespace - is affected by the <xref linkend="guc_file_copy_method"/> setting. + is affected by the <xref linkend="guc-file-copy-method"/> setting. </para> <para> diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index d63f3a621ac..d1696991683 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -460,8 +460,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <para> This form adds a new constraint to a table using the same constraint syntax as <link linkend="sql-createtable"><command>CREATE TABLE</command></link>, plus the option <literal>NOT - VALID</literal>, which is currently only allowed for foreign key, - <literal>CHECK</literal> constraints and not-null constraints. + VALID</literal>, which is currently only allowed for foreign-key, + <literal>CHECK</literal>, and not-null constraints. </para> <para> @@ -469,7 +469,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM existing rows in the table satisfy the new constraint. But if the <literal>NOT VALID</literal> option is used, this potentially-lengthy scan is skipped. The constraint will still be - enforced against subsequent inserts or updates (that is, they'll fail + applied against subsequent inserts or updates (that is, they'll fail unless there is a matching row in the referenced table, in the case of foreign keys, or they'll fail unless the new row matches the specified check condition). But the @@ -591,7 +591,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM This form validates a foreign key, check, or not-null constraint that was previously created as <literal>NOT VALID</literal>, by scanning the table to ensure there are no rows for which the constraint is not - satisfied. If the constraint is not enforced, an error is thrown. + satisfied. If the constraint was set to <literal>NOT ENFORCED</literal>, an error is thrown. Nothing happens if the constraint is already marked valid. (See <xref linkend="sql-altertable-notes"/> below for an explanation of the usefulness of this command.) @@ -1466,11 +1466,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </para> <para> - Adding an enforced <literal>CHECK</literal> or <literal>NOT NULL</literal> + Adding a <literal>CHECK</literal> or <literal>NOT NULL</literal> constraint requires scanning the table to verify that existing rows meet the constraint, but does not require a table rewrite. If a <literal>CHECK</literal> - constraint is added as <literal>NOT ENFORCED</literal>, the validation will - not be performed. + constraint is added as <literal>NOT ENFORCED</literal>, no verification will + be performed. </para> <para> @@ -1485,7 +1485,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </para> <para> - Scanning a large table to verify a new foreign key or check constraint + Scanning a large table to verify new foreign-key, check, or not-null constraints can take a long time, and other updates to the table are locked out until the <command>ALTER TABLE ADD CONSTRAINT</command> command is committed. The main purpose of the <literal>NOT VALID</literal> diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index 640c0425fae..4da8aeebb50 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -140,7 +140,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> after the creation of the new database. In some situations, this may have a noticeable negative impact on overall system performance. The <literal>FILE_COPY</literal> strategy is affected by the <xref - linkend="guc_file_copy_method"/> setting. + linkend="guc-file-copy-method"/> setting. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml index d08834ac9d2..009fa46532b 100644 --- a/doc/src/sgml/ref/create_foreign_table.sgml +++ b/doc/src/sgml/ref/create_foreign_table.sgml @@ -232,7 +232,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <term><literal>INCLUDING COMMENTS</literal></term> <listitem> <para> - Comments for the copied columns, constraints, and indexes will be + Comments for the copied columns and constraints will be copied. The default behavior is to exclude comments, resulting in the copied columns and constraints in the new table having no comments. diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index 147a8f7587c..b9c679c41e8 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -814,7 +814,7 @@ Indexes: leveraging multiple CPUs in order to process the table rows faster. This feature is known as <firstterm>parallel index build</firstterm>. For index methods that support building indexes - in parallel (currently, B-tree and BRIN), + in parallel (currently, B-tree, GIN, and BRIN), <varname>maintenance_work_mem</varname> specifies the maximum amount of memory that can be used by each index build operation as a whole, regardless of how many worker processes were started. diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml index 3553d364541..d2ffb1b2a50 100644 --- a/doc/src/sgml/ref/create_operator.sgml +++ b/doc/src/sgml/ref/create_operator.sgml @@ -23,7 +23,7 @@ PostgreSQL documentation <synopsis> CREATE OPERATOR <replaceable>name</replaceable> ( {FUNCTION|PROCEDURE} = <replaceable class="parameter">function_name</replaceable> - [, LEFTARG = <replaceable class="parameter">left_type</replaceable> ] [, RIGHTARG = <replaceable class="parameter">right_type</replaceable> ] + [, LEFTARG = <replaceable class="parameter">left_type</replaceable> ] , RIGHTARG = <replaceable class="parameter">right_type</replaceable> [, COMMUTATOR = <replaceable class="parameter">com_op</replaceable> ] [, NEGATOR = <replaceable class="parameter">neg_op</replaceable> ] [, RESTRICT = <replaceable class="parameter">res_proc</replaceable> ] [, JOIN = <replaceable class="parameter">join_proc</replaceable> ] [, HASHES ] [, MERGES ] @@ -88,8 +88,8 @@ CREATE OPERATOR <replaceable>name</replaceable> ( <para> For binary operators, both <literal>LEFTARG</literal> and - <literal>RIGHTARG</literal> must be defined. For prefix operators only - <literal>RIGHTARG</literal> should be defined. + <literal>RIGHTARG</literal> must be defined. For prefix operators, only + <literal>RIGHTARG</literal> must be defined. The <replaceable class="parameter">function_name</replaceable> function must have been previously defined using <command>CREATE FUNCTION</command> and must be defined to accept the correct number diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 4a41b2f5530..dc000e913c1 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -448,11 +448,6 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </para> <para> - Partitioned tables do not support <literal>EXCLUDE</literal> constraints; - however, you can define these constraints on individual partitions. - </para> - - <para> See <xref linkend="ddl-partitioning"/> for more discussion on table partitioning. </para> @@ -929,6 +924,15 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM not other generated columns. Any functions and operators used must be immutable. References to other tables are not allowed. </para> + + <para> + A virtual generated column cannot have a user-defined type, and the + generation expression of a virtual generated column must not reference + user-defined functions or types, that is, it can only use built-in + functions or types. This applies also indirectly, such as for functions + or types that underlie operators or casts. (This restriction does not + exist for stored generated columns.) + </para> </listitem> </varlistentry> @@ -1162,6 +1166,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM exclusion constraint on a subset of the table; internally this creates a partial index. Note that parentheses are required around the predicate. </para> + + <para> + When establishing an exclusion constraint for a multi-level partition + hierarchy, all the columns in the partition key of the target + partitioned table, as well as those of all its descendant partitioned + tables, must be included in the constraint definition. Additionally, + those columns must be compared using the equality operator. These + restrictions ensure that potentially-conflicting rows will exist in the + same partition. The constraint may also refer to other columns which + are not a part of any partition key, which can be compared using any + appropriate operator. + </para> </listitem> </varlistentry> @@ -1687,7 +1703,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <varlistentry id="reloption-vacuum-truncate" xreflabel="vacuum_truncate"> <term><literal>vacuum_truncate</literal>, <literal>toast.vacuum_truncate</literal> (<type>boolean</type>) <indexterm> - <primary><varname>vacuum_truncate</varname> storage parameter</primary> + <primary><varname>vacuum_truncate</varname></primary> + <secondary>storage parameter</secondary> </indexterm> </term> <listitem> diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index ecbcd8345d8..c2e181066a4 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -23,37 +23,37 @@ PostgreSQL documentation <synopsis> [ WITH <replaceable class="parameter">with_query</replaceable> [, ...] ] MERGE INTO [ ONLY ] <replaceable class="parameter">target_table_name</replaceable> [ * ] [ [ AS ] <replaceable class="parameter">target_alias</replaceable> ] -USING <replaceable class="parameter">data_source</replaceable> ON <replaceable class="parameter">join_condition</replaceable> -<replaceable class="parameter">when_clause</replaceable> [...] -[ RETURNING [ WITH ( { OLD | NEW } AS <replaceable class="parameter">output_alias</replaceable> [, ...] ) ] - { * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] } [, ...] ] + USING <replaceable class="parameter">data_source</replaceable> ON <replaceable class="parameter">join_condition</replaceable> + <replaceable class="parameter">when_clause</replaceable> [...] + [ RETURNING [ WITH ( { OLD | NEW } AS <replaceable class="parameter">output_alias</replaceable> [, ...] ) ] + { * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] } [, ...] ] <phrase>where <replaceable class="parameter">data_source</replaceable> is:</phrase> -{ [ ONLY ] <replaceable class="parameter">source_table_name</replaceable> [ * ] | ( <replaceable class="parameter">source_query</replaceable> ) } [ [ AS ] <replaceable class="parameter">source_alias</replaceable> ] + { [ ONLY ] <replaceable class="parameter">source_table_name</replaceable> [ * ] | ( <replaceable class="parameter">source_query</replaceable> ) } [ [ AS ] <replaceable class="parameter">source_alias</replaceable> ] <phrase>and <replaceable class="parameter">when_clause</replaceable> is:</phrase> -{ WHEN MATCHED [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | - WHEN NOT MATCHED BY SOURCE [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | - WHEN NOT MATCHED [ BY TARGET ] [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_insert</replaceable> | DO NOTHING } } + { WHEN MATCHED [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | + WHEN NOT MATCHED BY SOURCE [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | + WHEN NOT MATCHED [ BY TARGET ] [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_insert</replaceable> | DO NOTHING } } <phrase>and <replaceable class="parameter">merge_insert</replaceable> is:</phrase> -INSERT [( <replaceable class="parameter">column_name</replaceable> [, ...] )] -[ OVERRIDING { SYSTEM | USER } VALUE ] -{ VALUES ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | DEFAULT VALUES } + INSERT [( <replaceable class="parameter">column_name</replaceable> [, ...] )] + [ OVERRIDING { SYSTEM | USER } VALUE ] + { VALUES ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | DEFAULT VALUES } <phrase>and <replaceable class="parameter">merge_update</replaceable> is:</phrase> -UPDATE SET { <replaceable class="parameter">column_name</replaceable> = { <replaceable class="parameter">expression</replaceable> | DEFAULT } | - ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = [ ROW ] ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | - ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = ( <replaceable class="parameter">sub-SELECT</replaceable> ) - } [, ...] + UPDATE SET { <replaceable class="parameter">column_name</replaceable> = { <replaceable class="parameter">expression</replaceable> | DEFAULT } | + ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = [ ROW ] ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | + ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = ( <replaceable class="parameter">sub-SELECT</replaceable> ) + } [, ...] <phrase>and <replaceable class="parameter">merge_delete</replaceable> is:</phrase> -DELETE + DELETE </synopsis> </refsynopsisdiv> @@ -106,10 +106,11 @@ DELETE to compute and return value(s) based on each row inserted, updated, or deleted. Any expression using the source or target table's columns, or the <link linkend="merge-action"><function>merge_action()</function></link> - function can be computed. When an <command>INSERT</command> or + function can be computed. By default, when an <command>INSERT</command> or <command>UPDATE</command> action is performed, the new values of the target - table's columns are used. When a <command>DELETE</command> is performed, - the old values of the target table's columns are used. The syntax of the + table's columns are used, and when a <command>DELETE</command> is performed, + the old values of the target table's columns are used, but it is also + possible to explicitly request old and new values. The syntax of the <literal>RETURNING</literal> list is identical to that of the output list of <command>SELECT</command>. </para> diff --git a/doc/src/sgml/ref/pg_createsubscriber.sgml b/doc/src/sgml/ref/pg_createsubscriber.sgml index 4b1d08d5f16..bb9cc72576c 100644 --- a/doc/src/sgml/ref/pg_createsubscriber.sgml +++ b/doc/src/sgml/ref/pg_createsubscriber.sgml @@ -170,36 +170,6 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-R <replaceable class="parameter">objtype</replaceable></option></term> - <term><option>--remove=<replaceable class="parameter">objtype</replaceable></option></term> - <listitem> - <para> - Remove all objects of the specified type from specified databases on the - target server. - </para> - <para> - <itemizedlist> - <listitem> - <para> - <literal>publications</literal>: - The <literal>FOR ALL TABLES</literal> publications established for this - subscriber are always removed; specifying this object type causes all - other publications replicated from the source server to be dropped as - well. - </para> - </listitem> - </itemizedlist> - </para> - <para> - The objects selected to be dropped are individually logged, including during - a <option>--dry-run</option>. There is no opportunity to affect or stop the - dropping of the selected objects, so consider taking a backup of them - using <application>pg_dump</application>. - </para> - </listitem> - </varlistentry> - - <varlistentry> <term><option>-s <replaceable class="parameter">dir</replaceable></option></term> <term><option>--socketdir=<replaceable class="parameter">dir</replaceable></option></term> <listitem> @@ -260,6 +230,35 @@ PostgreSQL documentation </varlistentry> <varlistentry> + <term><option>--clean=<replaceable class="parameter">objtype</replaceable></option></term> + <listitem> + <para> + Drop all objects of the specified type from specified databases on the + target server. + </para> + <para> + <itemizedlist> + <listitem> + <para> + <literal>publications</literal>: + The <literal>FOR ALL TABLES</literal> publications established for this + subscriber are always dropped; specifying this object type causes all + other publications replicated from the source server to be dropped as + well. + </para> + </listitem> + </itemizedlist> + </para> + <para> + The objects selected to be dropped are individually logged, including during + a <option>--dry-run</option>. There is no opportunity to affect or stop the + dropping of the selected objects, so consider taking a backup of them + using <application>pg_dump</application>. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>--config-file=<replaceable class="parameter">filename</replaceable></option></term> <listitem> <para> diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index c10bca63e55..2ae084b5fa6 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -18,7 +18,7 @@ PostgreSQL documentation <refname>pg_dump</refname> <refpurpose> - extract a <productname>PostgreSQL</productname> database into a script file or other archive file + export a <productname>PostgreSQL</productname> database as an SQL script or to other formats </refpurpose> </refnamediv> @@ -1134,7 +1134,7 @@ PostgreSQL documentation <term><option>--no-statistics</option></term> <listitem> <para> - Do not dump statistics. + Do not dump statistics. This is the default. </para> </listitem> </varlistentry> @@ -1277,11 +1277,11 @@ PostgreSQL documentation </para> <para> The data section contains actual table data, large-object - contents, statistics for tables and materialized views and - sequence values. + contents, sequence values, and statistics for tables, + materialized views, and foreign tables. Post-data items include definitions of indexes, triggers, rules, statistics for indexes, and constraints other than validated check - constraints. + and not-null constraints. Pre-data items include all other data definition items. </para> </listitem> @@ -1359,7 +1359,8 @@ PostgreSQL documentation <listitem> <para> Dump only the statistics, not the schema (data definitions) or data. - Statistics for tables, materialized views, and indexes are dumped. + Statistics for tables, materialized views, foreign tables, + and indexes are dumped. </para> </listitem> </varlistentry> @@ -1461,7 +1462,7 @@ PostgreSQL documentation <term><option>--with-statistics</option></term> <listitem> <para> - Dump statistics. This is the default. + Dump statistics. </para> </listitem> </varlistentry> @@ -1681,14 +1682,14 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - By default, <command>pg_dump</command> will include most optimizer - statistics in the resulting dump file. However, some statistics may not be - included, such as those created explicitly with <xref - linkend="sql-createstatistics"/> or custom statistics added by an - extension. Therefore, it may be useful to run <command>ANALYZE</command> - after restoring from a dump file to ensure optimal performance; see <xref - linkend="vacuum-for-statistics"/> and <xref linkend="autovacuum"/> for more - information. + If <option>--with-statistics</option> is specified, + <command>pg_dump</command> will include most optimizer statistics in the + resulting dump file. However, some statistics may not be included, such as + those created explicitly with <xref linkend="sql-createstatistics"/> or + custom statistics added by an extension. Therefore, it may be useful to + run <command>ANALYZE</command> after restoring from a dump file to ensure + optimal performance; see <xref linkend="vacuum-for-statistics"/> and <xref + linkend="autovacuum"/> for more information. </para> <para> diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index 8c5141d036c..8ca68da5a55 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -16,7 +16,10 @@ PostgreSQL documentation <refnamediv> <refname>pg_dumpall</refname> - <refpurpose>extract a <productname>PostgreSQL</productname> database cluster using a specified dump format</refpurpose> + + <refpurpose> + export a <productname>PostgreSQL</productname> database cluster as an SQL script or to other formats + </refpurpose> </refnamediv> <refsynopsisdiv> @@ -33,7 +36,7 @@ PostgreSQL documentation <para> <application>pg_dumpall</application> is a utility for writing out (<quote>dumping</quote>) all <productname>PostgreSQL</productname> databases - of a cluster into an archive. The archive contains + of a cluster into an SQL script file or an archive. The output contains <acronym>SQL</acronym> commands that can be used as input to <xref linkend="app-psql"/> to restore the databases. It does this by calling <xref linkend="app-pgdump"/> for each database in the cluster. @@ -567,7 +570,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable> <term><option>--no-statistics</option></term> <listitem> <para> - Do not dump statistics. + Do not dump statistics. This is the default. </para> </listitem> </varlistentry> @@ -690,7 +693,8 @@ exclude database <replaceable class="parameter">PATTERN</replaceable> <listitem> <para> Dump only the statistics, not the schema (data definitions) or data. - Statistics for tables, materialized views, and indexes are dumped. + Statistics for tables, materialized views, foreign tables, + and indexes are dumped. </para> </listitem> </varlistentry> @@ -741,7 +745,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable> <term><option>--with-statistics</option></term> <listitem> <para> - Dump statistics. This is the default. + Dump statistics. </para> </listitem> </varlistentry> @@ -957,14 +961,14 @@ exclude database <replaceable class="parameter">PATTERN</replaceable> </para> <para> - By default, <command>pg_dumpall</command> will include most optimizer - statistics in the resulting dump file. However, some statistics may not be - included, such as those created explicitly with <xref - linkend="sql-createstatistics"/> or custom statistics added by an - extension. Therefore, it may be useful to run <command>ANALYZE</command> - on each database after restoring from a dump file to ensure optimal - performance. You can also run <command>vacuumdb -a -z</command> to analyze - all databases. + If <option>--with-statistics</option> is specified, + <command>pg_dumpall</command> will include most optimizer statistics in the + resulting dump file. However, some statistics may not be included, such as + those created explicitly with <xref linkend="sql-createstatistics"/> or + custom statistics added by an extension. Therefore, it may be useful to + run <command>ANALYZE</command> on each database after restoring from a dump + file to ensure optimal performance. You can also run <command>vacuumdb -a + -z</command> to analyze all databases. </para> <para> diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml index 63a45c7018a..f68182266a9 100644 --- a/doc/src/sgml/ref/pg_recvlogical.sgml +++ b/doc/src/sgml/ref/pg_recvlogical.sgml @@ -79,8 +79,8 @@ PostgreSQL documentation </para> <para> - The <option>--two-phase</option> and <option>--failover</option> options - can be specified with <option>--create-slot</option>. + The <option>--enable-two-phase</option> and <option>--enable-failover</option> + options can be specified with <option>--create-slot</option>. </para> </listitem> </varlistentry> @@ -166,7 +166,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--failover</option></term> + <term><option>--enable-failover</option></term> <listitem> <para> Enables the slot to be synchronized to the standbys. This option may @@ -300,7 +300,8 @@ PostgreSQL documentation <varlistentry> <term><option>-t</option></term> - <term><option>--two-phase</option></term> + <term><option>--enable-two-phase</option></term> + <term><option>--two-phase</option> (deprecated)</term> <listitem> <para> Enables decoding of prepared transactions. This option may only be specified with diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index 2295df62d03..b649bd3a5ae 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -18,8 +18,8 @@ PostgreSQL documentation <refname>pg_restore</refname> <refpurpose> - restore a <productname>PostgreSQL</productname> database or cluster - from an archive created by <application>pg_dump</application> or + restore <productname>PostgreSQL</productname> databases from archives + created by <application>pg_dump</application> or <application>pg_dumpall</application> </refpurpose> </refnamediv> @@ -923,7 +923,8 @@ PostgreSQL documentation <term><option>--with-data</option></term> <listitem> <para> - Dump data. This is the default. + Output commands to restore data, if the archive contains them. + This is the default. </para> </listitem> </varlistentry> @@ -932,7 +933,8 @@ PostgreSQL documentation <term><option>--with-schema</option></term> <listitem> <para> - Dump schema (data definitions). This is the default. + Output commands to restore schema (data definitions), if the archive + contains them. This is the default. </para> </listitem> </varlistentry> @@ -941,7 +943,8 @@ PostgreSQL documentation <term><option>--with-statistics</option></term> <listitem> <para> - Dump statistics. This is the default. + Output commands to restore statistics, if the archive contains them. + This is the default. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 8f7d8758ca0..95f4cac2467 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1067,8 +1067,8 @@ INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1 </listitem> </varlistentry> - <varlistentry id="app-psql-meta-command-close"> - <term><literal>\close</literal> <replaceable class="parameter">prepared_statement_name</replaceable></term> + <varlistentry id="app-psql-meta-command-close-prepared"> + <term><literal>\close_prepared</literal> <replaceable class="parameter">prepared_statement_name</replaceable></term> <listitem> <para> @@ -1081,7 +1081,7 @@ INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1 Example: <programlisting> SELECT $1 \parse stmt1 -\close stmt1 +\close_prepared stmt1 </programlisting> </para> @@ -1101,7 +1101,16 @@ SELECT $1 \parse stmt1 <listitem> <para> Outputs information about the current database connection, - including TLS-related information if TLS is in use. + including SSL-related information if SSL is in use. + </para> + <para> + Note that the <structfield>Client User</structfield> field shows + the user at the time of connection, while the + <structfield>Superuser</structfield> field indicates whether + the current user (in the current execution context) has + superuser privileges. These users are usually the same, but they can + differ, for example, if the current user was changed with the + <command>SET ROLE</command> command. </para> </listitem> </varlistentry> @@ -3701,7 +3710,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> All queries executed while a pipeline is ongoing use the extended query protocol. Queries are appended to the pipeline when ending with a semicolon. The meta-commands <literal>\bind</literal>, - <literal>\bind_named</literal>, <literal>\close</literal> or + <literal>\bind_named</literal>, <literal>\close_prepared</literal> or <literal>\parse</literal> can be used in an ongoing pipeline. While a pipeline is ongoing, <literal>\sendpipeline</literal> will append the current query buffer to the pipeline. Other meta-commands like @@ -3734,6 +3743,10 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> </para> <para> + <command>COPY</command> is not supported while in pipeline mode. + </para> + + <para> Example: <programlisting> \startpipeline @@ -3853,7 +3866,7 @@ SELECT 1 \bind \sendpipeline (if given) is reached, or the query no longer returns the minimum number of rows. Wait the specified number of seconds (default 2) between executions. The default wait can be changed with the variable - <xref linkend="app-psql-variables-watch-interval"/>). + <xref linkend="app-psql-variables-watch-interval"/>. For backwards compatibility, <replaceable class="parameter">seconds</replaceable> can be specified with or without an <literal>interval=</literal> prefix. @@ -4752,9 +4765,10 @@ bar <term><varname>WATCH_INTERVAL</varname></term> <listitem> <para> - This variable sets the default interval which <command>\watch</command> - waits between executing the query. Specifying an interval in the - command overrides this variable. + This variable sets the default interval, in seconds, which + <command>\watch</command> waits between executing the query. The + default is 2 seconds. Specifying an interval in the command overrides + this variable. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml index 5b3c769800e..c4055397146 100644 --- a/doc/src/sgml/ref/reindex.sgml +++ b/doc/src/sgml/ref/reindex.sgml @@ -465,14 +465,17 @@ Indexes: </programlisting> If the index marked <literal>INVALID</literal> is suffixed - <literal>ccnew</literal>, then it corresponds to the transient + <literal>_ccnew</literal>, then it corresponds to the transient index created during the concurrent operation, and the recommended recovery method is to drop it using <literal>DROP INDEX</literal>, then attempt <command>REINDEX CONCURRENTLY</command> again. - If the invalid index is instead suffixed <literal>ccold</literal>, + If the invalid index is instead suffixed <literal>_ccold</literal>, it corresponds to the original index which could not be dropped; the recommended recovery method is to just drop said index, since the rebuild proper has been successful. + A nonzero number may be appended to the suffix of the invalid index + names to keep them unique, like <literal>_ccnew1</literal>, + <literal>_ccold2</literal>, etc. </para> <para> diff --git a/doc/src/sgml/ref/security_label.sgml b/doc/src/sgml/ref/security_label.sgml index e5e5fb483e9..aa45c0af248 100644 --- a/doc/src/sgml/ref/security_label.sgml +++ b/doc/src/sgml/ref/security_label.sgml @@ -84,6 +84,10 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON based on object labels, rather than traditional discretionary access control (DAC) concepts such as users and groups. </para> + + <para> + You must own the database object to use <command>SECURITY LABEL</command>. + </para> </refsect1> <refsect1> diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index 12ec5ba0709..40cca063946 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -57,7 +57,8 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ to compute and return value(s) based on each row actually updated. Any expression using the table's columns, and/or columns of other tables mentioned in <literal>FROM</literal>, can be computed. - The new (post-update) values of the table's columns are used. + By default, the new (post-update) values of the table's columns are used, + but it is also possible to request the old (pre-update) values. The syntax of the <literal>RETURNING</literal> list is identical to that of the output list of <command>SELECT</command>. </para> diff --git a/doc/src/sgml/release-18.sgml b/doc/src/sgml/release-18.sgml deleted file mode 100644 index cdf47ac6d2a..00000000000 --- a/doc/src/sgml/release-18.sgml +++ /dev/null @@ -1,3554 +0,0 @@ -<!-- doc/src/sgml/release-18.sgml --> -<!-- See header comment in release.sgml about typical markup --> - - <sect1 id="release-18"> - <title>Release 18</title> - - <formalpara> - <title>Release date:</title> - <para>2025-??-??, CURRENT AS OF 2025-05-01</para> - </formalpara> - - <sect2 id="release-18-highlights"> - <title>Overview</title> - - <para> - <productname>PostgreSQL</productname> 18 contains many new features - and enhancements, including: - </para> - - <itemizedlist> - - <listitem> - <para> - (to be completed) - </para> - </listitem> - </itemizedlist> - - <para> - The above items and other new features of - <productname>PostgreSQL</productname> 18 are explained in more detail - in the sections below. - </para> - - </sect2> - - <sect2 id="release-18-migration"> - - <title>Migration to Version 18</title> - - <para> - A dump/restore using <xref linkend="app-pg-dumpall"/> or use of - <xref linkend="pgupgrade"/> or logical replication is required for - those wishing to migrate data from any previous release. See <xref - linkend="upgrading"/> for general information on migrating to new - major releases. - </para> - - <para> - Version 18 contains a number of changes that may affect compatibility - with previous releases. Observe the following incompatibilities: - </para> - - <itemizedlist> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-01-16 [d7674c9fa] Seek zone abbreviations in the IANA data before timezone ---> - -<listitem> -<para> -Change time zone abbreviation handling (Tom Lane) -<ulink url="&commit_baseurl;d7674c9fa">§</ulink> -</para> - -<para> -The system will now favor the current session's time zone abbreviations before checking the server variable timezone_abbreviations. Previously timezone_abbreviations was -checked first. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-12-02 [db6a4a985] Deprecate MD5 passwords. ---> - -<listitem> -<para> -Deprecate MD5 password authentication (Nathan Bossart) -<ulink url="&commit_baseurl;db6a4a985">§</ulink> -</para> - -<para> -Warnings generated by their use can be disabled by the server variable md5_password_warnings. -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-09-24 [62ddf7ee9] Add ONLY support for VACUUM and ANALYZE ---> - -<listitem> -<para> -Change VACUUM and ANALYZE to process the inheritance children of a parent (Michael Harris) -<ulink url="&commit_baseurl;62ddf7ee9">§</ulink> -</para> - -<para> -The previous behavior can be performed by using the new ONLY option. -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-09-30 [770233748] Do not treat \. as an EOF marker in CSV mode for COPY IN -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-10-01 [da8a4c166] Reject a copy EOF marker that has data ahead of it on th ---> - -<listitem> -<para> -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">§</ulink> -<ulink url="&commit_baseurl;da8a4c166">§</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">§</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">§</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">§</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">§</ulink> -<ulink url="&commit_baseurl;d9e03864b">§</ulink> -<ulink url="&commit_baseurl;706cbed35">§</ulink> -</para> - -<para> -These were previously zero-based. -</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">§</ulink> -</para> - -<para> -This optimization can be disabled using server variable enable_self_join_elimination. -</para> -</listitem> - -<!-- -Author: Alexander Korotkov <akorotkov@postgresql.org> -2025-04-04 [c0962a113] Convert 'x IN (VALUES ...)' to 'x = ANY ...' then approp ---> - -<listitem> -<para> -Convert some 'IN (VALUES ...)' to 'x = ANY ...' for better optimizer statistics (Alena Rybakina, Andrei Lepikhov) -<ulink url="&commit_baseurl;c0962a113">§</ulink> -</para> -</listitem> - -<!-- -Author: Alexander Korotkov <akorotkov@postgresql.org> -2024-11-24 [ae4569161] Teach bitmap path generation about transforming OR-claus ---> - -<listitem> -<para> -Allow transforming OR-clauses to arrays for faster index processing (Alexander Korotkov, Andrey Lepikhov) -<ulink url="&commit_baseurl;ae4569161">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-09-10 [52c707483] Use a hash table to de-duplicate column names in ruleuti -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-12-19 [276279295] Convert SetOp to read its inputs as outerPlan and innerP -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-12-19 [8d96f57d5] Improve planner's handling of SetOp plans. -Author: David Rowley <drowley@postgresql.org> -2024-09-05 [908a96861] Optimize WindowAgg's use of tuplestores ---> - -<listitem> -<para> -Speed up the processing of INTERSECT, EXCEPT, window aggregates, and view column aliases (Tom Lane, David Rowley) -<ulink url="&commit_baseurl;52c707483">§</ulink> -<ulink url="&commit_baseurl;276279295">§</ulink> -<ulink url="&commit_baseurl;8d96f57d5">§</ulink> -<ulink url="&commit_baseurl;908a96861">§</ulink> -</para> -</listitem> - -<!-- -Author: Richard Guo <rguo@postgresql.org> -2024-11-26 [a8ccf4e93] Reordering DISTINCT keys to match input path's pathkeys ---> - -<listitem> -<para> -Allow the keys of SELECT DISTINCT to be internally reordered to avoid sorting (Richard Guo) -<ulink url="&commit_baseurl;a8ccf4e93">§</ulink> -</para> - -<para> -This optimization can be disabled using enable_distinct_reordering. -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-12-12 [bd10ec529] Detect redundant GROUP BY columns using UNIQUE indexes ---> - -<listitem> -<para> -Ignore GROUP BY columns that are functionally dependent on other columns (Zhang Mingli, Jian He, David Rowley) -<ulink url="&commit_baseurl;bd10ec529">§</ulink> -</para> - -<para> -If a GROUP BY clause includes all columns of a unique index, as well as other columns of the same table, those other columns are redundant and can be dropped -from the grouping. This was already true for non-deferred primary keys. -</para> -</listitem> - -<!-- -Author: Richard Guo <rguo@postgresql.org> -2024-10-09 [67a54b9e8] Allow pushdown of HAVING clauses with grouping sets -Author: Richard Guo <rguo@postgresql.org> -2024-09-10 [247dea89f] Introduce an RTE for the grouping step -Author: Richard Guo <rguo@postgresql.org> -2024-09-10 [f5050f795] Mark expressions nullable by grouping sets -Author: Richard Guo <rguo@postgresql.org> -2025-03-13 [cc5d98525] Fix incorrect handling of subquery pullup ---> - -<listitem> -<para> -Allow some HAVING clauses on GROUPING SETS to be pushed to WHERE clauses (Richard Guo) -<ulink url="&commit_baseurl;67a54b9e8">§</ulink> -<ulink url="&commit_baseurl;247dea89f">§</ulink> -<ulink url="&commit_baseurl;f5050f795">§</ulink> -<ulink url="&commit_baseurl;cc5d98525">§</ulink> -</para> - -<para> -This allows earlier row filtering. This release also fixes some GROUPING SETS queries that used to return incorrect results. -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-07-09 [036bdcec9] Teach planner how to estimate rows for timestamp generat -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2024-12-02 [97173536e] Add a planner support function for numeric generate_seri ---> - -<listitem> -<para> -Improve row estimates for generate_series() using numeric and timestamp values (David Rowley, Song Jinzhou) -<ulink url="&commit_baseurl;036bdcec9">§</ulink> -<ulink url="&commit_baseurl;97173536e">§</ulink> -</para> -</listitem> - -<!-- -Author: Richard Guo <rguo@postgresql.org> -2024-07-05 [aa86129e1] Support "Right Semi Join" plan shapes ---> - -<listitem> -<para> -Allow the optimizer to use "Right Semi Join" plans (Richard Guo) -<ulink url="&commit_baseurl;aa86129e1">§</ulink> -</para> - -<para> -Semi-joins are used when needing to find if there is at least one match. -</para> -</listitem> - -<!-- -Author: Richard Guo <rguo@postgresql.org> -2024-10-09 [828e94c9d] Consider explicit incremental sort for mergejoins ---> - -<listitem> -<para> -Allow merge joins to use incremental sorts (Richard Guo) -<ulink url="&commit_baseurl;828e94c9d">§</ulink> -</para> -</listitem> - -<!-- -Author: Amit Langote <amitlan@postgresql.org> -2025-04-04 [88f55bc97] Make derived clause lookup in EquivalenceClass more effi -Author: David Rowley <drowley@postgresql.org> -2025-04-08 [d69d45a5a] Speedup child EquivalenceMember lookup in planner ---> - -<listitem> -<para> -Improve the efficiency of planning queries accessing many partitions (Ashutosh Bapat, Yuya Watari, David Rowley) -<ulink url="&commit_baseurl;88f55bc97">§</ulink> -<ulink url="&commit_baseurl;d69d45a5a">§</ulink> -</para> -</listitem> - -<!-- -Author: Richard Guo <rguo@postgresql.org> -2024-07-30 [9b282a935] Fix partitionwise join with partially-redundant join cla -Author: Richard Guo <rguo@postgresql.org> -2024-07-29 [513f4472a] Reduce memory used by partitionwise joins ---> - -<listitem> -<para> -Allow partitionwise joins in more cases, and reduce its memory usage (Richard Guo, Tom Lane, Ashutosh Bapat) -<ulink url="&commit_baseurl;9b282a935">§</ulink> -<ulink url="&commit_baseurl;513f4472a">§</ulink> -</para> -</listitem> - -<!-- -Author: Alexander Korotkov <akorotkov@postgresql.org> -2025-03-10 [fae535da0] Teach Append to consider tuple_fraction when accumulatin ---> - -<listitem> -<para> -Improve cost estimates of partition queries (Nikita Malakhov, Andrei Lepikhov) -<ulink url="&commit_baseurl;fae535da0">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-04-02 [0dca5d68d] Change SQL-language functions to use the plan cache. -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-04-17 [09b07c295] Minor performance improvement for SQL-language functions ---> - -<listitem> -<para> -Improve SQL-language function plan caching (Alexander Pyhalov, Tom Lane) -<ulink url="&commit_baseurl;0dca5d68d">§</ulink> -<ulink url="&commit_baseurl;09b07c295">§</ulink> -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2024-08-21 [e22253467] Treat number of disabled nodes in a path as a separate c ---> - -<listitem> -<para> -Improve handling of disabled optimizer features (Robert Haas) -<ulink url="&commit_baseurl;e22253467">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-indexes"> - <title>Indexes</title> - - <itemizedlist> - -<!-- -Author: Peter Geoghegan <pg@bowt.ie> -2025-04-04 [92fe23d93] Add nbtree skip scan optimization. -Author: Peter Geoghegan <pg@bowt.ie> -2025-04-04 [8a510275d] Further optimize nbtree search scan key comparisons. -Author: Peter Geoghegan <pg@bowt.ie> -2025-04-04 [8a510275d] Further optimize nbtree search scan key comparisons. ---> - -<listitem> -<para> -Allow skip scans of btree indexes (Peter Geoghegan) -<ulink url="&commit_baseurl;92fe23d93">§</ulink> -<ulink url="&commit_baseurl;8a510275d">§</ulink> -<ulink url="&commit_baseurl;8a510275d">§</ulink> -</para> - -<para> -This is effective if the earlier non-referenced columns contain few unique values. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-18 [f278e1fe3] Allow non-btree unique indexes for partition keys -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-18 [9d6db8bec] Allow non-btree unique indexes for matviews ---> - -<listitem> -<para> -Allow non-btree unique indexes to be used as partition keys and in materialized views (Mark Dilger) -<ulink url="&commit_baseurl;f278e1fe3">§</ulink> -<ulink url="&commit_baseurl;9d6db8bec">§</ulink> -</para> - -<para> -The index type must still support equality. -</para> -</listitem> - -<!-- -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2025-03-03 [8492feb98] Allow parallel CREATE INDEX for GIN indexes ---> - -<listitem> -<para> -Allow GIN indexes to be created in parallel (Tomas Vondra, Matthias van de Meent) -<ulink url="&commit_baseurl;8492feb98">§</ulink> -</para> -</listitem> - -<!-- -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2025-04-02 [e9e7b6604] Add GiST and btree sortsupport routines for range types ---> - -<listitem> -<para> -Allow values to be sorted to speed rangetype GiST and btree index builds (Bernd Helmle) -<ulink url="&commit_baseurl;e9e7b6604">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-performance"> - <title>General Performance</title> - - <itemizedlist> - -<!-- -Author: Andres Freund <andres@anarazel.de> -2025-03-17 [02844012b] aio: Basic subsystem initialization -Author: Andres Freund <andres@anarazel.de> -2025-03-17 [da7226993] aio: Add core asynchronous I/O infrastructure -Author: Andres Freund <andres@anarazel.de> -2025-03-18 [55b454d0e] aio: Infrastructure for io_method=worker -Author: Andres Freund <andres@anarazel.de> -2025-03-18 [247ce06b8] aio: Add io_method=worker -Author: Thomas Munro <tmunro@postgresql.org> -2025-03-19 [10f664684] Introduce io_max_combine_limit. -Author: Thomas Munro <tmunro@postgresql.org> -2025-03-19 [06fb5612c] Increase io_combine_limit range to 1MB. -Author: Andres Freund <andres@anarazel.de> -2025-03-26 [c325a7633] aio: Add io_method=io_uring -Author: Andres Freund <andres@anarazel.de> -2025-03-29 [50cb7505b] aio: Implement support for reads in smgr/md/fd -Author: Andres Freund <andres@anarazel.de> -2025-03-30 [047cba7fa] bufmgr: Implement AIO read support -Author: Andres Freund <andres@anarazel.de> -2025-03-30 [12ce89fd0] bufmgr: Use AIO in StartReadBuffers() -Author: Andres Freund <andres@anarazel.de> -2025-03-30 [2a5e709e7] Enable IO concurrency on all systems ---> - -<listitem> -<para> -Add an asynchronous I/O subsystem (Andres Freund, Thomas Munro, Nazir Bilal Yavuz, Melanie Plageman) -<ulink url="&commit_baseurl;02844012b">§</ulink> -<ulink url="&commit_baseurl;da7226993">§</ulink> -<ulink url="&commit_baseurl;55b454d0e">§</ulink> -<ulink url="&commit_baseurl;247ce06b8">§</ulink> -<ulink url="&commit_baseurl;10f664684">§</ulink> -<ulink url="&commit_baseurl;06fb5612c">§</ulink> -<ulink url="&commit_baseurl;c325a7633">§</ulink> -<ulink url="&commit_baseurl;50cb7505b">§</ulink> -<ulink url="&commit_baseurl;047cba7fa">§</ulink> -<ulink url="&commit_baseurl;12ce89fd0">§</ulink> -<ulink url="&commit_baseurl;2a5e709e7">§</ulink> -</para> - -<para> -This is enabled by server variable io_method, with server variables io_combine_limit and io_max_combine_limit added to control it. This also enables -effective_io_concurrency and maintenance_io_concurrency values greater than zero for systems without fadvise() support. The new system view pg_aios shows the file handles being used -for asynchronous I/O. -</para> -</listitem> - -<!-- -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2024-09-21 [c4d5cb71d] Increase the number of fast-path lock slots ---> - -<listitem> -<para> -Improve the locking performance of queries that access many relations (Tomas Vondra) -<ulink url="&commit_baseurl;c4d5cb71d">§</ulink> -</para> -</listitem> - -<!-- -Author: Amit Langote <amitlan@postgresql.org> -2025-01-30 [bb3ec16e1] Move PartitionPruneInfo out of plan nodes into PlannedSt -Author: Amit Langote <amitlan@postgresql.org> -2025-01-31 [d47cbf474] Perform runtime initial pruning outside ExecInitNode() -Author: Amit Langote <amitlan@postgresql.org> -2025-02-07 [cbc127917] Track unpruned relids to avoid processing pruned relatio -Author: Amit Langote <amitlan@postgresql.org> -2025-02-20 [525392d57] Don't lock partitions pruned by initial pruning ---> - -<listitem> -<para> -Avoid the locking of pruned partitions during execution (Amit Langote) -<ulink url="&commit_baseurl;bb3ec16e1">§</ulink> -<ulink url="&commit_baseurl;d47cbf474">§</ulink> -<ulink url="&commit_baseurl;cbc127917">§</ulink> -<ulink url="&commit_baseurl;525392d57">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-08-20 [adf97c156] Speed up Hash Join by making ExprStates support hashing -Author: David Rowley <drowley@postgresql.org> -2024-12-11 [0f5738202] Use ExprStates for hashing in GROUP BY and SubPlans -Author: Jeff Davis <jdavis@postgresql.org> -2025-03-24 [4d143509c] Create accessor functions for TupleHashEntry. -Author: Jeff Davis <jdavis@postgresql.org> -2025-03-24 [a0942f441] Add ExecCopySlotMinimalTupleExtra(). -Author: Jeff Davis <jdavis@postgresql.org> -2025-03-24 [626df47ad] Remove 'additional' pointer from TupleHashEntryData. ---> - -<listitem> -<para> -Improve the performance and reduce memory usage of hash joins and GROUP BY (David Rowley, Jeff Davis) -<ulink url="&commit_baseurl;adf97c156">§</ulink> -<ulink url="&commit_baseurl;0f5738202">§</ulink> -<ulink url="&commit_baseurl;4d143509c">§</ulink> -<ulink url="&commit_baseurl;a0942f441">§</ulink> -<ulink url="&commit_baseurl;626df47ad">§</ulink> -</para> - -<para> -This also improves hash set operations used by EXCEPT, and hash lookups of subplan values. -</para> -</listitem> - -<!-- -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-02-11 [052026c9b] Eagerly scan all-visible pages to amortize aggressive va -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-03-03 [06eae9e62] Trigger more frequent autovacuums with relallfrozen ---> - -<listitem> -<para> -Allow normal vacuums to freeze some pages, even though they are all-visible (Melanie Plageman) -<ulink url="&commit_baseurl;052026c9b">§</ulink> -<ulink url="&commit_baseurl;06eae9e62">§</ulink> -</para> - -<para> -This reduces the overhead of later full-relation freezing. The aggressiveness of this can be controlled by server variable and per-table setting vacuum_max_eager_freeze_failure_rate. -Previously vacuum never processed all-visible pages until freezing was required. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-20 [0164a0f9e] Add vacuum_truncate configuration parameter. ---> - -<listitem> -<para> -Add server variable vacuum_truncate to control file truncation during VACUUM (Nathan Bossart, Gurjeet Singh) -<ulink url="&commit_baseurl;0164a0f9e">§</ulink> -</para> - -<para> -A storage-level parameter with the same name and behavior already existed. -</para> -</listitem> - -<!-- -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-03-12 [ff79b5b2a] Increase default effective_io_concurrency to 16 -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-03-18 [cc6be07eb] Increase default maintenance_io_concurrency to 16 ---> - -<listitem> -<para> -Increase server variables effective_io_concurrency's and maintenance_io_concurrency's default values to 16 (Melanie Plageman) -<ulink url="&commit_baseurl;ff79b5b2a">§</ulink> -<ulink url="&commit_baseurl;cc6be07eb">§</ulink> -</para> - -<para> -This more accurately reflects modern hardware. -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-monitoring"> - <title>Monitoring</title> - - <itemizedlist> - -<!-- -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-03-12 [9219093ca] Modularize log_connections output -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-03-12 [18cd15e70] Add connection establishment duration logging ---> - -<listitem> -<para> -Increase the logging granularity of server variable log_connections (Melanie Plageman) -<ulink url="&commit_baseurl;9219093ca">§</ulink> -<ulink url="&commit_baseurl;18cd15e70">§</ulink> -</para> - -<para> -This server variable was previously only boolean; these options are still supported. -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-04-07 [3516ea768] Add local-address escape "%L" to log_line_prefix. ---> - -<listitem> -<para> -Add log_line_prefix escape "%L" to output the client IP address (Greg Sabino Mullane) -<ulink url="&commit_baseurl;3516ea768">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2025-03-14 [6d376c3b0] Add GUC option to log lock acquisition failures. ---> - -<listitem> -<para> -Add server variable log_lock_failure to log lock acquisition failures (Yuki Seino) -<ulink url="&commit_baseurl;6d376c3b0">§</ulink> -</para> - -<para> -Specifically it reports SELECT ... NOWAIT lock failures. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-01-28 [30a6ed0ce] Track per-relation cumulative time spent in [auto]vacuum ---> - -<listitem> -<para> -Modify pg_stat_all_tables and its variants to report the time spent in vacuum, analyze, and their automatic variants (Sami Imseih) -<ulink url="&commit_baseurl;30a6ed0ce">§</ulink> -</para> - -<para> -The new columns are total_vacuum_time, total_autovacuum_time, total_analyze_time, and total_autoanalyze_time. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-02-11 [bb8dff999] Add cost-based vacuum delay time to progress views. -Author: Nathan Bossart <nathan@postgresql.org> -2025-02-14 [7720082ae] Add delay time to VACUUM/ANALYZE (VERBOSE) and autovacuu ---> - -<listitem> -<para> -Add delay time reporting to VACUUM and ANALYZE (Bertrand Drouvot, Nathan Bossart) -<ulink url="&commit_baseurl;bb8dff999">§</ulink> -<ulink url="&commit_baseurl;7720082ae">§</ulink> -</para> - -<para> -This information appears in the autovacuum logs, the system views pg_stat_progress_vacuum and pg_stat_progress_analyze, and the output of VACUUM and ANALYZE when in VERBOSE -mode; tracking must be enabled with the server variable track_cost_delay_timing. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-12-19 [9aea73fc6] Add backend-level statistics to pgstats -Author: Michael Paquier <michael@paquier.xyz> -2025-03-03 [3f1db99bf] Handle auxiliary processes in SQL functions of backend s ---> - -<listitem> -<para> -Add per-backend I/O statistics reporting (Bertrand Drouvot) -<ulink url="&commit_baseurl;9aea73fc6">§</ulink> -<ulink url="&commit_baseurl;3f1db99bf">§</ulink> -</para> - -<para> -The statistics are accessed via pg_stat_get_backend_io(). Per-backend I/O statistics can be cleared via pg_stat_reset_backend_stats(). -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-01-14 [f92c854cf] Make pg_stat_io count IOs as bytes instead of blocks for ---> - -<listitem> -<para> -Add pg_stat_io columns to report I/O activity in bytes (Nazir Bilal Yavuz) -<ulink url="&commit_baseurl;f92c854cf">§</ulink> -</para> - -<para> -The new columns are read_bytes, write_bytes, and extend_bytes. The op_bytes column, which always equaled BLCKSZ, has been removed. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-04 [a051e71e2] Add data for WAL in pg_stat_io and backend statistics -Author: Michael Paquier <michael@paquier.xyz> -2025-02-20 [4538bd3f1] doc: Add details about object "wal" in pg_stat_io -Author: Michael Paquier <michael@paquier.xyz> -2025-03-06 [7f7f324eb] Add more monitoring data for WAL writes in the WAL recei ---> - -<listitem> -<para> -Add WAL I/O activity rows to pg_stat_io (Nazir Bilal Yavuz, Bertrand Drouvot, Michael Paquier) -<ulink url="&commit_baseurl;a051e71e2">§</ulink> -<ulink url="&commit_baseurl;4538bd3f1">§</ulink> -<ulink url="&commit_baseurl;7f7f324eb">§</ulink> -</para> - -<para> -This includes WAL receiver activity and a wait event for such writes. -</para> - -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-26 [6c349d83b] Re-add GUC track_wal_io_timing ---> - -<listitem> -<para> -Change server variable track_wal_io_timing to control tracking WAL timing in pg_stat_io instead of pg_stat_wal (Bertrand Drouvot) -<ulink url="&commit_baseurl;6c349d83b">§</ulink> -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-24 [2421e9a51] Remove read/sync fields from pg_stat_wal and GUC track_w -Author: Michael Paquier <michael@paquier.xyz> -2025-02-26 [6c349d83b] Re-add GUC track_wal_io_timing ---> - -<listitem> -<para> -Remove read/sync columns from pg_stat_wal (Bertrand Drouvot) -<ulink url="&commit_baseurl;2421e9a51">§</ulink> -<ulink url="&commit_baseurl;6c349d83b">§</ulink> -</para> - -<para> -This removes columns wal_write, wal_sync, wal_write_time, and wal_sync_time. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-03-11 [76def4cdd] Add WAL data to backend statistics ---> - -<listitem> -<para> -Add function pg_stat_get_backend_wal() to return per-backend WAL statistics (Bertrand Drouvot) -<ulink url="&commit_baseurl;76def4cdd">§</ulink> -</para> - -<para> -Per-backend WAL statistics can be cleared via pg_stat_reset_backend_stats(). -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-10-11 [4e1fad378] Add pg_ls_summariesdir(). ---> - -<listitem> -<para> -Add function pg_ls_summariesdir() to specifically list the contents of PGDATA/pg_wal/summaries (Yushi Ogiwara) -<ulink url="&commit_baseurl;4e1fad378">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-09-30 [559efce1d] Add num_done counter to the pg_stat_checkpointer view. ---> - -<listitem> -<para> -Add column pg_stat_checkpointer.num_done to report the number of completed checkpoints (Anton A. Melnikov) -<ulink url="&commit_baseurl;559efce1d">§</ulink> -</para> - -<para> -Columns num_timed and num_requested count both completed and skipped checkpoints. -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-10-02 [17cc5f666] Fix inconsistent reporting of checkpointer stats. ---> - -<listitem> -<para> -Add column pg_stat_checkpointer.slru_written to report SLRU buffers written (Nitin Jadhav) -<ulink url="&commit_baseurl;17cc5f666">§</ulink> -</para> - -<para> -Also, modify the checkpoint server log message to report separate shared buffer and SLRU buffer values. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-11-11 [e7a9496de] Add two attributes to pg_stat_database for parallel work ---> - -<listitem> -<para> -Add columns to pg_stat_database to report parallel workers activity (Benoit Lobréau) -<ulink url="&commit_baseurl;e7a9496de">§</ulink> -</para> - -<para> -The new columns are parallel_workers_to_launch and parallel_workers_launched. -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-03-18 [62d712ecf] Introduce squashing of constant lists in query jumbling -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-03-27 [9fbd53dea] Remove the query_id_squash_values GUC ---> - -<listitem> -<para> -Have query jumbling of arrays consider only the first and last array elements (Dmitry Dolgov, Sami Imseih) -<ulink url="&commit_baseurl;62d712ecf">§</ulink> -<ulink url="&commit_baseurl;9fbd53dea">§</ulink> -</para> - -<para> -Jumbling is used by pg_stat_statements. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-03-26 [787514b30] Use relation name instead of OID in query jumbling for R ---> - -<listitem> -<para> -Adjust query jumbling to group together queries using the same relation name (Michael Paquier, Sami Imseih) -<ulink url="&commit_baseurl;787514b30">§</ulink> -</para> - -<para> -This is true even if the tables in different schemas have different column names. -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-04-08 [042a66291] Add function to get memory context stats for processes -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-04-08 [c57971034] Rename argument in pg_get_process_memory_contexts(). ---> - -<listitem> -<para> -Add function pg_get_process_memory_contexts() to report process memory context statistics (Rahila Syed) -<ulink url="&commit_baseurl;042a66291">§</ulink> -<ulink url="&commit_baseurl;c57971034">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-07-01 [12227a1d5] Add context type field to pg_backend_memory_contexts ---> - -<listitem> -<para> -Add column pg_backend_memory_contexts.type to report the type of memory context (David Rowley) -<ulink url="&commit_baseurl;12227a1d5">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-07-25 [32d3ed816] Add path column to pg_backend_memory_contexts view ---> - -<listitem> -<para> -Add column pg_backend_memory_contexts.path to show memory context parents (Melih Mutlu) -<ulink url="&commit_baseurl;32d3ed816">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-privileges"> - <title>Privileges</title> - - <itemizedlist> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-07-04 [4564f1ceb] Add pg_get_acl() to get the ACL for a database object -Author: Michael Paquier <michael@paquier.xyz> -2024-07-10 [d898665bf] Extend pg_get_acl() to handle sub-object IDs ---> - -<listitem> -<para> -Add function pg_get_acl() to retrieve database access control details (Joel Jacobson) -<ulink url="&commit_baseurl;4564f1ceb">§</ulink> -<ulink url="&commit_baseurl;d898665bf">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-09-12 [4eada203a] Add has_largeobject_privilege function. ---> - -<listitem> -<para> -Add function has_largeobject_privilege() to check large object privileges (Yugo Nagata) -<ulink url="&commit_baseurl;4eada203a">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2025-04-04 [0d6c47766] Extend ALTER DEFAULT PRIVILEGES to define default privil ---> - -<listitem> -<para> -Allow ALTER DEFAULT PRIVILEGES to define large object default privileges (Takatsuka Haruka, Yugo Nagata, Laurenz Albe) -<ulink url="&commit_baseurl;0d6c47766">§</ulink> -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-07-09 [ccd38024b] Introduce pg_signal_autovacuum_worker. ---> - -<listitem> -<para> -Add predefined role pg_signal_autovacuum_worker (Kirill Reshke) -<ulink url="&commit_baseurl;ccd38024b">§</ulink> -</para> - -<para> -This allows sending signals to autovacuum workers. -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-server-config"> - <title>Server Configuration</title> - - <itemizedlist> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-02-20 [b3f0be788] Add support for OAUTHBEARER SASL mechanism ---> - -<listitem> -<para> -Add support for the OAuth authentication method (Jacob Champion, Daniel Gustafsson, Thomas Munro) -<ulink url="&commit_baseurl;b3f0be788">§</ulink> -</para> - -<para> -This adds an "oauth" authentication method to pg_hba.conf, libpq OAuth options, a server variable oauth_validator_libraries to load token validation libraries, and -a configure flag --with-libcurl to add the required compile-time libraries. -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2024-10-24 [45188c2ea] Support configuring TLSv1.3 cipher suites ---> - -<listitem> -<para> -Add server variable ssl_tls13_ciphers to allow specification of multiple colon-separated TLSv1.3 cipher suites (Erica Zhang, Daniel Gustafsson) -<ulink url="&commit_baseurl;45188c2ea">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-03-18 [daa02c6bd] Add X25519 to the default set of curves ---> - -<listitem> -<para> -Change server variable ssl_groups's default to include elliptic curve X25519 (Daniel Gustafsson, Jacob Champion) -<ulink url="&commit_baseurl;daa02c6bd">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2024-10-24 [3d1ef3a15] Support configuring multiple ECDH curves ---> - -<listitem> -<para> -Rename server variable ssl_ecdh_curve to ssl_groups and allow multiple colon-separated ECDH curves to be specified (Erica Zhang, Daniel Gustafsson) -<ulink url="&commit_baseurl;3d1ef3a15">§</ulink> -</para> - -<para>The previous name still works. -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-01-24 [924d89a35] pgcrypto: Add function to check FIPS mode ---> - -<listitem> -<para> -Add function pg_check_fipsmode() to report the server's FIPS mode (Daniel Gustafsson) -<ulink url="&commit_baseurl;924d89a35">§</ulink> -</para> -</listitem> - -<!-- -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2025-04-02 [a460251f0] Make cancel request keys longer -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2024-07-29 [9d9b9d46f] Move cancel key generation to after forking the backend ---> - -<listitem> -<para> -Make cancel request keys 256 bits (Heikki Linnakangas, Jelte Fennema-Nio) -<ulink url="&commit_baseurl;a460251f0">§</ulink> -<ulink url="&commit_baseurl;9d9b9d46f">§</ulink> -</para> - -<para> -This is only possible when the server and client support wire protocol version 3.2, introduced in this release. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-01-06 [c758119e5] Allow changing autovacuum_max_workers without restarting ---> - -<listitem> -<para> -Add server variable autovacuum_worker_slots to specify the maximum number of background workers (Nathan Bossart) -<ulink url="&commit_baseurl;c758119e5">§</ulink> -</para> - -<para> -With this variable set, autovacuum_max_workers can be adjusted at runtime up to this maximum without a server restart. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-02-05 [306dc520b] Introduce autovacuum_vacuum_max_threshold. ---> - -<listitem> -<para> -Allow specification of the fixed number of dead tuples that will trigger an autovacuum (Nathan Bossart, Frédéric Yhuel) -<ulink url="&commit_baseurl;306dc520b">§</ulink> -</para> - -<para> -The server variable is autovacuum_vacuum_max_threshold. Percentages are still used for triggering. -</para> -</listitem> - -<!-- -Author: Andres Freund <andres@anarazel.de> -2025-03-24 [adb5f85fa] Redefine max_files_per_process to control additionally o ---> - -<listitem> -<para> -Change server variable max_files_per_process to limit only files opened by a backend (Andres Freund) -<ulink url="&commit_baseurl;adb5f85fa">§</ulink> -</para> - -<para> -Previously files opened by the postmaster were also counted toward this limit. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-07-26 [0dcaea569] Introduce num_os_semaphores GUC. ---> - -<listitem> -<para> -Add server variable num_os_semaphores to report the required number of semaphores (Nathan Bossart) -<ulink url="&commit_baseurl;0dcaea569">§</ulink> -</para> - -<para> -This is useful for operating system configuration. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-19 [4f7f7b037] extension_control_path ---> - -<listitem> -<para> -Add server variable extension_control_path to specify the location of extension control files (Peter Eisentraut, Matheus Alcantara) -<ulink url="&commit_baseurl;4f7f7b037">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-replication"> - <title>Streaming Replication and Recovery</title> - - <itemizedlist> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2025-02-19 [ac0e33136] Invalidate inactive replication slots. ---> - -<listitem> -<para> -Allow inactive replication slots to be automatically invalided using server variable idle_replication_slot_timeout (Nisha Moond, Bharath Rupireddy) -<ulink url="&commit_baseurl;ac0e33136">§</ulink> -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2025-03-21 [04ff636cb] Add GUC option to control maximum active replication ori ---> - -<listitem> -<para> -Add server variable max_active_replication_origins to control the maximum active replication origins (Euler Taveira) -<ulink url="&commit_baseurl;04ff636cb">§</ulink> -</para> - -<para> -This was previously controlled by max_replication_slots, but this new setting allows a higher origin count in cases where fewer slots are required. -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-logical"> - <title><link linkend="logical-replication">Logical Replication</link></title> - - <itemizedlist> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2024-10-30 [745217a05] Replicate generated columns when specified in the column -Author: Amit Kapila <akapila@postgresql.org> -2024-11-07 [7054186c4] Replicate generated columns when 'publish_generated_colu -Author: Amit Kapila <akapila@postgresql.org> -2024-12-04 [87ce27de6] Ensure stored generated columns must be published when r -Author: Amit Kapila <akapila@postgresql.org> -2025-01-30 [6252b1eaf] Doc: Generated column replication. ---> - -<listitem> -<para> -Allow the values of generated columns to be logically replicated (Shubham Khanna, Vignesh C, Zhijie Hou, Shlok Kyal, Peter Smith) -<ulink url="&commit_baseurl;745217a05">§</ulink> -<ulink url="&commit_baseurl;7054186c4">§</ulink> -<ulink url="&commit_baseurl;87ce27de6">§</ulink> -<ulink url="&commit_baseurl;6252b1eaf">§</ulink> -</para> - -<para> -If the publication specifies a column list, all specified columns, generated and non-generated, are published. Without a specified column list, publication option publish_generated_columns -controls whether generated columns are published. Previously generated columns were not replicated and the subscriber had to compute the values if possible; this is particularly -useful for non-Postgres subscribers which lack such a capability. -</para> -</listitem> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2024-10-28 [1bf1140be] Change the default value of the streaming option to 'par ---> - -<listitem> -<para> -Change the default CREATE SUBSCRIPTION streaming option from "off" to "parallel" (Hayato Kuroda, Masahiko Sawada, Peter Smith, Amit Kapila) -<ulink url="&commit_baseurl;1bf1140be">§</ulink> -</para> -</listitem> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2024-07-24 [1462aad2e] Allow altering of two_phase option of a SUBSCRIPTION. -Author: Amit Kapila <akapila@postgresql.org> -2025-04-03 [4868c96bc] Fix slot synchronization for two_phase enabled slots. ---> - -<listitem> -<para> -Allow ALTER SUBSCRIPTION to change the replication slot's two-phase commit behavior (Hayato Kuroda, Ajin Cherian, Amit Kapila, Zhijie Hou) -<ulink url="&commit_baseurl;1462aad2e">§</ulink> -<ulink url="&commit_baseurl;4868c96bc">§</ulink> -</para> -</listitem> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2024-08-20 [9758174e2] Log the conflicts while applying changes in logical repl -Author: Amit Kapila <akapila@postgresql.org> -2024-08-22 [edcb71258] Doc: explain the log format of logical replication confl -Author: Amit Kapila <akapila@postgresql.org> -2024-08-29 [640178c92] Rename the conflict types for the origin differ cases. -Author: Amit Kapila <akapila@postgresql.org> -2024-09-04 [6c2b5edec] Collect statistics about conflicts in logical replicatio -Author: Amit Kapila <akapila@postgresql.org> -2025-03-24 [73eba5004] Detect and Log multiple_unique_conflicts type conflict. ---> - -<listitem> -<para> -Log conflicts while applying logical replication changes (Zhijie Hou, Nisha Moond) -<ulink url="&commit_baseurl;9758174e2">§</ulink> -<ulink url="&commit_baseurl;edcb71258">§</ulink> -<ulink url="&commit_baseurl;640178c92">§</ulink> -<ulink url="&commit_baseurl;6c2b5edec">§</ulink> -<ulink url="&commit_baseurl;73eba5004">§</ulink> -</para> - -<para> -Also report in new columns of pg_stat_subscription_stats. -</para> -</listitem> - - </itemizedlist> - - </sect4> - - </sect3> - - <sect3 id="release-18-utility"> - <title>Utility Commands</title> - - <itemizedlist> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-02-07 [83ea6c540] Virtual generated columns -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-28 [cdc168ad4] Add support for not-null constraints on virtual generate -Author: Richard Guo <rguo@postgresql.org> -2025-02-25 [1e4351af3] Expand virtual generated columns in the planner ---> - -<listitem> -<para> -Allow generated columns to be virtual, and make them the default (Peter Eisentraut, Jian He, Richard Guo, Dean Rasheed) -<ulink url="&commit_baseurl;83ea6c540">§</ulink> -<ulink url="&commit_baseurl;cdc168ad4">§</ulink> -<ulink url="&commit_baseurl;1e4351af3">§</ulink> -</para> - -<para> -Virtual generated columns generate their values when the columns are read, not written. The write behavior can still be specified via the STORED option. -</para> -</listitem> - -<!-- -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2025-01-16 [80feb727c] Add OLD/NEW support to RETURNING in DML queries. ---> - -<listitem> -<para> -Add OLD/NEW support to RETURNING in DML queries (Dean Rasheed) -<ulink url="&commit_baseurl;80feb727c">§</ulink> -</para> - -<para> -Previously RETURNING only returned new values for INSERT and UPDATE, and old values for DELETE; MERGE would return the appropriate value for the internal query executed. This new syntax -allows the RETURNING list of INSERT/UPDATE/DELETE/MERGE to explicitly return old and new values by using the special aliases "old" and "new". These aliases can be renamed to -avoid identifier conflicts. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-19 [302cf1575] Add support for LIKE in CREATE FOREIGN TABLE ---> - -<listitem> -<para> -Allow foreign tables to be created like existing local tables (Zhang Mingli) -<ulink url="&commit_baseurl;302cf1575">§</ulink> -</para> - -<para> -The syntax is CREATE FOREIGN TABLE ... LIKE. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-11-27 [85b7efa1c] Support LIKE with nondeterministic collations ---> - -<listitem> -<para> -Allow LIKE with nondeterministic collations (Peter Eisentraut) -<ulink url="&commit_baseurl;85b7efa1c">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-02-21 [329304c90] Support text position search functions with nondetermini ---> - -<listitem> -<para> -Allow text position search functions with nondeterministic collations (Peter Eisentraut) -<ulink url="&commit_baseurl;329304c90">§</ulink> -</para> - -<para> -These used to generate an error. -</para> -</listitem> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2025-01-17 [d3d098316] Support PG_UNICODE_FAST locale in the builtin collation ---> - -<listitem> -<para> -Add builtin collation provider PG_UNICODE_FAST (Jeff Davis) -<ulink url="&commit_baseurl;d3d098316">§</ulink> -</para> - -<para> -This locale supports case mapping, but sorts in code point order, not natural language order. -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-09-24 [62ddf7ee9] Add ONLY support for VACUUM and ANALYZE ---> - -<listitem> -<para> -Allow VACUUM and ANALYZE to process partitioned tables without processing their children (Michael Harris) -<ulink url="&commit_baseurl;62ddf7ee9">§</ulink> -</para> - -<para> -This is enabled with the new ONLY option. This is useful since autovacuum does not process partitioned tables, just its children. -</para> -</listitem> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2024-10-11 [e839c8ecc] Create functions pg_set_relation_stats, pg_clear_relatio -Author: Jeff Davis <jdavis@postgresql.org> -2024-10-24 [d32d14639] Add functions pg_restore_relation_stats(), pg_restore_at -Author: Jeff Davis <jdavis@postgresql.org> -2025-03-25 [650ab8aaf] Stats: use schemaname/relname instead of regclass. ---> - -<listitem> -<para> -Add functions to modify per-relation and per-column optimizer statistics (Corey Huinker) -<ulink url="&commit_baseurl;e839c8ecc">§</ulink> -<ulink url="&commit_baseurl;d32d14639">§</ulink> -<ulink url="&commit_baseurl;650ab8aaf">§</ulink> -</para> - -<para> -The functions are pg_restore_relation_stats(), pg_restore_attribute_stats(), pg_clear_relation_stats(), and pg_clear_attribute_stats. -</para> -</listitem> - - -<!-- -Author: Thomas Munro <tmunro@postgresql.org> -2025-04-08 [f78ca6f3e] Introduce file_copy_method setting. ---> - -<listitem> -<para> -Add server variable file_copy_method to control the file copying method (Nazir Bilal Yavuz) -<ulink url="&commit_baseurl;f78ca6f3e">§</ulink> -</para> - -<para> -This controls whether CREATE DATABASE ... STRATEGY=FILE_COPY and ALTER DATABASE ... SET TABLESPACE uses file copy or clone. -</para> -</listitem> - - </itemizedlist> - - <sect4 id="release-18-constraints"> - <title><link linkend="ddl-constraints">Constraints</link></title> - - <itemizedlist> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-09-17 [fc0438b4e] Add temporal PRIMARY KEY and UNIQUE constraints ---> - -<listitem> -<para> -Allow the specification of non-overlapping PRIMARY KEY and UNIQUE constraints (Paul A. Jungwirth) -<ulink url="&commit_baseurl;fc0438b4e">§</ulink> -</para> - -<para> -This is specified by WITHOUT OVERLAPS on the last column. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-01-11 [ca87c415e] Add support for NOT ENFORCED in CHECK constraints -Author: Peter Eisentraut <peter@eisentraut.org> -2025-04-02 [eec0040c4] Add support for NOT ENFORCED in foreign key constraints ---> - -<listitem> -<para> -Allow CHECK and foreign key constraints to be specified as NOT ENFORCED (Amul Sul) -<ulink url="&commit_baseurl;ca87c415e">§</ulink> -<ulink url="&commit_baseurl;eec0040c4">§</ulink> -</para> - -<para> -This also adds column pg_constraint.conenforced. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-11-15 [9321d2fdf] Fix collation handling for foreign keys ---> - -<listitem> -<para> -Require primary/foreign key relationships to use either deterministic collations or the the same nondeterministic collations (Peter Eisentraut) -<ulink url="&commit_baseurl;9321d2fdf">§</ulink> -</para> - -<para> -The restore of a pg_dump, also used by pg_upgrade, will fail if these requirements are not met; schema changes must be made for these upgrade methods to succeed. -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2024-11-08 [14e87ffa5] Add pg_constraint rows for not-null constraints ---> - -<listitem> -<para> -Store column NOT NULL specifications in pg_constraint (Álvaro Herrera, Bernd Helmle) -<ulink url="&commit_baseurl;14e87ffa5">§</ulink> -</para> - -<para> -This allows names to be specified for NOT NULL constraint. This also adds NOT NULL constraints to foreign tables and NOT NULL inheritance control to local tables. -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-04-07 [a379061a2] Allow NOT NULL constraints to be added as NOT VALID ---> - -<listitem> -<para> -Allow ALTER TABLE to set the NOT VALID attribute of NOT NULL constraints (Rushabh Lathia, Jian He) -<ulink url="&commit_baseurl;a379061a2">§</ulink> -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-03-05 [f4e53e10b] Add ALTER TABLE ... ALTER CONSTRAINT ... SET [NO] INHERI -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-03-27 [4a02af8b1] Simplify syntax for ALTER TABLE ALTER CONSTRAINT NO INHE ---> - -<listitem> -<para> -Allow modification of the inheritability of NOT NULL constraints (Suraj Kharage, Álvaro Herrera) -<ulink url="&commit_baseurl;f4e53e10b">§</ulink> -<ulink url="&commit_baseurl;4a02af8b1">§</ulink> -</para> - -<para> -The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT. -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-01-23 [b663b9436] Allow NOT VALID foreign key constraints on partitioned t ---> - -<listitem> -<para> -Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul) -<ulink url="&commit_baseurl;b663b9436">§</ulink> -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2024-09-30 [4dea33ce7] Don't disallow DROP of constraints ONLY on partitioned t ---> - -<listitem> -<para> -Allow dropping of constraints ONLY on partitioned tables (Álvaro Herrera) -<ulink url="&commit_baseurl;4dea33ce7">§</ulink> -</para> - -<para> -This was previously erroneously prohibited. -</para> -</listitem> - - </itemizedlist> - </sect4> - - <sect4 id="release-18-copy"> - <title><link linkend="sql-copy"><command>COPY</command></link></title> - - <itemizedlist> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-10-08 [4ac2a9bec] Add REJECT_LIMIT option to the COPY command. ---> - -<listitem> -<para> -Add REJECT_LIMIT to control the number of invalid rows COPY FROM can ignore (Atsushi Torikoshi) -<ulink url="&commit_baseurl;4ac2a9bec">§</ulink> -</para> - -<para> -This is available when ON_ERROR = 'ignore'. -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2025-04-04 [534874fac] Allow "COPY table TO" command to copy rows from material ---> - -<listitem> -<para> -Allow COPY TO to copy rows from populated materialized view (Jian He) -<ulink url="&commit_baseurl;534874fac">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-10-03 [e7834a1a2] Add LOG_VERBOSITY = 'silent' support to COPY command. ---> - -<listitem> -<para> -Add COPY LOG_VERBOSITY level "silent" to suppress log output of ignored rows (Atsushi Torikoshi) -<ulink url="&commit_baseurl;e7834a1a2">§</ulink> -</para> - -<para> -This new level suppresses output for discarded input rows when on_error = 'ignore'. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-02-06 [401a6956f] Disallow COPY FREEZE on foreign tables. ---> - -<listitem> -<para> -Disallow COPY FREEZE on foreign tables (Nathan Bossart) -<ulink url="&commit_baseurl;401a6956f">§</ulink> -</para> - -<para> -Previously, the COPY worked but the FREEZE was ignored, so disallow this command. -</para> -</listitem> - - </itemizedlist> - </sect4> - - <sect4 id="release-18-explain"> - <title><link linkend="sql-explain"><command>EXPLAIN</command></link></title> - - <itemizedlist> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-12-11 [c2a4078eb] Enable BUFFERS with EXPLAIN ANALYZE by default ---> - -<listitem> -<para> -Automatically include BUFFERS output in EXPLAIN ANALYZE (Guillaume Lelarge, David Rowley) -<ulink url="&commit_baseurl;c2a4078eb">§</ulink> -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2024-08-13 [4c1b4cdb8] Add resource statistics reporting to ANALYZE VERBOSE. -Author: Masahiko Sawada <msawada@postgresql.org> -2024-09-09 [bb7775234] Add WAL usage reporting to ANALYZE VERBOSE output. ---> - -<listitem> -<para> -Add WAL, CPU, and average read statistics output to EXPLAIN ANALYZE VERBOSE (Anthonin Bonnefoy) -<ulink url="&commit_baseurl;4c1b4cdb8">§</ulink> -<ulink url="&commit_baseurl;bb7775234">§</ulink> -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-17 [320545bfc] Add information about WAL buffers being full to EXPLAIN -Author: Michael Paquier <michael@paquier.xyz> -2025-02-17 [6a8a7ce47] Add information about WAL buffers full to VACUUM/ANALYZE ---> - -<listitem> -<para> -Add full WAL buffer count to EXPLAIN (WAL), VACUUM/ANALYZE (VERBOSE), and autovacuum log output (Bertrand Drouvot) -<ulink url="&commit_baseurl;320545bfc">§</ulink> -<ulink url="&commit_baseurl;6a8a7ce47">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Geoghegan <pg@bowt.ie> -2025-03-11 [0fbceae84] Show index search count in EXPLAIN ANALYZE, take 2. ---> - -<listitem> -<para> -In EXPLAIN ANALYZE, report the number of index lookups used per index scan node (Peter Geoghegan) -<ulink url="&commit_baseurl;0fbceae84">§</ulink> -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2025-02-21 [ddb17e387] Allow EXPLAIN to indicate fractional rows. -Author: Robert Haas <rhaas@postgresql.org> -2025-02-27 [95dbd827f] EXPLAIN: Always use two fractional digits for row counts ---> - -<listitem> -<para> -Modify EXPLAIN to output fractional row counts (Ibrar Ahmed, Ilia Evdokimov, Robert Haas) -<ulink url="&commit_baseurl;ddb17e387">§</ulink> -<ulink url="&commit_baseurl;95dbd827f">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-07-05 [1eff8279d] Add memory/disk usage for Material nodes in EXPLAIN -Author: David Rowley <drowley@postgresql.org> -2024-07-05 [53abb1e0e] Fix newly introduced issue in EXPLAIN for Materialize no -Author: Tatsuo Ishii <ishii@postgresql.org> -2024-09-17 [95d6e9af0] Add memory/disk usage for Window aggregate nodes in EXPL -Author: Tatsuo Ishii <ishii@postgresql.org> -2024-09-23 [40708acd6] Add memory/disk usage for more executor nodes. ---> - -<listitem> -<para> -Add memory and disk usage details to Material, Window Aggregate, and common table expression nodes in EXPLAIN (David Rowley, Tatsuo Ishii) -<ulink url="&commit_baseurl;1eff8279d">§</ulink> -<ulink url="&commit_baseurl;53abb1e0e">§</ulink> -<ulink url="&commit_baseurl;95d6e9af0">§</ulink> -<ulink url="&commit_baseurl;40708acd6">§</ulink> -</para> -</listitem> - - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-03-11 [8b1b34254] Improve EXPLAIN's display of window functions. ---> - -<listitem> -<para> -Add details about window function arguments to EXPLAIN output (Tom Lane) -<ulink url="&commit_baseurl;8b1b34254">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-07-09 [5a1e6df3b] Show Parallel Bitmap Heap Scan worker stats in EXPLAIN A ---> - -<listitem> -<para> -Add "Parallel Bitmap Heap Scan" worker cache statistics to EXPLAIN ANALYZE (David Geier, Heikki Linnakangas, Donghang Lin, Alena Rybakina, David Rowley) -<ulink url="&commit_baseurl;5a1e6df3b">§</ulink> -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2024-08-21 [c01743aa4] Show number of disabled nodes in EXPLAIN ANALYZE output. -Author: David Rowley <drowley@postgresql.org> -2024-10-11 [161320b4b] Adjust EXPLAIN's output for disabled nodes -Author: David Rowley <drowley@postgresql.org> -2024-10-29 [84b8fccbe] Doc: add detail about EXPLAIN's "Disabled" property ---> - -<listitem> -<para> -Indicate disabled nodes in EXPLAIN ANALYZE output (Robert Haas, David Rowley, Laurenz Albe) -<ulink url="&commit_baseurl;c01743aa4">§</ulink> -<ulink url="&commit_baseurl;161320b4b">§</ulink> -<ulink url="&commit_baseurl;84b8fccbe">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - </sect3> - - <sect3 id="release-18-datatypes"> - <title>Data Types</title> - - <itemizedlist> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2025-01-23 [4e7f62bc3] Add support for Unicode case folding. -Author: Jeff Davis <jdavis@postgresql.org> -2025-01-17 [286a365b9] Support Unicode full case mapping and conversion. ---> - -<listitem> -<para> -Improve Unicode full case mapping and conversion (Jeff Davis) -<ulink url="&commit_baseurl;4e7f62bc3">§</ulink> -<ulink url="&commit_baseurl;286a365b9">§</ulink> -</para> - -<para> -This adds the ability to do conditional and title case mapping, and case map single characters to multiple characters. -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-01-24 [a5579a90a] Make jsonb casts to scalar types translate JSON null to ---> - -<listitem> -<para> -Allow jsonb "null" values to be cast to scalar types as NULL (Tom Lane) -<ulink url="&commit_baseurl;a5579a90a">§</ulink> -</para> - -<para> -Previously such casts generated an error. -</para> -</listitem> - -<!-- -Author: Andrew Dunstan <andrew@dunslane.net> -2025-03-05 [4603903d2] Allow json{b}_strip_nulls to remove null array elements ---> - -<listitem> -<para> -Add optional parameter to json{b}_strip_nulls to allow removal of null array elements (Florents Tselai) -<ulink url="&commit_baseurl;4603903d2">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-04-01 [6c12ae09f] Introduce a SQL-callable function array_sort(anyarray). ---> - -<listitem> -<para> -Add function array_sort() which sorts an array's first dimension (Junwang Zhao, Jian He) -<ulink url="&commit_baseurl;6c12ae09f">§</ulink> -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-11-01 [49d6c7d8d] Add SQL function array_reverse() ---> - -<listitem> -<para> -Add function array_reverse() which reverses an array's first dimension (Aleksander Alekseev) -<ulink url="&commit_baseurl;49d6c7d8d">§</ulink> -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-13 [0697b2390] Add reverse(bytea). ---> - -<listitem> -<para> -Add function reverse() to reverse bytea bytes (Aleksander Alekseev) -<ulink url="&commit_baseurl;0697b2390">§</ulink> -</para> -</listitem> - -<!-- -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2025-03-07 [6da469bad] Allow casting between bytea and integer types. ---> - -<listitem> -<para> -Allow casting between integer types and bytea (Aleksander Alekseev) -<ulink url="&commit_baseurl;6da469bad">§</ulink> -</para> - -<para> -The integer values are stored as bytea two's complement values. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-04-03 [82a46cca9] Update Unicode data to Unicode 16.0.0 ---> - -<listitem> -<para> -Update Unicode data to Unicode 16.0.0 (Peter Eisentraut) -<ulink url="&commit_baseurl;82a46cca9">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-02-18 [b464e51ab] Update to latest Snowball sources. ---> - -<listitem> -<para> -Add full text search stemming for Estonian (Tom Lane) -<ulink url="&commit_baseurl;b464e51ab">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-09-24 [cd838e200] Neaten up our choices of SQLSTATEs for XML-related error ---> - -<listitem> -<para> -Improve the XML error codes to more closely match the SQL standard (Tom Lane) -<ulink url="&commit_baseurl;cd838e200">§</ulink> -</para> - -<para> -These errors are reported via SQLSTATE. -</para> -</listitem> - - </itemizedlist> - - </sect3> - - <sect3 id="release-18-functions"> - <title>Functions</title> - - <itemizedlist> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2025-01-24 [bfc599206] Add SQL function CASEFOLD(). ---> - -<listitem> -<para> -Add function CASEFOLD() to allow for more sophisticated case-insensitive matching (Jeff Davis) -<ulink url="&commit_baseurl;bfc599206">§</ulink> -</para> - -<para> -Allows more accurate comparison, i.e., a character can have multiple upper or lower case equivalents, or upper or lower case conversion changes the number of characters. -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-07-11 [a0f1fce80] Add min and max aggregates for composite types (records) -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-10-08 [2d24fd942] Add min and max aggregates for bytea type. ---> - -<listitem> -<para> -Allow MIN()/MAX() aggregates on arrays and composite types (Aleksander Alekseev, Marat Buharov) -<ulink url="&commit_baseurl;a0f1fce80">§</ulink> -<ulink url="&commit_baseurl;2d24fd942">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-08-16 [6be39d77a] Fix extraction of week and quarter fields from intervals ---> - -<listitem> -<para> -Add a WEEK option to EXTRACT() (Tom Lane) -<ulink url="&commit_baseurl;6be39d77a">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-08-16 [6be39d77a] Fix extraction of week and quarter fields from intervals ---> - -<listitem> -<para> -Improve the output EXTRACT(QUARTER ...) for negative values (Tom Lane) -<ulink url="&commit_baseurl;6be39d77a">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-01-22 [172e6b3ad] Support RN (roman-numeral format) in to_number(). ---> - -<listitem> -<para> -Add roman numeral support to to_number() (Hunaid Sohail) -<ulink url="&commit_baseurl;172e6b3ad">§</ulink> -</para> - -<para> -This is accessed via the "RN" pattern. -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2024-12-11 [78c5e141e] Add UUID version 7 generation function. ---> - -<listitem> -<para> -Add UUID version 7 generation function uuidv7() (Andrey Borodin) -<ulink url="&commit_baseurl;78c5e141e">§</ulink> -</para> - -<para> -This UUID value is temporally sortable. Function alias uuidv4() has been added to explicitly generate version 4 UUIDs. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-08-12 [760162fed] Add user-callable CRC functions. ---> - -<listitem> -<para> -Add functions crc32() and crc32c() to compute CRC values (Aleksander Alekseev) -<ulink url="&commit_baseurl;760162fed">§</ulink> -</para> -</listitem> - -<!-- -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2025-03-26 [a3b6dfd41] Add support for gamma() and lgamma() functions. ---> - -<listitem> -<para> -Add math functions gamma() and lgamma() (Dean Rasheed) -<ulink url="&commit_baseurl;a3b6dfd41">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-03-03 [246dedc5d] Allow => syntax for named cursor arguments in plpgsql. ---> - -<listitem> -<para> -Allow "=>" syntax for named cursor arguments in plpgsql (Pavel Stehule) -<ulink url="&commit_baseurl;246dedc5d">§</ulink> -</para> - -<para> -We previously only accepted ":=". -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-07-25 [580f8727c] Add argument names to the regexp_XXX functions. ---> - -<listitem> -<para> -Allow regexp_match[es]/regexp_like/regexp_replace/regexp_count/regexp_instr/regexp_substr/regexp_split_to_table/regexp_split_to_array() to use named arguments (Jian He) -<ulink url="&commit_baseurl;580f8727c">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect3> - - <sect3 id="release-18-libpq"> - <title><link linkend="libpq">libpq</link></title> - - <itemizedlist> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2024-09-09 [cdb6b0fdb] Add PQfullProtocolVersion() to surface the precise proto ---> - -<listitem> -<para> -Add function PQfullProtocolVersion() to report the full, including minor, protocol version number (Jacob Champion, Jelte Fennema-Nio) -<ulink url="&commit_baseurl;cdb6b0fdb">§</ulink> -</para> -</listitem> - -<!-- -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2025-04-02 [285613c60] libpq: Add min/max_protocol_version connection options -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2025-04-02 [507034910] libpq: Handle NegotiateProtocolVersion message different ---> - -<listitem> -<para> -Add libpq connection parameters and environment variables to specify the minimum and maximum acceptable protocol version for connections (Jelte Fennema-Nio) -<ulink url="&commit_baseurl;285613c60">§</ulink> -<ulink url="&commit_baseurl;507034910">§</ulink> -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-12-18 [4b99fed75] libpq: Add service name to PGconn and PQservice() ---> - -<listitem> -<para> -Add libpq function PQservice() to return the connection service name (Michael Banck) -<ulink url="&commit_baseurl;4b99fed75">§</ulink> -</para> -</listitem> - -<!-- -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2024-08-19 [28a1121fd] Mark search_path as GUC_REPORT -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2024-08-19 [0d06a7eac] Document that search_path is reported by the server ---> - -<listitem> -<para> -Report search_path changes to the client (Alexander Kukushkin, Jelte Fennema-Nio, Tomas Vondra) -<ulink url="&commit_baseurl;28a1121fd">§</ulink> -<ulink url="&commit_baseurl;0d06a7eac">§</ulink> -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2024-08-12 [ea92f3a0a] libpq: Trace frontend authentication challenges -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2024-08-14 [a5c6b8f22] libpq: Trace responses to SSLRequest and GSSENCRequest -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2024-08-16 [b8b3f861f] libpq: Trace all messages received from the server -Author: Robert Haas <rhaas@postgresql.org> -2025-02-24 [e87c14b19] libpq: Trace all NegotiateProtocolVersion fields -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2024-08-09 [7adec2d5f] libpq: Trace StartupMessage/SSLRequest/GSSENCRequest cor ---> - -<listitem> -<para> -Add PQtrace() output for all message types, including authentication (Jelte Fennema-Nio) -<ulink url="&commit_baseurl;ea92f3a0a">§</ulink> -<ulink url="&commit_baseurl;a5c6b8f22">§</ulink> -<ulink url="&commit_baseurl;b8b3f861f">§</ulink> -<ulink url="&commit_baseurl;e87c14b19">§</ulink> -<ulink url="&commit_baseurl;7adec2d5f">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-04-03 [2da74d8d6] libpq: Add support for dumping SSL key material to file ---> - -<listitem> -<para> -Add libpq connection parameter sslkeylogfile which dumps out SSL key material (Abhishek Chanda, Daniel Gustafsson) -<ulink url="&commit_baseurl;2da74d8d6">§</ulink> -</para> - -<para> -This is useful for debugging. -</para> -</listitem> - -<!-- -Author: Thomas Munro <tmunro@postgresql.org> -2025-03-25 [3c86223c9] libpq: Deprecate pg_int64. ---> - -<listitem> -<para> -Modify some libpq function signatures to use int64_t (Thomas Munro) -<ulink url="&commit_baseurl;3c86223c9">§</ulink> -</para> - -<para> -These previously used pg_int64, which is now deprecated. -</para> -</listitem> - - </itemizedlist> - - </sect3> - - <sect3 id="release-18-psql"> - <title><xref linkend="app-psql"/></title> - - <itemizedlist> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-08-22 [d55322b0d] psql: Add more meta-commands able to use the extended pr ---> - -<listitem> -<para> -Allow psql to parse, bind, and close named prepared statements (Anthonin Bonnefoy, Michael Paquier) -<ulink url="&commit_baseurl;d55322b0d">§</ulink> -</para> - -<para> -This is accomplished with new commands \parse, \bind_named, and \close. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-21 [41625ab8e] psql: Add support for pipelines -Author: Michael Paquier <michael@paquier.xyz> -2025-03-18 [17caf6644] psql: Add \sendpipeline to send query buffers while in a -Author: Michael Paquier <michael@paquier.xyz> -2025-03-19 [2cce0fe44] psql: Allow queries terminated by semicolons while in pi ---> - -<listitem> -<para> -Add psql backslash commands to allowing issuance of pipeline queries (Anthonin Bonnefoy) -<ulink url="&commit_baseurl;41625ab8e">§</ulink> -<ulink url="&commit_baseurl;17caf6644">§</ulink> -<ulink url="&commit_baseurl;2cce0fe44">§</ulink> -</para> - -<para> -The new commands are \startpipeline, \syncpipeline, \sendpipeline, \endpipeline, \flushrequest, \flush, and \getresults. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-25 [3ce357584] psql: Add pipeline status to prompt and some state varia ---> - -<listitem> -<para> -Allow adding pipeline status to the psql prompt and add related state variables (Anthonin Bonnefoy) -<ulink url="&commit_baseurl;3ce357584">§</ulink> -</para> - -<para> -The new prompt character is "%P" and the new psql variables are PIPELINE_SYNC_COUNT, PIPELINE_COMMAND_COUNT, and PIPELINE_RESULT_COUNT. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-12-18 [477728b5d] psql: Add more information about service name ---> - -<listitem> -<para> -Allow adding the connection service name to the psql prompt or access it via psql variable (Michael Banck) -<ulink url="&commit_baseurl;477728b5d">§</ulink> -</para> -</listitem> - -<!-- -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2025-01-14 [00f4c2959] psql: Add option to use expanded mode to all list comman ---> - -<listitem> -<para> -Add psql option to use expanded mode on all list commands (Dean Rasheed) -<ulink url="&commit_baseurl;00f4c2959">§</ulink> -</para> - -<para> -Adding 'x' enables this. -</para> -</listitem> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-02-22 [bba2fbc62] Change \conninfo to use tabular format ---> - -<listitem> -<para> -Change psql's \conninfo to use tabular format and include more information (Álvaro Herrera, Maiquel Grassi, Hunaid Sohail) -<ulink url="&commit_baseurl;bba2fbc62">§</ulink> -</para> -</listitem> - -<!-- -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2025-01-14 [2355e5111] psql: Add leakproof indicator to \df+, \do+, \dAo+, and ---> - -<listitem> -<para> -Add function's leakproof indicator to psql's \df+, \do+, \dAo+, and \dC+ outputs (Yugo Nagata) -<ulink url="&commit_baseurl;2355e5111">§</ulink> -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-07-02 [978f38c77] Add information about access method for partitioned rela ---> - -<listitem> -<para> -Add access method details for partitioned relations in \dP+ (Justin Pryzby) -<ulink url="&commit_baseurl;978f38c77">§</ulink> -</para> -</listitem> - -<!-- -Author: Magnus Hagander <magnus@hagander.net> -2025-03-24 [d696406a9] psql: show default extension version in \dx output ---> - -<listitem> -<para> -Add "default_version" to the psql \dx extension output (Magnus Hagander) -<ulink url="&commit_baseurl;d696406a9">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-03-25 [1a759c832] psql: Make default \watch interval configurable ---> - -<listitem> -<para> -Add psql variable WATCH_INTERVAL to set the default \watch wait time (Daniel Gustafsson) -<ulink url="&commit_baseurl;1a759c832">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect3> - - <sect3 id="release-18-server-apps"> - <title>Server Applications</title> - - <itemizedlist> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-10-01 [983a588e0] initdb: Add new option "- -no-data-checksums" -Author: Peter Eisentraut <peter@eisentraut.org> -2024-10-16 [04bec894a] initdb: Change default to using data checksums. ---> - -<listitem> -<para> -Change initdb to default to enabling checksums (Greg Sabino Mullane) -<ulink url="&commit_baseurl;983a588e0">§</ulink> -<ulink url="&commit_baseurl;04bec894a">§</ulink> -</para> - -<para> -The new initdb option --no-data-checksums disables checksums. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-25 [cf131fa94] initdb: Add - -no-sync-data-files. ---> - -<listitem> -<para> -Add initdb option --no-sync-data-files to avoid syncing heap/index files (Nathan Bossart) -<ulink url="&commit_baseurl;cf131fa94">§</ulink> -</para> - -<para> -initdb --no-sync is still available to avoid syncing any files. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-18 [edba754f0] vacuumdb: Add option for analyzing only relations missin -Author: Nathan Bossart <nathan@postgresql.org> -2025-04-30 [987910502] vacuumdb: Don't skip empty relations in - -missing-stats- ---> - -<listitem> -<para> -Add vacuumdb option --missing-stats-only to compute only missing optimizer statistics (Corey Huinker, Nathan Bossart) -<ulink url="&commit_baseurl;edba754f0">§</ulink> -<ulink url="&commit_baseurl;987910502">§</ulink> -</para> - -<para> -This option can only be used by --analyze-only and --analyze-in-stages. -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2025-03-17 [99aeb8470] pg_combinebackup: Add -k, - -link option. ---> - -<listitem> -<para> -Add pg_combinebackup option -k/--link to enable hard linking (Israel Barth Rubio, Robert Haas) -<ulink url="&commit_baseurl;99aeb8470">§</ulink> -</para> - -<para> -Only some files can be hard linked. This should not be used if the backups will be used independently. -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2024-09-27 [8dfd31290] pg_verifybackup: Verify tar-format backups. ---> - -<listitem> -<para> -Allow pg_verifybackup to verify tar-format backups (Amul Sul) -<ulink url="&commit_baseurl;8dfd31290">§</ulink> -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2025-03-12 [4ecdd4110] pg_rewind: Add dbname to primary_conninfo when using - -w ---> - -<listitem> -<para> -If pg_rewind's --source-server specifies a database name, use it in --write-recovery-conf output (Masahiko Sawada) -<ulink url="&commit_baseurl;4ecdd4110">§</ulink> -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2025-02-21 [30666d185] pg_resetwal: Add - -char-signedness option to change the ---> - -<listitem> -<para> -Add pg_resetwal option --char-signedness to change the default char signedness (Masahiko Sawada) -<ulink url="&commit_baseurl;30666d185">§</ulink> -</para> -</listitem> - - </itemizedlist> - - - <sect4 id="release-18-pgdump"> - <title><link - linkend="app-pgdump"><application>pg_dump</application></link>/<link - linkend="app-pg-dumpall"><application>pg_dumpall</application></link>/<link - linkend="app-pgrestore"><application>pg_restore</application></link></title> - - <itemizedlist> - -<!-- -Author: Andrew Dunstan <andrew@dunslane.net> -2025-04-04 [1495eff7b] Non text modes for pg_dumpall, correspondingly change pg ---> - -<listitem> -<para> -Allow pg_dumpall to dump in the same output formats as pg_dump supports (Mahendra Singh Thalor, Andrew Dunstan) -<ulink url="&commit_baseurl;1495eff7b">§</ulink> -</para> - -<para> -Also modify pg_restore to handle such dumps. Previously pg_dumpall only supported text format. -</para> -</listitem> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2025-03-25 [bde2fb797] Add pg_dump - -with-{schema|data|statistics} options. ---> - -<listitem> -<para> -Add pg_dump options --with-schema, --with-data, and --with-statistics (Jeff Davis) -<ulink url="&commit_baseurl;bde2fb797">§</ulink> -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-25 [9c49f0e8c] pg_dump: Add - -sequence-data. ---> - -<listitem> -<para> -Add pg_dump option --sequence-data to dump sequence data that would normally be excluded (Nathan Bossart) -<ulink url="&commit_baseurl;9c49f0e8c">§</ulink> -</para> -</listitem> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2025-02-20 [1fd1bd871] Transfer statistics during pg_upgrade. ---> - -<listitem> -<para> -Add pg_dump, pg_dumpall, and pg_restore options --statistics-only, --no-statistics, --no-data, and --no-schema (Corey Huinker, Jeff Davis) -<ulink url="&commit_baseurl;1fd1bd871">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-03-16 [cd3c45125] pg_dump, pg_dumpall, pg_restore: Add - -no-policies optio ---> - -<listitem> -<para> -Add option --no-policies to disable row level security policy processing in pg_dump, pg_dumpall, pg_restore (Nikolay Samokhvalov) -<ulink url="&commit_baseurl;cd3c45125">§</ulink> -</para> - -<para> -This is useful for migrating to systems with different policies. -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-pgupgrade"> - <title><link linkend="pgupgrade"><application>pg_upgrade</application></link></title> - - <itemizedlist> - -<!-- -Author: Jeff Davis <jdavis@postgresql.org> -2025-02-20 [1fd1bd871] Transfer statistics during pg_upgrade. -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-18 [c9d502eb6] Update guidance for running vacuumdb after pg_upgrade. -Author: Nathan Bossart <nathan@postgresql.org> -2025-04-30 [d5f1b6a75] Further adjust guidance for running vacuumdb after pg_up -Author: Jeff Davis <jdavis@postgresql.org> -2025-02-20 [1fd1bd871] Transfer statistics during pg_upgrade. ---> - -<listitem> -<para> -Allow pg_upgrade to preserve optimizer statistics (Corey Huinker, Jeff Davis, Nathan Bossart) -<ulink url="&commit_baseurl;1fd1bd871">§</ulink> -<ulink url="&commit_baseurl;c9d502eb6">§</ulink> -<ulink url="&commit_baseurl;d5f1b6a75">§</ulink> -<ulink url="&commit_baseurl;1fd1bd871">§</ulink> -</para> - -<para> -Extended statistics are not preserved. Also add pg_upgrade option --no-statistics to disable statistics preservation. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [40e2e5e92] Introduce framework for parallelizing various pg_upgrade -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [6d3d2e8e5] pg_upgrade: Parallelize retrieving relation information. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [7baa36de5] pg_upgrade: Parallelize subscription check. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [46cad8b31] pg_upgrade: Parallelize retrieving loadable libraries. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [6ab8f27bc] pg_upgrade: Parallelize retrieving extension updates. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [bbf83cab9] pg_upgrade: Parallelize data type checks. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [9db3018cf] pg_upgrade: Parallelize contrib/isn check. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [c34eabfbb] pg_upgrade: Parallelize postfix operator check. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [cf2f82a37] pg_upgrade: Parallelize incompatible polymorphics check. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [f93f5f7b9] pg_upgrade: Parallelize WITH OIDS check. -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-16 [c880cf258] pg_upgrade: Parallelize encoding conversion check. ---> - -<listitem> -<para> -Allow pg_upgrade to process database checks in parallel (Nathan Bossart) -<ulink url="&commit_baseurl;40e2e5e92">§</ulink> -<ulink url="&commit_baseurl;6d3d2e8e5">§</ulink> -<ulink url="&commit_baseurl;7baa36de5">§</ulink> -<ulink url="&commit_baseurl;46cad8b31">§</ulink> -<ulink url="&commit_baseurl;6ab8f27bc">§</ulink> -<ulink url="&commit_baseurl;bbf83cab9">§</ulink> -<ulink url="&commit_baseurl;9db3018cf">§</ulink> -<ulink url="&commit_baseurl;c34eabfbb">§</ulink> -<ulink url="&commit_baseurl;cf2f82a37">§</ulink> -<ulink url="&commit_baseurl;f93f5f7b9">§</ulink> -<ulink url="&commit_baseurl;c880cf258">§</ulink> -</para> - -<para> -This is controlled by the existing --jobs option. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-25 [626d7236b] pg_upgrade: Add - -swap for faster file transfer. ---> - -<listitem> -<para> -Add pg_upgrade option --swap to swap directories rather than copy, clone, or link files (Nathan Bossart) -<ulink url="&commit_baseurl;626d7236b">§</ulink> -</para> - -<para> -This mode is potentially the fastest. -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2025-02-21 [a8238f87f] pg_upgrade: Preserve default char signedness value from -Author: Masahiko Sawada <msawada@postgresql.org> -2025-02-21 [1aab68059] pg_upgrade: Add - -set-char-signedness to set the default ---> - -<listitem> -<para> -Add pg_upgrade option --set-char-signedness to set the default char signedness of new cluster (Masahiko Sawada) -<ulink url="&commit_baseurl;a8238f87f">§</ulink> -<ulink url="&commit_baseurl;1aab68059">§</ulink> -</para> - -<para> -This is to handle cases where a pre-Postgres 18 cluster's default CPU signedness does not match the new cluster. -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-logicalrep-app"> - <title>Logical Replication Applications></title> - - <itemizedlist> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2025-03-28 [fb2ea12f4] pg_createsubscriber: Add '- -all' option. ---> - -<listitem> -<para> -Add pg_createsubscriber option --all to create logical replicas for all databases (Shubham Khanna) -<ulink url="&commit_baseurl;fb2ea12f4">§</ulink> -</para> -</listitem> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2025-03-20 [e5aeed4b8] pg_createsubscriber: Add -R publications option. ---> - -<listitem> -<para> -Add pg_createsubscriber option --remove to remove publications (Shubham Khanna) -<ulink url="&commit_baseurl;e5aeed4b8">§</ulink> -</para> -</listitem> - -<!-- -Author: Amit Kapila <akapila@postgresql.org> -2025-02-26 [e117cfb2f] Add two-phase option in pg_createsubscriber. ---> - -<listitem> -<para> -Add pg_createsubscriber option --enable-two-phase to enable prepared transactions (Shubham Khanna) -<ulink url="&commit_baseurl;e117cfb2f">§</ulink> -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2025-04-04 [cf2655a90] pg_recvlogical: Add - -failover option. ---> - -<listitem> -<para> -Add pg_recvlogical option --failover to specify failover slots (Hayato Kuroda) -<ulink url="&commit_baseurl;cf2655a90">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2025-03-25 [c68100aa4] Allow pg_recvlogical - -drop-slot to work without - -dbnam ---> - -<listitem> -<para> -Allow pg_recvlogical --drop-slot to work without --dbname (Hayato Kuroda) -<ulink url="&commit_baseurl;c68100aa4">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - </sect3> - - <sect3 id="release-18-source-code"> - <title>Source Code</title> - - <itemizedlist> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-07-05 [4b211003e] Support loading of injection points -Author: Michael Paquier <michael@paquier.xyz> -2024-07-18 [a0a5869a8] Add INJECTION_POINT_CACHED() to run injection points dir ---> - -<listitem> -<para> -Separate the loading and running of injection points (Michael Paquier, Heikki Linnakangas) -<ulink url="&commit_baseurl;4b211003e">§</ulink> -<ulink url="&commit_baseurl;a0a5869a8">§</ulink> -</para> - -<para> -Injection points can now be created, but not run, via INJECTION_POINT_LOAD(), and such injection points can be run via INJECTION_POINT_CACHED(). -</para> -</listitem> - -<!-- -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2024-07-26 [20e0e7da9] Add test for early backend startup errors ---> - -<listitem> -<para> -Allow inline injection point test code with IS_INJECTION_POINT_ATTACHED() (Heikki Linnakangas) -<ulink url="&commit_baseurl;20e0e7da9">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-08-05 [ca6fde922] Optimize JSON escaping using SIMD ---> - -<listitem> -<para> -Improve the performance of processing long JSON strings using SIMD instructions (David Rowley) -<ulink url="&commit_baseurl;ca6fde922">§</ulink> -</para> -</listitem> - -<!-- -Author: John Naylor <john.naylor@postgresql.org> -2025-04-06 [3c6e8c123] Compute CRC32C using AVX-512 instructions where availabl ---> - -<listitem> -<para> -Speed up CRC32C calculations using x86 AVX-512 instructions (Raghuveer Devulapalli, Paul Amonson) -<ulink url="&commit_baseurl;3c6e8c123">§</ulink> -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-28 [6be53c276] Optimize popcount functions with ARM Neon intrinsics. -Author: Nathan Bossart <nathan@postgresql.org> -2025-03-28 [519338ace] Optimize popcount functions with ARM SVE intrinsics. ---> - -<listitem> -<para> -Add ARM Neon and SVE CPU intrinsics for popcount (integer bit counting) (Chiranmoy Bhattacharya, Devanga Susmitha, Rama Malladi) -<ulink url="&commit_baseurl;6be53c276">§</ulink> -<ulink url="&commit_baseurl;519338ace">§</ulink> -</para> -</listitem> - -<!-- -Author: Dean Rasheed <dean.a.rasheed@gmail.com> -2024-08-15 [8dc28d7eb] Optimise numeric multiplication using base-NBASE^2 arith ---> - -<listitem> -<para> -Improve the speed of multiplication (Joel Jacobson, Dean Rasheed) -<ulink url="&commit_baseurl;8dc28d7eb">§</ulink> -</para> -</listitem> - -<!-- -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2025-04-07 [65c298f61] Add support for basic NUMA awareness -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2025-04-07 [8cc139bec] Introduce pg_shmem_allocations_numa view -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2025-04-07 [ba2a3c230] Add pg_buffercache_numa view with NUMA node info ---> - -<listitem> -<para> -Add configure option --with-libnuma to enable NUMA awareness (Jakub Wartak, Bertrand Drouvot) -<ulink url="&commit_baseurl;65c298f61">§</ulink> -<ulink url="&commit_baseurl;8cc139bec">§</ulink> -<ulink url="&commit_baseurl;ba2a3c230">§</ulink> -</para> - -<para> -The function pg_numa_available() reports on NUMA awareness, and system views pg_shmem_allocations_numa and pg_buffercache_numa which report on shared memory distribution across -NUMA nodes. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2024-09-18 [b52c4fc3c] Add TOAST table to pg_index. ---> - -<listitem> -<para> -Add TOAST table to pg_index to allow for very large index expression indexes (Nathan Bossart) -<ulink url="&commit_baseurl;b52c4fc3c">§</ulink> -</para> -</listitem> - -<!-- -Author: David Rowley <drowley@postgresql.org> -2024-12-20 [02a8d0c45] Remove pg_attribute.attcacheoff column ---> - -<listitem> -<para> -Remove column pg_attribute.attcacheoff (David Rowley) -<ulink url="&commit_baseurl;02a8d0c45">§</ulink> -</para> -</listitem> - -<!-- -Author: Melanie Plageman <melanieplageman@gmail.com> -2025-03-03 [99f8f3fbb] Add relallfrozen to pg_class ---> - -<listitem> -<para> -Add column pg_class.relallfrozen (Melanie Plageman) -<ulink url="&commit_baseurl;99f8f3fbb">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-09-10 [56fead44d] Add amgettreeheight index AM API routine -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-07 [af4002b38] Rename amcancrosscompare ---> - -<listitem> -<para> -Add amgettreeheight, amconsistentequality, and amconsistentordering to the index access method API (Mark Dilger) -<ulink url="&commit_baseurl;56fead44d">§</ulink> -<ulink url="&commit_baseurl;af4002b38">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-09-17 [7406ab623] Add stratnum GiST support function ---> - -<listitem> -<para> -Add GiST support function stratnum (Paul A. Jungwirth) -<ulink url="&commit_baseurl;7406ab623">§</ulink> -</para> -</listitem> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2025-02-21 [44fe30fda] Add default_char_signedness field to ControlFileData. ---> - -<listitem> -<para> -Record the default CPU signedness of "char" in pg_controldata (Masahiko Sawada) -<ulink url="&commit_baseurl;44fe30fda">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-12 [72a3d0462] Prepare for Python "Limited API" in PL/Python -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-14 [0793ab810] Activate Python "Limited API" in PL/Python ---> - -<listitem> -<para> -Add support for Python "Limited API" in PL/Python (Peter Eisentraut) -<ulink url="&commit_baseurl;72a3d0462">§</ulink> -<ulink url="&commit_baseurl;0793ab810">§</ulink> -</para> - -<para> -This helps prevent problems caused by Python 3.x version mismatches. -</para> -</listitem> - -<!-- -Author: Jacob Champion <jchampion@postgresql.org> -2025-04-29 [45363fca6] Bump the minimum supported Python version to 3.6.8 ---> - -<listitem> -<para> -Change the minimum supported Python version to 3.6.8 (Jacob Champion) -<ulink url="&commit_baseurl;45363fca6">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2024-09-02 [a70e01d43] Remove support for OpenSSL older than 1.1.0 -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2024-10-24 [6c66b7443] Raise the minimum supported OpenSSL version to 1.1.1 ---> - -<listitem> -<para> -Remove support for OpenSSL versions older than 1.1.1 (Daniel Gustafsson) -<ulink url="&commit_baseurl;a70e01d43">§</ulink> -<ulink url="&commit_baseurl;6c66b7443">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-10-01 [972c2cd28] jit: Require at least LLVM 14, if enabled. ---> - -<listitem> -<para> -If LLVM is enabled, require version 14 or later (Thomas Munro) -<ulink url="&commit_baseurl;972c2cd28">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-03-26 [9324c8c58] Introduce PG_MODULE_MAGIC_EXT macro. ---> - -<listitem> -<para> -Add macro PG_MODULE_MAGIC_EXT to allow extensions to report their name and version (Andrei Lepikhov) -<ulink url="&commit_baseurl;9324c8c58">§</ulink> -</para> - -<para> -This information can be access via the new function pg_get_loaded_modules(). -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-09-09 [218527d01] Don't bother checking the result of SPI_connect[_ext] an ---> - -<listitem> -<para> -Document that SPI_connect/SPI_connect_ext() always returns success (SPI_OK_CONNECT) (Stepan Neretin) -<ulink url="&commit_baseurl;218527d01">§</ulink> -</para> - -<para> -Errors are always reported via ereport(). -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-01-27 [5afaba629] doc: Meson is not experimental on Windows ---> - -<listitem> -<para> -Remove the experimental designation of Meson builds on Windows (Aleksander Alekseev) -<ulink url="&commit_baseurl;5afaba629">§</ulink> -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2024-07-31 [e54a42ac9] Add API and ABI stability guidance to the C language doc ---> - -<listitem> -<para> -Add documentation section about API and ABI compatibility (David Wheeler, Peter Eisentraut) -<ulink url="&commit_baseurl;e54a42ac9">§</ulink> -</para> -</listitem> - -<!-- -Author: Thomas Munro <tmunro@postgresql.org> -2024-07-30 [e25626677] Remove - -disable-spinlocks. -Author: Thomas Munro <tmunro@postgresql.org> -2024-07-30 [813852613] Remove - -disable-atomics, require 32 bit atomics. ---> - -<listitem> -<para> -Remove configure options --disable-spinlocks and --disable-atomics (Thomas Munro) -<ulink url="&commit_baseurl;e25626677">§</ulink> -<ulink url="&commit_baseurl;813852613">§</ulink> -</para> - -<para> -Thirty-two bit atomic operations are now required. -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2024-07-01 [edadeb071] Remove support for HPPA (a/k/a PA-RISC) architecture. ---> - -<listitem> -<para> -Remove support for the HPPA/PA-RISC architecture (Tom Lane) -<ulink url="&commit_baseurl;edadeb071">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect3> - - <sect3 id="release-18-modules"> - <title>Additional Modules</title> - - <itemizedlist> - -<!-- -Author: Masahiko Sawada <msawada@postgresql.org> -2024-10-14 [7cdfeee32] Add contrib/pg_logicalinspect. ---> - -<listitem> -<para> -Add extension pg_logicalinspect to inspect logical snapshots (Bertrand Drouvot) -<ulink url="&commit_baseurl;7cdfeee32">§</ulink> -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2025-03-26 [8d5ceb113] pg_overexplain: Additional EXPLAIN options for debugging ---> - -<listitem> -<para> -Add extension pg_overexplain which adds debug details to EXPLAIN output (Robert Haas) -<ulink url="&commit_baseurl;8d5ceb113">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-07-26 [c297a47c5] postgres_fdw: Add "used_in_xact" column to postgres_fdw_ -Author: Fujii Masao <fujii@postgresql.org> -2024-07-26 [857df3cef] postgres_fdw: Add connection status check to postgres_fd -Author: Fujii Masao <fujii@postgresql.org> -2024-09-18 [4f08ab554] postgres_fdw: Extend postgres_fdw_get_connections to ret -Author: Fujii Masao <fujii@postgresql.org> -2025-03-03 [fe186bda7] postgres_fdw: Extend postgres_fdw_get_connections to ret ---> - -<listitem> -<para> -Add output columns to postgres_fdw_get_connections() (Hayato Kuroda, Sagar Dilip Shedge) -<ulink url="&commit_baseurl;c297a47c5">§</ulink> -<ulink url="&commit_baseurl;857df3cef">§</ulink> -<ulink url="&commit_baseurl;4f08ab554">§</ulink> -<ulink url="&commit_baseurl;fe186bda7">§</ulink> -</para> - -<para> -New output column "used_in_xact" indicates if the foreign data wrapper is being used by a current transaction, "closed" indicates if it is closed, "user_name" indicates the -user name, and "remote_backend_pid" indicates the remote backend process identifier. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-01-15 [761c79508] postgres_fdw: SCRAM authentication pass-through ---> - -<listitem> -<para> -Allow SCRAM authentication from the client to be passed to postgres_fdw servers (Matheus Alcantara, Peter Eisentraut) -<ulink url="&commit_baseurl;761c79508">§</ulink> -</para> - -<para> -This avoids storing postgres_fdw authentication information in the database, and is enabled with the postgres_fdw "use_scram_passthrough" connection option. libpq uses new connection -parameters scram_client_key and scram_server_key. -</para> -</listitem> - -<!-- -Author: Peter Eisentraut <peter@eisentraut.org> -2025-03-26 [3642df265] dblink: SCRAM authentication pass-through ---> - -<listitem> -<para> -Allow SCRAM authentication from the client to be passed to dblink servers (Matheus Alcantara) -<ulink url="&commit_baseurl;3642df265">§</ulink> -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-10-03 [a1c4c8a9e] file_fdw: Add on_error and log_verbosity options to file ---> - -<listitem> -<para> -Add on_error and log_verbosity options to file_fdw (Atsushi Torikoshi) -<ulink url="&commit_baseurl;a1c4c8a9e">§</ulink> -</para> - -<para> -These control how file_fdw handles and reports invalid file rows. -</para> -</listitem> - -<!-- -Author: Fujii Masao <fujii@postgresql.org> -2024-11-20 [6c8f67032] file_fdw: Add REJECT_LIMIT option to file_fdw. ---> - -<listitem> -<para> -Add "reject_limit" to control the number of invalid rows file_fdw can ignore (Atsushi Torikoshi) -<ulink url="&commit_baseurl;6c8f67032">§</ulink> -</para> - -<para> -This is active when ON_ERROR = 'ignore'. -</para> -</listitem> - -<!-- -Author: Nathan Bossart <nathan@postgresql.org> -2025-01-07 [f7e1b3828] Add passwordcheck.min_password_length. ---> - -<listitem> -<para> -Add configurable variable min_password_length to passwordcheck (Emanuele Musella, Maurizio Boriani) -<ulink url="&commit_baseurl;f7e1b3828">§</ulink> -</para> - -<para> -This controls the minimum password length. -</para> -</listitem> - -<!-- -Author: Tatsuo Ishii <ishii@postgresql.org> -2024-10-11 [cae0f3c40] pgbench: Improve result outputs related to failed transa ---> - -<listitem> -<para> -Have pgbench report the number of failed, retried, or skipped transactions in per-script reports (Yugo Nagata) -<ulink url="&commit_baseurl;cae0f3c40">§</ulink> -</para> -</listitem> - -<!-- -Author: Tom Lane <tgl@sss.pgh.pa.us> -2025-03-16 [448904423] contrib/isn: Make weak mode a GUC setting, and fix relat ---> - -<listitem> -<para> -Add isn server variable "weak" to control invalid check digit acceptance (Viktor Holmberg) -<ulink url="&commit_baseurl;448904423">§</ulink> -</para> - -<para> -This was previously only controlled by function isn_weak(). -</para> -</listitem> - -<!-- -Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> -2025-04-03 [e4309f73f] Add support for sorted gist index builds to btree_gist ---> - -<listitem> -<para> -Allow values to be sorted to speed btree_gist index builds (Bernd Helmle, Andrey Borodin) -<ulink url="&commit_baseurl;e4309f73f">§</ulink> -</para> -</listitem> - -<!-- -Author: Tomas Vondra <tomas.vondra@postgresql.org> -2025-03-29 [14ffaece0] amcheck: Add gin_index_check() to verify GIN index ---> - -<listitem> -<para> -Add amcheck function gin_index_check() to verify GIN indexes (Grigory Kryachko, Heikki Linnakangas, Andrey Borodin) -<ulink url="&commit_baseurl;14ffaece0">§</ulink> -</para> -</listitem> - -<!-- -Author: Andres Freund <andres@anarazel.de> -2025-04-08 [dcf7e1697] Add pg_buffercache_evict_{relation,all} functions ---> - -<listitem> -<para> -Add functions pg_buffercache_evict_relation() and pg_buffercache_evict_all() to evict unpinned shared buffers (Nazir Bilal Yavuz) -<ulink url="&commit_baseurl;dcf7e1697">§</ulink> -</para> - -<para> -The existing function pg_buffercache_evict() now returns the buffer flush status. -</para> -</listitem> - -<!-- -Author: Robert Haas <rhaas@postgresql.org> -2025-03-18 [c65bc2e1d] Make it possible for loadable modules to add EXPLAIN opt -Author: Robert Haas <rhaas@postgresql.org> -2025-03-18 [4fd02bf7c] Add some new hooks so extensions can add details to EXPL -Author: Robert Haas <rhaas@postgresql.org> -2025-03-20 [50ba65e73] Add an additional hook for EXPLAIN option validation. ---> - -<listitem> -<para> -Allow extensions to install custom EXPLAIN options (Robert Haas, Sami Imseih) -<ulink url="&commit_baseurl;c65bc2e1d">§</ulink> -<ulink url="&commit_baseurl;4fd02bf7c">§</ulink> -<ulink url="&commit_baseurl;50ba65e73">§</ulink> -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-08-04 [7949d9594] Introduce pluggable APIs for Cumulative Statistics -Author: Michael Paquier <michael@paquier.xyz> -2024-08-05 [2eff9e678] Add helper routines to retrieve data for custom fixed-nu ---> - -<listitem> -<para> -Allow extensions to use the server's cumulative statistics API (Michael Paquier) -<ulink url="&commit_baseurl;7949d9594">§</ulink> -<ulink url="&commit_baseurl;2eff9e678">§</ulink> -</para> -</listitem> - - </itemizedlist> - - <sect4 id="release-18-pgstatstatements"> - <title><link linkend="pgstatstatements"><application>pg_stat_statements</application></link></title> - - <itemizedlist> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-10-28 [6b652e6ce] Set query ID for inner queries of CREATE TABLE AS and DE ---> - -<listitem> -<para> -Allow the queries of CREATE TABLE AS and DECLARE to be tracked by pg_stat_statements (Anthonin Bonnefoy) -<ulink url="&commit_baseurl;6b652e6ce">§</ulink> -</para> - -<para> -They are also now assigned query ids. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-09-30 [dc6851596] Show values of SET statements as constants in pg_stat_st ---> - -<listitem> -<para> -Allow the parameterization of SET values in pg_stat_statements (Greg Sabino Mullane, Michael Paquier) -<ulink url="&commit_baseurl;dc6851596">§</ulink> -</para> - -<para> -This reduces the bloat caused by SET statements with differing constants. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2024-10-09 [cf54a2c00] pg_stat_statements: Add columns to track parallel worker ---> - -<listitem> -<para> -Add pg_stat_statements columns to report parallel activity (Guillaume Lelarge) -<ulink url="&commit_baseurl;cf54a2c00">§</ulink> -</para> - -<para> -The new columns are parallel_workers_to_launch and parallel_workers_launched. -</para> -</listitem> - -<!-- -Author: Michael Paquier <michael@paquier.xyz> -2025-02-17 [ce5bcc4a9] pg_stat_statements: Add wal_buffers_full ---> - -<listitem> -<para> -Add pg_stat_statements.wal_buffers_full to report full WAL buffers (Bertrand Drouvot) -<ulink url="&commit_baseurl;ce5bcc4a9">§</ulink> -</para> -</listitem> - - </itemizedlist> - - </sect4> - - <sect4 id="release-18-pgcrypto"> - <title><link linkend="pgcrypto"><application>pgcrypto</application></link></title> - - <itemizedlist> - -<!-- -Author: Álvaro Herrera <alvherre@alvh.no-ip.org> -2025-04-05 [749a9e20c] Add modern SHA-2 based password hashes to pgcrypto. ---> - -<listitem> -<para> -Add pgcrypto functions sha256crypt() and sha512crypt() (Bernd Helmle) -<ulink url="&commit_baseurl;749a9e20c">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-02-14 [9ad1b3d01] pgcrypto: Add support for CFB mode in AES encryption ---> - -<listitem> -<para> -Add CFB mode to pgcrypto encryption and decryption (Umar Hayat) -<ulink url="&commit_baseurl;9ad1b3d01">§</ulink> -</para> -</listitem> - -<!-- -Author: Daniel Gustafsson <dgustafsson@postgresql.org> -2025-01-24 [035f99cbe] pgcrypto: Make it possible to disable built-in crypto ---> - -<listitem> -<para> -Add pgcrypto server variable builtin_crypto_enabled to allow disabling builtin non-FIPS mode cryptographic functions (Daniel Gustafsson, Joe Conway) -<ulink url="&commit_baseurl;035f99cbe">§</ulink> -</para> - -<para> -This is useful for guaranteeing FIPS mode behavior. -</para> -</listitem> - - </itemizedlist> - </sect4> - - </sect3> - - </sect2> - - <sect2 id="release-18-acknowledgements"> - <title>Acknowledgments</title> - - <para> - The following individuals (in alphabetical order) have contributed - to this release as patch authors, committers, reviewers, testers, - or reporters of issues. - </para> - - <simplelist> - <member>(to be completed)</member> - </simplelist> - </sect2> - - </sect1> diff --git a/doc/src/sgml/release-19.sgml b/doc/src/sgml/release-19.sgml new file mode 100644 index 00000000000..8d242b5b281 --- /dev/null +++ b/doc/src/sgml/release-19.sgml @@ -0,0 +1,16 @@ +<!-- doc/src/sgml/release-19.sgml --> +<!-- See header comment in release.sgml about typical markup --> + +<sect1 id="release-19"> + <title>Release 19</title> + + <formalpara> + <title>Release date:</title> + <para>2026-??-??</para> + </formalpara> + + <para> + This is just a placeholder for now. + </para> + +</sect1> diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index cee577ff8d3..a659d382db9 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -70,7 +70,7 @@ For new features, add links to the documentation sections. All the active branches have to be edited concurrently when doing that. --> -&release-18; +&release-19; <sect1 id="release-prior"> <title>Prior Releases</title> diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml index b58c52ea50f..986ae1f543d 100644 --- a/doc/src/sgml/system-views.sgml +++ b/doc/src/sgml/system-views.sgml @@ -3932,7 +3932,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <structfield>passwd</structfield> <type>text</type> </para> <para> - Password (possibly encrypted); null if none. See + Encrypted password; null if none. See <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link> for details of how encrypted passwords are stored. </para></entry> diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 908857a54af..89928ed1829 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -1355,7 +1355,7 @@ ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type </itemizedlist> <warning> - <title>Warning: Cross-site scripting (XSS) safety</title> + <title>Warning: Cross-site Scripting (XSS) Safety</title> <para> The output from <function>ts_headline</function> is not guaranteed to be safe for direct inclusion in web pages. When diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml index e9214dcf1b1..bb1b5faf34e 100644 --- a/doc/src/sgml/trigger.sgml +++ b/doc/src/sgml/trigger.sgml @@ -129,10 +129,9 @@ In all cases, a trigger is executed as part of the same transaction as the statement that triggered it, so if either the statement or the trigger causes an error, the effects of both will be rolled back. - Also, the trigger will always run in the security context of the role - that executed the statement that caused the trigger to fire, unless - the trigger function is defined as <literal>SECURITY DEFINER</literal>, - in which case it will run as the function owner. + Also, the trigger will always run as the role that queued the trigger + event, unless the trigger function is marked as <literal>SECURITY + DEFINER</literal>, in which case it will run as the function owner. </para> <para> diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml index 7e23a7b6e43..3d315df2f98 100644 --- a/doc/src/sgml/xindex.sgml +++ b/doc/src/sgml/xindex.sgml @@ -598,7 +598,7 @@ <entry>11</entry> </row> <row> - <entry><function>stratnum</function></entry> + <entry><function>translate_cmptype</function></entry> <entry>translate compare types to strategy numbers used by the operator class (optional)</entry> <entry>12</entry> diff --git a/doc/src/sgml/xoper.sgml b/doc/src/sgml/xoper.sgml index 954a90d77d0..853b07a9f14 100644 --- a/doc/src/sgml/xoper.sgml +++ b/doc/src/sgml/xoper.sgml @@ -21,7 +21,7 @@ <para> <productname>PostgreSQL</productname> supports prefix - and infix operators. Operators can be + and binary (or infix) operators. Operators can be overloaded;<indexterm><primary>overloading</primary><secondary>operators</secondary></indexterm> that is, the same operator name can be used for different operators that have different numbers and types of operands. When a query is |