summaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
19 hoursdoc PG 18 relnotes: fix libpq wordingHEADmasterBruce Momjian
Reported-by: Jelte Fennema-Nio Discussion: https://postgr.es/m/CAGECzQT4804OLOP+nDBxDpMw3Soq=g+fKOE7NryBHggy4GgEcg@mail.gmail.com
23 hoursdoc: update guidelines on non-ASCII characters in docsBruce Momjian
25 hoursdoc PG 18 relnotes: add GROUP BY column elimination itemBruce Momjian
With a nod to PG 9.6. Reported-by: jian he Discussion: https://postgr.es/m/CACJufxEqs=EXZETwtaOooTFhZrtxvSWg8M2uPfzjNtS3wQ6Dzw@mail.gmail.com
25 hoursdoc PG 18 relnotes: move protocol version item to "server"Bruce Momjian
Reported-by: Jelte Fennema-Nio Discussion: https://postgr.es/m/CAGECzQSTBgTsDJPxOHWKo7106-YnnYQGzpzNJdis+xTKGUhu2g@mail.gmail.com
41 hoursdoc PG 18 relnotes: update chapter tags for recent commitBruce Momjian
41 hoursdoc PG 18 relnotes: adjust libpq trace & potocol version itemsBruce Momjian
Reported-by: Jelte Fennema-Nio Discussion: https://postgr.es/m/CAGECzQQj0r_JX38fa-_kepp9UaMzCcujRAYaJG2+fPks1b8MVg@mail.gmail.com
42 hoursdoc PG 18 relnotes: reword and reorder itemsBruce Momjian
Also move ssl_groups to a more appropriate section. Reported-by: Jacob Champion (ssl_groups item) Discussion: https://postgr.es/m/CAOYmi+k_zpGaDOrwV46_j-O-a_hSWxcXM6h8vccq45Y28deP-g@mail.gmail.com
46 hoursDoc: correct spelling of meson switch.Tom Lane
It's --auto-features not --auto_features. Reported-by: Egor Chindyaskin <[email protected]> Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 16
2 daysMake "directory" setting work with extension_control_pathPeter Eisentraut
The extension_control_path setting (commit 4f7f7b03758) did not support extensions that set a custom "directory" setting in their control file. Very few extensions use that and during the discussion on the previous commit it was suggested to maybe remove that functionality. But a fix was easier than initially thought, so this just adds that support. The fix is to use the control->control_dir as a share dir to return the path of the extension script files. To make this work more sensibly overall, the directory suffix "extension" is no longer to be included in the extension_control_path value. To quote the patch, it would be -extension_control_path = '/usr/local/share/postgresql/extension:/home/my_project/share/extension:$system' +extension_control_path = '/usr/local/share/postgresql:/home/my_project/share:$system' During the initial patch, there was some discussion on which of these two approaches would be better, and the committed patch was a 50/50 decision. But the support for the "directory" setting pushed it the other way, and also it seems like many people didn't like the previous behavior much. Author: Matheus Alcantara <[email protected]> Reviewed-by: Christoph Berg <[email protected]> Reviewed-by: David E. Wheeler <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/aAi1VACxhjMhjFnb%40msg.df7cb.de#0cdf7b7d727cc593b029650daa3c4fbc
3 daysdoc: first draft of the PG 18 release notesBruce Momjian
3 daysDoc: stop implying recommendation of insecure search_path value.Noah Misch
SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element search path. With the single quotes, it instead specifies one element with a comma and a space in the middle of the element.) In addition to the SET statement, this affects SET clauses of CREATE FUNCTION, ALTER ROLE, and ALTER DATABASE. It does not affect the set_config() SQL function. Though the documentation did not show an insecure command, remove single quotes that could entice a reader to write an insecure command. Back-patch to v13 (all supported versions). Reported-by: Sven Klemm <[email protected]> Author: Sven Klemm <[email protected]> Backpatch-through: 13
3 daysdoc: Flesh out extension docs for the "prefix" make variablePeter Eisentraut
The variable is a bit magical in how it requires "postgresql" or "pgsql" to be part of the path, and files end up in its "share" and "lib" subdirectories. So mention all that and show an example of setting "extension_control_path" and "dynamic_library_path" to use those locations. Author: David E. Wheeler <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Christoph Berg <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected]
3 daysoauth: Move the builtin flow into a separate moduleJacob Champion
The additional packaging footprint of the OAuth Curl dependency, as well as the existence of libcurl in the address space even if OAuth isn't ever used by a client, has raised some concerns. Split off this dependency into a separate loadable module called libpq-oauth. When configured using --with-libcurl, libpq.so searches for this new module via dlopen(). End users may choose not to install the libpq-oauth module, in which case the default flow is disabled. For static applications using libpq.a, the libpq-oauth staticlib is a mandatory link-time dependency for --with-libcurl builds. libpq.pc has been updated accordingly. The default flow relies on some libpq internals. Some of these can be safely duplicated (such as the SIGPIPE handlers), but others need to be shared between libpq and libpq-oauth for thread-safety. To avoid exporting these internals to all libpq clients forever, these dependencies are instead injected from the libpq side via an initialization function. This also lets libpq communicate the offsets of PGconn struct members to libpq-oauth, so that we can function without crashing if the module on the search path came from a different build of Postgres. (A minor-version upgrade could swap the libpq-oauth module out from under a long-running libpq client before it does its first load of the OAuth flow.) This ABI is considered "private". The module has no SONAME or version symlinks, and it's named libpq-oauth-<major>.so to avoid mixing and matching across Postgres versions. (Future improvements may promote this "OAuth flow plugin" to a first-class concept, at which point we would need a public API to replace this anyway.) Additionally, NLS support for error messages in b3f0be788a was incomplete, because the new error macros weren't being scanned by xgettext. Fix that now. Per request from Tom Lane and Bruce Momjian. Based on an initial patch by Daniel Gustafsson, who also contributed docs changes. The "bare" dlopen() concept came from Thomas Munro. Many people reviewed the design and implementation; thank you! Co-authored-by: Daniel Gustafsson <[email protected]> Reviewed-by: Andres Freund <[email protected]> Reviewed-by: Christoph Berg <[email protected]> Reviewed-by: Daniel Gustafsson <[email protected]> Reviewed-by: Jelte Fennema-Nio <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Reviewed-by: Wolfgang Walther <[email protected]> Discussion: https://postgr.es/m/641687.1742360249%40sss.pgh.pa.us
3 daysRemove extra "not" in pg_upgrade documentation.Nathan Bossart
Oversight in commit cb45dc3afb. Reported-by: Erik Rijkers <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/7b856277-62ad-80f0-36e1-a134ec3c9cab%40xs4all.nl
3 daysdoc: Warn that ts_headline() output is not HTML-safe.Dean Rasheed
Add a documentation warning to ts_headline() pointing out that, when working with untrusted input documents, the output is not guaranteed to be safe for direct inclusion in web pages. This is because, while it does remove some XML tags from the input, it doesn't remove all HTML markup, and so the result may be unsafe (e.g., it might permit XSS attacks). To guard against that, all HTML markup should be removed from the input, making it plain text, or the output should be passed through an HTML sanitizer. In addition, document precisely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill <[email protected]> Author: Dean Rasheed <[email protected]> Reviewed-by: Noah Misch <[email protected]> Backpatch-through: 13
3 daysdoc: Improve explanations when a table rewrite is neededPeter Eisentraut
Further improvement for commit 11bd8318602. That commit confused identity and generated columns; fix that. Also, virtual generated columns have since been added; add more details about that. Also some small rewordings and reformattings to further improve clarity. Reviewed-by: Robert Treat <[email protected]> Discussion: https://postgr.es/m/[email protected]
4 daysdoc: Mention cost-based delays for total_[auto]{vacuum,analyze}_timeMichael Paquier
30a6ed0ce4b has added four attributes to pg_stat_all_tables to track the cumulative time spent in [auto]vacuum and [auto]analyze. It was not mentioned that the vacuum cost-based delays are included in these numbers, which could be confusing now that the delays are included in the vacuum progress view (bb8dff9995f2). This commit adds an extra note about this matter. Reported-by: Magnus Hagander <[email protected]> Author: Bertrand Drouvot <[email protected]> Discussion: https://postgr.es/m/CABUevEz9v1ZNToPyD98JnWDGZgG=SmPZKkSNzU9hXQ-nGTQF0g@mail.gmail.com
4 daysdoc: Add missing reference to track_cost_delay_timing.Nathan Bossart
Oversight in commit bb8dff9995.
4 daysFurther adjust guidance for running vacuumdb after pg_upgrade.Nathan Bossart
Since pg_upgrade does not transfer the cumulative statistics used to trigger autovacuum and autoanalyze, the server may take much longer than expected to process them post-upgrade. Currently, we recommend analyzing only relations for which optimizer statistics were not transferred by using the --analyze-in-stages and --missing-stats-only options. This commit appends another recommendation to analyze all relations to update the relevant cumulative statistics by using the --analyze-only option. This is similar to the recommendation for pg_stat_reset(). Reported-by: Christoph Berg <[email protected]> Reviewed-by: Christoph Berg <[email protected]> Discussion: https://postgr.es/m/aAfxfKC82B9NvJDj%40msg.df7cb.de
4 daysdoc: Alphabetize long options for pg_dump[all].Nathan Bossart
The current ordering strategy for these pages is to list the short options in alphabetical order followed by the long options in alphabetical order. If an option has both a short variant and a long variant, the short variant takes precedence. This commit moves a few recently added options to match this style. We should probably adjust all pages and --help output to list the long and short options in one combined alphabetical list (with the long variants taking precedence), but that is a much larger change, so it is left as a future exercise. Oversights in commits a5cf808be5, 1fd1bd8710, and bde2fb797a. Reviewed-by: Álvaro Herrera <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussion: https://postgr.es/m/aBFBtsltgu3-IU1d%40nathan
4 daysTypo and doc fixups for memory context reportingDaniel Gustafsson
This fixes comment and docs typos as well as a small documentation change to make it clearer. Found via post-commit review. Author: Rahila Syed <[email protected]> Reviewed-by: Daniel Gustafsson <[email protected]> Discussion: https://postgr.es/m/CAH2L28vt16C9xTuK+K7QZvtA3kCNWXOEiT=gEekUw3Xxp9LVQw@mail.gmail.com
5 daysGive up on running with NetBSD/OpenBSD's default semaphore settings.Tom Lane
This reverts commit 38da053463bef32adf563ddee5277d16d2b6c5af, which attempted to preserve our ability to start with only 60 semaphores. Subsequent changes (particularly 55b454d0e) have put that idea pretty much permanently out of reach: people wishing to use Postgres v18 on OpenBSD or NetBSD will have no choice but to increase those platforms' default values of SEMMNI and SEMMNS. Hence, revert 38da05346's changes in SEMAS_PER_SET and the minimum tested value of max_connections. Adjust a comment from the subsequent patch 6d0154196, and tweak the wording in runtime.sgml to make it clear that changing SEMMNI/SEMMNS is no longer even a little bit optional on these platforms. Although 38da05346 was later back-patched into v17, leave that branch alone: it's still capable of starting with 60 semaphores, and there's no reason to break that. Author: Tom Lane <[email protected]> Reviewed-by: Nathan Bossart <[email protected]> Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
5 daysBump the minimum supported Python version to 3.6.8Jacob Champion
Python 3.2 is no longer tested by the buildfarm, and there are only a handful of buildfarm animals running versions older than 3.6, which itself went end-of-life in 2021. Python 3.6.8 is the default version shipped in RHEL8, so that seems like a reasonable baseline for PG18. Now that we use the Python Limited API as of 0793ab810, older versions of Python should continue functioning for users of PL/Python in particular, so soften the language from "required" to "supported". Wording by Tom Lane. Separate from the review of the patch itself, several people provided input on the choice of cutoff: Christoph Berg, Devrim Gündüz, Florents Tselai, Jelte Fennema-Nio, and Renan Alves Fonseca. Thank you! Suggested-by: Tom Lane <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussion: https://postgr.es/m/16098.1745079444%40sss.pgh.pa.us
5 daysdoc: adjust max_files_per_process againBruce Momjian
Reported-by: Andres Freund Discussion: https://postgr.es/m/5yqochswkulckuzzrwgv2nqdrfh4k4coc4uwq4lvgzkfwnbjbd@46igbiwjabn2
5 daysdoc: clarify new behavior of max_files_per_processBruce Momjian
5 daysdoc: Small example improvementPeter Eisentraut
Add a comment character before a line annotation, so that the query can be used as presented. Reported-by: Yaroslav Saburov <[email protected]> Author: Euler Taveira <[email protected]> Reviewed-by: Robert Treat <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/174393459040.678.17810152410419444783%40wrigleys.postgresql.org
6 daysDoc: Specify the interaction of publish_generated_columns with column list.Amit Kapila
Author: Peter Smith <[email protected]> Reviewed-by: David G. Johnston <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Discussion: https://postgr.es/m/CAHut+PtnjLiNFFh-3f9cXH0wnwqjdkTjQNbVmZdZ1y+zKt_PPg@mail.gmail.com
8 daysdoc: improve wording of vacuum_max_eager_freeze_failure_rateBruce Momjian
9 daysdoc: remove unnecessary secondary index terms for replication settings.Fujii Masao
Previously, config.sgml included secondary index terms for max_replication_slots and max_active_replication_origins. These are no longer necessary, as each parameter now has a single distinct index entry. The secondary index terms were originally useful because max_active_replication_origins was part of max_replication_slots, and separate index entries helped users locate each setting. However, commit 04ff636cbce split them into independent parameters, making the secondary terms redundant. This commit removes the unnecessary secondary index entries to simplify the documentation. Author: Fujii Masao <[email protected]> Reviewed-by: Euler Taveira <[email protected]> Reviewed-by: Robert Treat <[email protected]> Discussion: https://postgr.es/m/[email protected]
10 daysdoc: simplify new EXPLAIN ANALYZE BUFFERS descriptionBruce Momjian
13 daysdoc: Mention naming convention used by injection pointsMichael Paquier
All the injection points used in the tree have relied on an implied rule: their names should be made of lower-case characters, with dashes between the words used. This commit adds a light mention about that in the docs, encouraging the practice. Author: Hayato Kuroda <[email protected]> Reviewed-by: Aleksander Alekseev <[email protected]> Discussion: https://postgr.es/m/OSCPR01MB14966E14C1378DEE51FB7B7C5F5B32@OSCPR01MB14966.jpnprd01.prod.outlook.com Backpatch-through: 17
13 daysDoc: reword text explaining the --maintenance-db optionDavid Rowley
The previous text was a little clumsy. Here we improve that. Author: David Rowley <[email protected]> Reported-by: Noboru Saito <[email protected]> Reviewed-by: David G. Johnston <[email protected]> Discussion: https://postgr.es/m/CAAM3qnJtv5YbjpwDfVOYN2gZ9zGSLFM1UGJgptSXmwfifOZJFQ@mail.gmail.com Backpatch-through: 13
13 daysDoc: various fixupsDavid Rowley
* Use <symbol> tags for CONNECTION_* #defines We were using an inconsistent mix of <literal> and sometimes <function> tags. * Use <application> tag for libpq There was a mix of <literal> and <productname> Also fix a whitespace issue. None of these seem critical enough mistakes to backpatch. Author: Noboru Saito <[email protected]> Discussion: https://postgr.es/m/CAAM3qnJtv5YbjpwDfVOYN2gZ9zGSLFM1UGJgptSXmwfifOZJFQ@mail.gmail.com
13 daysDoc: fix incorrect punctuationDavid Rowley
Author: Noboru Saito <[email protected]> Discussion: https://postgr.es/m/CAAM3qnJtv5YbjpwDfVOYN2gZ9zGSLFM1UGJgptSXmwfifOZJFQ@mail.gmail.com Backpatch-through: 17
13 daysdoc: Fix memory context level in pg_log_backend_memory_contexts() example.Fujii Masao
Commit d9e03864b6b changed the memory context level numbers shown by pg_log_backend_memory_contexts() to be 1-based. However, the example in the documentation was not updated and still used 0-based numbering. This commit updates the example to match the current 1-based output. Author: Fujii Masao <[email protected]> Reviewed-by: David Rowley <[email protected]> Discussion: https://postgr.es/m/[email protected]
2025-04-19Fix typos and grammar in the codeMichael Paquier
The large majority of these have been introduced by recent commits done in the v18 development cycle. Author: Alexander Lakhin <[email protected]> Discussion: https://postgr.es/m/[email protected]
2025-04-18Doc: fix missing comma at the end of a line.Tatsuo Ishii
Backpatch to 17, where the line was added. Reported by Noboru Saito while he was working on translating the file into Japanese. Discussion: https://postgr.es/m/20250417.203047.1321297410457834775.ishii%40postgresql.org Reported-by: Noboru Saito <[email protected]> Reviewed-by: Daniel Gustafs <[email protected]> Backpatch-through: 17
2025-04-15doc: Fix typos in documentationDaniel Gustafsson
This fixes a set of typos introduced during the v18 development cycle. Author: Daniel Gustafsson <[email protected]> Reviewed-by: Laurenz Albe <[email protected]> Discussion: https://postgr.es/m/[email protected]
2025-04-15doc: Fix missing whitespace in pg_restore documentation.Fujii Masao
Previously, a space was missing between "<option>--exclude-schema</option>" and "for" in the pg_restore documentation. This commit fixes the typo by adding the missing whitespace. Back-patch to v17 where the typo was added. Author: Lele Gaifax <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17
2025-04-13Doc: use "an SQL" consistently rather than "a SQL"David Rowley
Per the precedent set by 04539e73f, adjust article prefixes for "SQL" to use "an" consistently rather than "a", i.e., "an es-que-ell" rather than "a sequel". Both of these are new to v18. Also see b1b13d2b5, d866f0374 and 7bdd489d3.
2025-04-12Doc: do a little copy-editing on Index Storage Parameters list.Tom Lane
Add a paragraph break per suggestion from David G. Johnston. Use a consistent voice for all the different parameter descriptions, and fix a couple of grammatical issues. Reported-by: Igor Korot <[email protected]> Co-authored-by: "David G. Johnston" <[email protected]> Co-authored-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/CA+FnnTz=EW1VQRpWB9J+G-NSchrPFcw4nR7d0JqzEK9jWKB35A@mail.gmail.com
2025-04-11Fix recently introduced typosDaniel Gustafsson
This fixes typos in docs and comments introduced during the v18 development cycle, to keep them from ending up in backbranches. Author: Jacob Brazeal <[email protected]> Reviewed-by: Daniel Gustafsson <[email protected]> Discussion: https://postgr.es/m/CA+COZaCgGua25f2hSrjrDLJcJJAHkwoKgTTqUy-wyL1=64JNjw@mail.gmail.com
2025-04-11Add missing space in pg_restore documentation.Nathan Bossart
Oversight in commit 1495eff7bd.
2025-04-10Doc: remove long-obsolete advice about generated constraint names.Tom Lane
It's been twenty years since we generated constraint names that look like "$N". So this advice about double-quoting such names is well past its sell-by date, and now it merely seems confusing. Reported-by: Yaroslav Saburov <[email protected]> Author: "David G. Johnston" <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 13
2025-04-10Cosmetic fixes for pg_createsubscriber's -all option.Amit Kapila
Author: Peter Smith <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Discussion: https://postgr.es/m/CAHut+PsmSCQ-ENSDQ0YOUcsgzT=GG-E9jyXBvxd51A_dMXH5XA@mail.gmail.com
2025-04-08Move contrib/spi testing from core regression tests to contrib/spi.Tom Lane
It's weird to have the core regression tests depending on contrib code, and coverage testing shows that those test queries add nothing to the core-code coverage of the core tests. So pull those test bits out and put them into ordinary test scripts inside contrib/spi/, making that more like other contrib modules. Aside from being structurally nicer, anything we can take out of the core tests (which are executed multiple times per check-world run) and put into tests executed only once should be a win. It doesn't look like this change will buy a whole lot of milliseconds, but a cycle saved is a cycle earned. Also, there is some discussion around possibly removing refint and/or autoinc altogether. I don't know if that will happen, but we'd certainly need to decouple them from the core tests to do so. The tests for autoinc were quite intertwined with the undocumented "ttdummy" trigger in regress.c. That made the tests very hard to understand and contributed nothing to autoinc's testing either. So I just deleted ttdummy and rewrote the autoinc tests without it. I realized while doing this that the description of autoinc in the SGML docs is not a great description of what the function actually does, so the patch includes some updates to those docs. Author: Tom Lane <[email protected]> Reviewed-by: Heikki Linnakangas <[email protected]> Discussion: https://postgr.es/m/[email protected]
2025-04-08pg_buffercache: Change page_num type to bigintTomas Vondra
The page_num was defined as integer, which should be sufficient for the near future (with 4K pages it's 8TB). But it's virtually free to return bigint, and get a wider range. This was agreed on the thread, but I forgot to tweak this in ba2a3c2302f1. While at it, make the data types in CREATE VIEW a bit more consistent. Discussion: https://postgr.es/m/CAKZiRmxh6KWo0aqRqvmcoaX2jUxZYb4kGp3N%3Dq1w%2BDiH-696Xw%40mail.gmail.co
2025-04-08doc: Correct pg_shmem_allocations_numa.size data typeTomas Vondra
The code in pg_get_shmem_allocations_numa() returned 'size' as int64, but the docs said int32. Report and fix by Noriyoshi Shinoda. Reported-by: Noriyoshi Shinoda <[email protected]> Discussion: https://postgr.es/m/DM4PR84MB1734308EB741A6ECFF040C27EEAA2@DM4PR84MB1734.NAMPRD84.PROD.OUTLOOK.COM
2025-04-08Fix typo in docs.Thomas Munro
Typo in previous commit.
2025-04-08Introduce file_copy_method setting.Thomas Munro
It can be set to either COPY (the default) or CLONE if the system supports it. CLONE causes callers of copydir(), currently CREATE DATABASE ... STRATEGY=FILE_COPY and ALTER DATABASE ... SET TABLESPACE = ..., to use copy_file_range (Linux, FreeBSD) or copyfile (macOS) to copy files instead of a read-write loop over the contents. CLONE gives the kernel the opportunity to share block ranges on copy-on-write file systems and push copying down to storage on others, depending on configuration. On some systems CLONE can be used to clone large databases quickly with CREATE DATABASE ... TEMPLATE=source STRATEGY=FILE_COPY. Other operating systems could be supported; patches welcome. Co-authored-by: Nazir Bilal Yavuz <[email protected]> Reviewed-by: Robert Haas <[email protected]> Reviewed-by: Ranier Vilela <[email protected]> Discussion: https://postgr.es/m/CA%2BhUKGLM%2Bt%2BSwBU-cHeMUXJCOgBxSHLGZutV5zCwY4qrCcE02w%40mail.gmail.com