- 04 Jun, 2020 2 commits
-
-
Michael Paquier authored
Since 573bd08b, hardcoded DH parameters have been moved to a different file, making the comment on top of load_dh_buffer() incorrect. Author: Daniel Gustafsson Discussion: https://postgr.es/m/D9492CCB-9A91-4181-A847-1779630BE2A7@yesql.se
-
Michael Paquier authored
This broke the project rule to not call any complex code while a spinlock is held. Issue introduced by b89e1510. Discussion: https://postgr.es/m/20200602.161518.1399689010416646074.horikyota.ntt@gmail.com Backpatch-through: 9.5
-
- 03 Jun, 2020 3 commits
-
-
Tom Lane authored
Fix some more violations of the "only straight-line code inside a spinlock" rule. These are hazardous not only because they risk holding the lock for an excessively long time, but because it's possible for palloc to throw elog(ERROR), leaving a stuck spinlock behind. copy_replication_slot() had two separate places that did pallocs while holding a spinlock. We can make the code simpler and safer by copying the whole ReplicationSlot struct into a local variable while holding the spinlock, and then referencing that copy. (While that's arguably more cycles than we really need to spend holding the lock, the struct isn't all that big, and this way seems far more maintainable than copying fields piecemeal. Anyway this is surely much cheaper than a palloc.) That bug goes back to v12. InvalidateObsoleteReplicationSlots() not only did a palloc while holding a spinlock, but for extra sloppiness then leaked the memory --- probably for the lifetime of the checkpointer process, though I didn't try to verify that. Fortunately that silliness is new in HEAD. pg_get_replication_slots() had a cosmetic violation of the rule, in that it only assumed it's safe to call namecpy() while holding a spinlock. Still, that's a hazard waiting to bite somebody, and there were some other cosmetic coding-rule violations in the same function, so clean it up. I back-patched this as far as v10; the code exists before that but it looks different, and this didn't seem important enough to adapt the patch further back. Discussion: https://postgr.es/m/20200602.161518.1399689010416646074.horikyota.ntt@gmail.com
-
Bruce Momjian authored
Use "guc-enable-groupingsets-hash-disk". Reported-by: TAKATSUKA Haruka Discussion: https://postgr.es/m/16468-7939d39f1786516c@postgresql.org Backpatch-through: master
-
Fujii Masao authored
The group of wal_init_zero and wal_recycle is WAL_SETTINGS in guc.c, but previously their documents were located in "Replication"/"Sending Servers" section. This commit moves them to the proper section "Write Ahead Log"/"Settings". Back-patch to v12 where wal_init_zero and wal_recycle parameters were introduced. Author: Fujii Masao Discussion: https://postgr.es/m/b5190ab4-a169-6a42-0e49-aed0807c8976@oss.nttdata.com
-
- 02 Jun, 2020 2 commits
-
-
Fujii Masao authored
Previously UpdateSpillStats() called elog(DEBUG2) while holding the spinlock even though the local variables that the elog() accesses don't need to be protected by the lock. Since spinlocks are intended for very short-term locks, they should not be used when calling elog(DEBUG2). So this commit moves that elog() out of spinlock period. Author: Kyotaro Horiguchi Reviewed-by: Amit Kapila and Fujii Masao Discussion: https://postgr.es/m/20200602.161518.1399689010416646074.horikyota.ntt@gmail.com
-
Amit Kapila authored
Reported-by: Sawada Masahiko Author: Sawada Masahiko, Amit Kapila Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CA+fd4k4vNg7dRO5ECHdtQXXf1=Q4M98pfLW0dU7BKD8h79pkqA@mail.gmail.com
-
- 01 Jun, 2020 4 commits
-
-
Andrew Dunstan authored
The recipe was previously given in comments in the module's test script, but now we have an explicit recipe in the Makefile. The now redundant comments in the script are removed. This recipe shouldn't be needed in normal use, as the certificate and key are in git and don't need to be regenerated. Discussion: https://postgr.es/m/ae8f21fc-95cb-c98a-f241-1936133f466f@2ndQuadrant.com
-
Peter Eisentraut authored
-
Michael Paquier authored
This issue has been present since the introduction of this code as of a3519a2f from 2002, and has been found by buildfarm member prion that uses RELCACHE_FORCE_RELEASE via the tests introduced recently in e786be5f. Discussion: https://postgr.es/m/20200601022055.GB4121@paquier.xyz Backpatch-through: 9.5
-
Michael Paquier authored
A relation that has no storage initializes rd_tableam to NULL, which caused those two functions to crash because of a pointer dereference. Note that in 11 and older versions, this has always failed with a confusing error "could not open file". These two functions are used by the Postgres ODBC driver, which requires them only when connecting to a backend strictly older than 8.1. When connected to 8.2 or a newer version, the driver uses a RETURNING clause instead whose support has been added in 8.2, so it should be possible to just remove both functions in the future. This is left as an issue to address later. While on it, add more regression tests for those functions as we never really had coverage for them, and for aggregates of TIDs. Reported-by: Jaime Casanova, via sqlsmith Author: Michael Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/CAJGNTeO93u-5APMga6WH41eTZ3Uee9f3s8dCpA-GSSqNs1b=Ug@mail.gmail.com Backpatch-through: 12
-
- 31 May, 2020 3 commits
-
-
Andrew Dunstan authored
Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me.
-
Tomas Vondra authored
Commit 1f39bce0 added disk-based hash aggregation, which may spill incoming tuples to disk. It however did not request projection to make the tuples as narrow as possible, which may mean having to spill much more data than necessary (increasing I/O, pushing other stuff from page cache, etc.). This adds CP_SMALL_TLIST in places that may use hash aggregation - we do that only for AGG_HASHED. It's unnecessary for AGG_SORTED, because that either uses explicit Sort (which already does projection) or pre-sorted input (which does not need spilling to disk). Author: Tomas Vondra Reviewed-by: Jeff Davis Discussion: https://postgr.es/m/20200519151202.u2p2gpiawoaznsv2%40development
-
Michael Paquier authored
The documentation of REINDEX includes a complete description of CONCURRENTLY and its advantages as well as its disadvantages, but reindexdb was not really clear about all that. From discussion with Tom Lane, based on a report from Andrey Klychkov. Discussion: https://postgr.es/m/1590486572.205117372@f500.i.mail.ru Backpatch-through: 12
-
- 29 May, 2020 1 commit
-
-
Fujii Masao authored
This commit updates the "Viewing Statistics" section more like the existing catalogs chapter. - Change its layout so that an introductory paragrap is put above the table for each statistics view. Previously the explanations were below the tables. - Separate each view to different section and add index terms for them. Author: Fujii Masao Reviewed-by: Tom Lane Discussion: https://postgr.es/m/6f8a482c-b3fa-4ed9-21c3-6d222a2cb87d@oss.nttdata.com
-
- 28 May, 2020 7 commits
-
-
Andres Freund authored
LLVM has removed this header, in the branch that will become llvm 11. But as it turns out we didn't actually need it, so just remove it. Author: Jesse Zhang <sbjesse@gmail.com> Discussion: https://postgr.es/m/CAGf+fX7bvtP0YXMu7pOsu_NwhxW6dArTkxb=jt7M2-UJkyJ_3g@mail.gmail.com Backpatch: 11, where JIT support using llvm was introduced.
-
Joe Conway authored
Two of the members of rconn were left uninitialized. When dblink_open() is called without an outer transaction it handles the initialization for us, but with an outer transaction it does not. Arrange for initialization in all cases. Backpatch to all supported versions. Reported-by: Alexander Lakhin Discussion: https://www.postgresql.org/message-id/flat/9bd0744f-5f04-c778-c5b3-809efe9c30c7%40joeconway.com#c545909a41664991aca60c4d70a10ce7
-
Joe Conway authored
The repeat() function loops for potentially a long time without ever checking for interrupts. This prevents, for example, a query cancel from interrupting until the work is all done. Fix by inserting a CHECK_FOR_INTERRUPTS() into the loop. Backpatch to all supported versions. Discussion: https://www.postgresql.org/message-id/flat/8692553c-7fe8-17d9-cbc1-7cddb758f4c6%40joeconway.com
-
Heikki Linnakangas authored
ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE was used in an ereport with the same message but different errdetail a few lines earlier, so use that here as well. Backpatch-through: 11
-
Heikki Linnakangas authored
The same comment was copied to a few different places, with the same typo. Backpatch down to v11, where this typo was introduced.
-
Michael Paquier authored
segment_open and segment_close were mentioned with incorrect names. Discussion: https://postgr.es/m/20200525234944.GA1573@paquier.xyz
-
Michael Paquier authored
The default unit for max_slot_wal_keep_size is megabytes. While on it, also change temp_file_limit to use a more consistent wording. Reported-by: Jeff Janes, Fujii Masao Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/CAMkU=1wWZhhjpwRFKJ9waQGxxROeC0P6UqPvb90fAaGz7dhoHA@mail.gmail.com
-
- 27 May, 2020 1 commit
-
-
Peter Eisentraut authored
This is not handled uniformly throughout the code, but at least nearby code can be consistent.
-
- 26 May, 2020 5 commits
-
-
Jeff Davis authored
Disk-based HashAgg relies on writing to multiple tapes concurrently. Avoid fragmentation of the tapes' blocks by preallocating many blocks for a tape at once. No file operations are performed during preallocation; only the block numbers are reserved. Reviewed-by: Tomas Vondra Discussion: https://postgr.es/m/20200519151202.u2p2gpiawoaznsv2%40development
-
Peter Eisentraut authored
Make the wording of new libpq messages more similar to existing messages in the backend.
-
Peter Eisentraut authored
This was done for all scanners in 42116736 but not added to the new one.
-
Bruce Momjian authored
Reported-by: Daniel Gustafsson Discussion: https://postgr.es/m/54F7560D-498A-4E51-BAA4-17D4AAB2AA57@yesql.se Backpatch-through: master
-
Bruce Momjian authored
These were missed when these were added to pg_hba.conf in PG 12; updates docs and pg_hba.conf.sample. Reported-by: Arthur Nascimento Bug: 16380 Discussion: https://postgr.es/m/20200421182736.GG19613@momjian.us Backpatch-through: 12
-
- 25 May, 2020 3 commits
-
-
Noah Misch authored
The stmt_len changes do not affect behavior. LimitPath has no other support functions, so that part changes only debugging output.
-
Noah Misch authored
The target failed, tested $PATH binaries, or tested a stale temporary installation. Commit c66b438d missed this. Back-patch to 9.5 (all supported versions).
-
Michael Paquier authored
pg_shmem_allocations was in the wrong position with pg_stats. Author: Ian Barwick Discussion: https://postgr.es/m/de7279d4-7ea0-037f-d7d2-1161682339db@2ndquadrant.com
-
- 23 May, 2020 1 commit
-
-
Michael Paquier authored
The following commands have been missing calls to object access hooks InvokeObjectPost{Create|Alter}Hook normally applied to all commands: - ALTER RULE RENAME TO - ALTER USER MAPPING - CREATE ACCESS METHOD - CREATE STATISTICS Thanks also to Robert Haas for the discussion. Author: Mark Dilger Reviewed-by: Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/435CD295-F409-44E0-91EC-DF32C7AFCD76@enterprisedb.com
-
- 22 May, 2020 7 commits
-
-
Alvaro Herrera authored
They were introduced in 898e5e32; backpatch to 12.
-
Fujii Masao authored
Explain that the followings are tracked only when track_io_timing GUC is enabled. - blk_read_time and blk_write_time in pg_stat_database - time spent reading and writing data file blocks in EXPLAIN output with BUFFERS option Whther track_io_timing is enabled affects also blk_read_time and blk_write_time in pg_stat_statements, but which was already documented. Author: Atsushi Torikoshi Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CACZ0uYHo_NwbxpLH76OGF-O=13tkR0ZM0zeyGEhZ+JEXZVRyCA@mail.gmail.com
-
Peter Eisentraut authored
Probably copied from nearby calls where it is necessary. But this one also casts away constness, so it was doubly annoying.
-
Etsuro Fujita authored
The previous indentation of optimizer functions was unclear; adjust the indentation dashes so that a deeper level of indentation indicates that the outer optimizer function calls the inner one. Author: Richard Guo, with additional change by me Reviewed-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/CAMbWs4-U-ogzpchGsP2BBMufCss1hktm%2B%2BeTJK_dUC196pw0cQ%40mail.gmail.com
-
Bruce Momjian authored
Reported-by: Erwin Brandstetter Discussion: https://postgr.es/m/CAGHENJ4X626ZfYhondXSP4sQgC5zDtsp_LNg1QaD+U7vfgYXQQ@mail.gmail.com Backpatch-through: head
-
Bruce Momjian authored
Reported-by: Erwin Brandstetter Discussion: https://postgr.es/m/CAGHENJ4X626ZfYhondXSP4sQgC5zDtsp_LNg1QaD+U7vfgYXQQ@mail.gmail.com Backpatch-through: head
-
Bruce Momjian authored
Reported-by: yigong hu Discussion: https://postgr.es/m/CAOxFffcourucFqSk+tZA13ErS3XRYkDy6EeaPff4AvHGiEEuug@mail.gmail.com Backpatch-through: 9.5
-
- 21 May, 2020 1 commit
-
-
Bruce Momjian authored
Discussion: https://postgr.es/m/2304.1586532634@sss.pgh.pa.us Backpatch-through: 9.5
-