- 09 May, 2020 6 commits
-
-
Tom Lane authored
I made up a very crude hack to compare the docs with reality (as embodied in the system catalogs) ... and indeed they don't match everywhere. Missing oid columns, wrong data types, wrong "references" links, columns listed in the wrong order. None of this seems quite important enough to back-patch.
-
Tom Lane authored
Somehow we'd never noticed this oversight, even though it means that such basic columns as pg_proc.proargtypes were not being validated by the oidjoins test. Correct the query and update the test script with the newly-found dependencies.
-
Tomas Vondra authored
Incremental sort always processes at least one full group group before switching to prefix groups, so it's enough to check just the number of full groups. There was no risk of division by zero due to the extra condition, but it made the code harder to understand. Reported-by: Ranier Vilela Discussion: https://postgr.es/m/CAEudQAp+7qoS92-4V1vLChpdY3vEkLCbf+gye6P-4cirE-0z0A@mail.gmail.com
-
Tomas Vondra authored
ExecReScanIncrementalSort was resetting bounded=false, which means the optimization would be disabled on all rescans. This happens because ExecSetTupleBound is called before the rescan, not after it. Author: James Coleman Reviewed-by: Tomas Vondra Discussion: https://postgr.es/m/20200414065336.GI1492@paquier.xyz
-
Tomas Vondra authored
The executor flags were not handled entirely correctly, although the bugs were mostly harmless and it was mostly comment inaccuracy. We don't need to strip any of the flags for child nodes. Incremental sort does not support backward scans of mark/restore, so MARK/BACKWARDS flags should not be possible. So we simply ensure this using an assert, and we don't bother removing them when initializing the child node. With REWIND it's a bit less clear - incremental sort does not support REWIND, but there is no way to signal this - it's legal to just ignore the flag. We however continue passing the flag to child nodes, because they might be useful to leverage that. Reported-by: Michael Paquier Author: James Coleman Reviewed-by: Tomas Vondra Discussion: https://postgr.es/m/20200414065336.GI1492@paquier.xyz
-
Tom Lane authored
We seem to have forgotten to do this in the v12 cycle, so add it as a task in the RELEASE_CHANGES list, in hopes we won't forget again. While here, fix findoidjoins.c so that it actually works in the new dispensation where OID is a regular column, and change it to only consider system relations (this avoids being fooled by the OID column in the brintest test table). Also tweak the largeobject test so that the somewhat-recently-added manual creation of a LO with an OID in the system range doesn't fool findoidjoins.c. For the moment I just made that use an unused OID, but we might have to find a more robust solution someday.
-
- 08 May, 2020 8 commits
-
-
Alvaro Herrera authored
Almost all error messages already include file name where relevant, but this one had been overlooked. Repair. Backpatch to 9.5. Author: Euler Taveira <euler.taveira@2ndquadrant.com> Discussion: https://postgr.es/m/CAH503wA_VOrcKL_43p9atRejCDYmOZ8MzfK9S6TJrQqBqNeAXA@mail.gmail.comReviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
-
Alvaro Herrera authored
Code review for 0dc8ead4, prompted by a bug closed by 91c40548. XLogReader's system for opening and closing segments had gotten too complicated, with callbacks being passed at both the XLogReaderAllocate level (read_page) as well as at the WALRead level (segment_open). This was confusing and hard to follow, so restructure things so that these callbacks are passed together at XLogReaderAllocate time, and add another callback to the set (segment_close) to make it a coherent whole. Also, ensure XLogReaderState is an argument to all the callbacks, so that they can grab at the ->private data if necessary. Document the whole arrangement more clearly. Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Discussion: https://postgr.es/m/20200422175754.GA19858@alvherre.pgsql
-
Peter Eisentraut authored
*in* database, *in* cluster, *on* server; and some related fixes
-
Peter Eisentraut authored
There were a few different ways to line-wrap the error messages. Make them all the same, and use placeholders for the actual program names, to save translation work.
-
Peter Eisentraut authored
Several combinations of generated columns and inheritance in CREATE TABLE were not handled correctly. Specifically: - Disallow a child column specifying a generation expression if the parent column is a generated column. The child column definition must be unadorned and the parent column's generation expression will be copied. - Prohibit a child column of a generated parent column specifying default values or identity. - Allow a child column of a not-generated parent column specifying itself as a generated column. This previously did not work, but it was possible to arrive at the state via other means (involving ALTER TABLE), so it seems sensible to support it. Add tests for each case. Also add documentation about the rules involving generated columns and inheritance. Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us https://www.postgresql.org/message-id/flat/2678bad1-048f-519a-ef24-b12962f41807%40enterprisedb.com https://www.postgresql.org/message-id/flat/CAJvUf_u4h0DxkCMCeEKAWCuzGUTnDP-G5iVmSwxLQSXn0_FWNQ%40mail.gmail.com
-
Peter Eisentraut authored
When creating a new index, the attstorage setting of the table column is copied to regular (non-expression) index columns. But a later ALTER TABLE ... SET STORAGE is not propagated to indexes, thus creating an inconsistent and undumpable state. Discussion: https://www.postgresql.org/message-id/flat/9765d72b-37c0-06f5-e349-2a580aafd989%402ndquadrant.com
-
Amit Kapila authored
Commit 6e654546 avoids locking bufmgr partitions to make pg_buffercache less disruptive on production systems but forgot to update the docs. Reported-by: Sawada Masahiko Author: Sawada Masahiko Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/CA+fd4k6sD8oeP1qJbFAor=rCpYckU9DsywHiYx3x5Hz5Z8Ua_w@mail.gmail.com
-
Fujii Masao authored
TimelineHistoryRead and TimelineHistoryWrite wait events are reported during waiting for a read and write of a timeline history file, respectively. However, previously, TimelineHistoryRead wait event was not reported while readTimeLineHistory() was reading a timeline history file. Also TimelineHistoryWrite was not reported while writeTimeLineHistory() was writing one line with the details of the timeline split, at the end. This commit fixes these issues. Back-patch to v10 where wait events for a timeline history file was added. Author: Masahiro Ikeda Reviewed-by: Michael Paquier, Fujii Masao Discussion: https://postgr.es/m/d11b0c910b63684424e06772eb844ab5@oss.nttdata.com
-
- 07 May, 2020 6 commits
-
-
Peter Geoghegan authored
Factor out code common to _bt_lock_branch_parent() and _bt_pagedel() into a new utility function. This new function is used to check that the left sibling of a deletion target page does not have the INCOMPLETE_SPLIT page flag set. If it is set then deletion is unsafe; there won't be a usable pivot tuple (with a downlink) in the parent page that points to the deletion target page. The page deletion algorithm is not prepared to deal with that. Also restructure an existing, related utility function that checks if the right sibling of the target page has the ISHALFDEAD page flag set. This organization highlights the symmetry between the two cases. The goal is to make the design of page deletion clearer. Both functions involve a sibling page with a flag that indicates that there was an interrupted operation (a page split or a page deletion) that resulted in a page pointed to by sibling pages, but not pointed to in the parent. And, both functions indicate if page deletion is unsafe due to the absence of a particular downlink in the parent page.
-
Tom Lane authored
checkcondition_str() failed to report multiple matches for a prefix pattern correctly: it would dutifully merge the match positions, but then after exiting that loop, if the last prefix-matching word had had no suitable positions, it would report there were no matches. The upshot would be failing to recognize a match that the query should match. It looks like you need all of these conditions to see the bug: * a phrase search (else we don't ask for match position details) * a prefix search item (else we don't get to this code) * a weight restriction (else checkclass_str won't fail) Noted while investigating a problem report from Pavel Borisov, though this is distinct from the issue he was on about. Back-patch to 9.6 where phrase search was added.
-
Tom Lane authored
This converts the contrib documentation to the new style, and mops up a couple of function tables that were outside chapter 9 in the main docs. A few contrib modules choose not to present their functions in the standard tabular format. There might be room to rethink those decisions now that the standard format is more friendly to verbose descriptions. But I have not undertaken to do that here; I just converted existing tables.
-
Bruce Momjian authored
Reported-by: Amit Langote
-
Bruce Momjian authored
-
Bruce Momjian authored
This merges three partition publication items into two.
-
- 06 May, 2020 6 commits
-
-
Bruce Momjian authored
Reported-by: Andrey M. Borodin Discussion: https://postgr.es/m/D49B37B1-E2B9-4F67-8C6C-5CFD4015E8C5@yandex-team.ru
-
Bruce Momjian authored
Reported-by: Fabien COELHO Discussion: https://postgr.es/m/alpine.DEB.2.22.394.2005051811320.2183756@pseudo
-
Alvaro Herrera authored
We were acquiring object locks then deleting objects one by one, instead of acquiring all object locks first, ignoring those that did not exist, and then deleting all objects together. The latter is the correct protocol to use, and what this commits changes to code to do. Failing to follow that leads to "cache lookup failed for relation XYZ" error reports when DROP OWNED runs concurrently with other DDL -- for example, a session termination that removes some temp tables. Author: Álvaro Herrera Reported-by: Mithun Chicklore Yogendra (Mithun CY) Reviewed-by: Ahsan Hadi, Tom Lane Discussion: https://postgr.es/m/CADq3xVZTbzK4ZLKq+dn_vB4QafXXbmMgDP3trY-GuLnib2Ai1w@mail.gmail.com
-
Tom Lane authored
I concluded that we really just ought to force all tables in PDF output to default to "left" alignment (instead of "justify"); that is what the HTML toolchain does and that's what most people have been designing the tables to look good with. There are few if any places where "justify" produces better-looking output, and there are many where it looks horrible. So change stylesheet-fo.xsl to make that true. Also tweak column widths in a few more tables to make them look better and avoid "exceed the available area" warnings. This commit fixes basically everything that can be fixed through that approach. The remaining tables that give warnings either are scheduled for redesign as per recent discussions, or need a fundamental rethink because they Just Don't Work in a narrow view.
-
Michael Paquier authored
Attempting to use an installation path of Python that includes spaces caused the MSVC builds to fail. This fixes the issue by using the same quoting method as ad7595b8 for OpenSSL. Author: Victor Wagner Discussion: https://postgr.es/m/20200430150608.6dc6b8c4@antares.wagner.home Backpatch-through: 9.5
-
- 05 May, 2020 14 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Peter Geoghegan authored
Oversight in commit bc3087b6.
-
Peter Geoghegan authored
Oversight in commit d114cc53.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Tom Lane authored
Moving this setting into the main configuration file was ill-considered, perhaps, because that typically causes it to be set before timezone_abbreviations has been set. Which in turn means that zone abbreviations don't work, only full zone names. We could imagine hacking things so that such cases do work, but the stability of the hack would be questionable, and the value isn't really that high. Instead just document that you should use a numeric zone offset or a full zone name. Per bug #16404 from Reijo Suhonen. Back-patch to v12 where this was changed. Discussion: https://postgr.es/m/16404-4603a99603fbd04c@postgresql.org
-
Bruce Momjian authored
Reported-by: Justin Pryzby
-
Bruce Momjian authored
Reported-by: Justin Pryzby
-
Tom Lane authored
Both the backend and libpq leaked buffers containing encrypted data to be transmitted, so that the process size would grow roughly as the total amount of data sent. There were also far-less-critical leaks of the same sort in GSSAPI session establishment. Oversight in commit b0b39f72, which I failed to notice while reviewing the code in 2c0cdc81. Per complaint from pmc@citylink. Back-patch to v12 where this code was introduced. Discussion: https://postgr.es/m/20200504115649.GA77072@gate.oper.dinoex.org
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
Minor corrections from individuals.
-