- 01 May, 2020 2 commits
-
-
Peter Eisentraut authored
-
Michael Paquier authored
The pg_rewind docs currently assert that the state of the target's data directory after rewind is equivalent to the source's data directory. This clarifies the documentation to describe that the base state is further back in time and that the target's data directory will include the current state from the source of any copied blocks since the point of divergence. This commit also improves the section "How It Works": - Describe the update of the pg_control file. - Reorganize the list of files and directories ignored during the rewind. Author: James Coleman Discussion: https://postgr.es/m/CAAaqYe-sgqCos7MXF4XiY8rUPy3CEmaCY9EvfhX-DhPhPBF5_A@mail.gmail.com
-
- 30 Apr, 2020 8 commits
-
-
Peter Geoghegan authored
Add test coverage for the nbtutils.c routines concerned with IndexScans that have native ScalarArrayOpExpr quals. The ScalarArrayOpExpr specialized mark and restore routines, and the "find extreme element" routine now have some test coverage. These functions are probably infrequently exercised by real world queries, so having some coverage seems like a good idea. The mark and restore routines were originally added by a bugfix that came several weeks after the first stable release of Postgres 9.2 (see commit 70bc5833).
-
Peter Geoghegan authored
XLogRegisterBufData() does not copy data pointed to by caller's pointer argument. Oversight in commit 0d861bbb. Author: Peter Eisentraut Reported-By: Peter Eisentraut Discussion: https://postgr.es/m/21800dbe-a13e-22f7-d423-b81db9d249f5@2ndquadrant.com
-
Tom Lane authored
Minor editorial changes in the first two sections; larger ones in the JSON section.
-
Peter Eisentraut authored
see also a00c53b0
-
Peter Eisentraut authored
-
Michael Paquier authored
The libpq parameters ssl{max|min}protocolversion are renamed to use underscores, to become ssl_{max|min}_protocol_version. The related environment variables still use the names introduced in commit ff8ca5fa that added the feature. Per complaint from Peter Eisentraut (this was also mentioned by me in the original patch review but the issue got discarded). Author: Daniel Gustafsson Reviewed-by: Peter Eisentraut, Michael Paquier Discussion: https://postgr.es/m/b319e449-318d-e691-4997-1327e166fcc4@2ndquadrant.com
-
Tom Lane authored
Make the markup a bit less ad-hoc. A function-table cell now contains several <para> units, and we label the ones that contain function signatures with role="func_signature". The CSS or FO stylesheets then key off of that to decide how to set the indentation. A very useful win from this approach is that we can have more than one signature entry per table cell, simplifying the documentation of closely-related operators and functions. This patch mostly just replaces the markup in the tables I converted so far. But I did alter a couple of places where multiple signatures were helpful. Discussion: https://postgr.es/m/5561.1587922854@sss.pgh.pa.us
-
Peter Geoghegan authored
_bt_getbuf() cannot return an invalid buffer. Oversight in commit 2ed5b87f.
-
- 29 Apr, 2020 4 commits
-
-
Michael Paquier authored
Commit 79dfa8af has introduced a check to catch when the minimum protocol version was set higher than the maximum version, however an error was getting generated when both bounds are set even if they are able to work, causing a backend to not use a new SSL context but keep the old one. Author: Daniel Gustafsson Discussion: https://postgr.es/m/14BFD060-8C9D-43B4-897D-D5D9AA6FC92B@yesql.se
-
Alvaro Herrera authored
Checkpointer uses its MyLatch to wake up when a checkpoint request is received. But before commit c6550776 the latch was not used for anything else, so the code could just go to sleep after each loop without rechecking the sleeping condition. That commit added a separate ResetLatch in its code path[1], which can cause a checkpoint to go unnoticed for potentially a long time. Fix by skipping sleep if any checkpoint flags are set. Also add a test to verify this; authored by Kyotaro Horiguchi. [1] CreateCheckPoint -> InvalidateObsoleteReplicationSlots -> ConditionVariableTimeSleep Report and diagnosis by Kyotaro Horiguchi. Co-authored-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200408.141956.891237856186513376.horikyota.ntt@gmail.com
-
Peter Eisentraut authored
from 927474ce
-
Alvaro Herrera authored
Lack of these checks could cause visible misbehavior, including assertion failures. This was missed in commit c6550776, whereby restart_lsn becomes invalid when the size limit is exceeded. Also reword some existing error messages, and add errdetail(), so that the reported errors all match in spirit. Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200408.093710.447591748588426656.horikyota.ntt@gmail.com
-
- 28 Apr, 2020 3 commits
-
-
Peter Geoghegan authored
Make sure that we have test coverage of the posting list tuple path within _bt_xid_horizon(). Per off-list complaint from Andres Freund.
-
Peter Eisentraut authored
Some translatable strings have been moved to scanner_yyerror(), so we need to add that, too.
-
Alexander Korotkov authored
pg_statio_all_tables view appears to have a wrong grouping. As the result numbers of toast index blocks read and hit were multiplied to the number of table indexes. This commit fixes the view definition. Backpatching this appears difficult. We don't have a mechanism to patch a system catalog of existing instances in minor upgrade. We can write a release notes instruction to do this manually. But per discussion this is probably not so critical bug for doing such an intrusive fix. Reported-by: Andrei Zubkov Discussion: https://postgr.es/m/CAPpHfdtMYkkNudLMG9G0dxX_B%3Dn5sfKzOyxxrvWYtSicaGW0Lw%40mail.gmail.com
-
- 27 Apr, 2020 6 commits
-
-
Michael Paquier authored
This part of the test was included originally in 4e87c483, but got reverted as of f9c1b8db because of timing issues in the test, where, after more analysis, we found that the standbys may not have recovered from the archives all the segments needed by the test. This stabilizes the test by making sure that standbys replay up to the position returned by pg_switch_wal(), meaning that all segments are recovered before the manual checkpoint that tests WAL segment recycling and its interactions with archive status files. Author: Jehan-Guillaume de Rorthais Reviewed-by: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/20200424034248.GL33034@paquier.xyz
-
Robert Haas authored
When pg_basebackup -R is used, we inject standby.signal into the tar file for the main tablespace. The proper thing to do is to pad each file injected into the tar file out to a 512-byte boundary by appending nulls, but here the file is of length 0 and we add 511 zero bytes. Since 0 is already a multiple of 512, we should not add any zero bytes. Do that instead. Patch by me, reviewed by Tom Lane. Discussion: http://postgr.es/m/CA+TgmobWbfReO9-XFk8urR1K4wTNwqoHx_v56t7=T8KaiEoKNw@mail.gmail.com
-
Tom Lane authored
Queries such as '!(foo<->bar)' failed to find matching rows when implemented as a GiST or GIN index search. That's because of failing to handle phrase searches as tri-valued when considering a query without any position information for the target tsvector. We can only say that the phrase operator might match, not that it does match; and therefore its NOT also might match. The previous coding incorrectly inverted the approximate phrase result to decide that there was certainly no match. To fix, we need to make TS_phrase_execute return a real ternary result, and then bubble that up accurately in TS_execute. As long as we have to do that anyway, we can simplify the baroque things TS_phrase_execute was doing internally to manage tri-valued searching with only a bool as explicit result. For now, I left the externally-visible result of TS_execute as a plain bool. There do not appear to be any outside callers that need to distinguish a three-way result, given that they passed in a flag saying what to do in the absence of position data. This might need to change someday, but we wouldn't want to back-patch such a change. Although tsginidx.c has its own TS_execute_ternary implementation for use at upper index levels, that sadly managed to get this case wrong as well :-(. Fixing it is a lot easier fortunately. Per bug #16388 from Charles Offenbacher. Back-patch to 9.6 where phrase search was introduced. Discussion: https://postgr.es/m/16388-98cffba38d0b7e6e@postgresql.org
-
Tom Lane authored
We need to select symbol font explicitly, or it comes out misaligned. Alexander Lakhin, Tom Lane Discussion: https://postgr.es/m/10598.1587928415@sss.pgh.pa.us
-
Peter Eisentraut authored
-
Michael Paquier authored
Author: Justin Pryzby Discussion: https://postgr.es/m/20200408165653.GF2228@telsasoft.com
-
- 26 Apr, 2020 3 commits
-
-
Tom Lane authored
It wasn't totally clear about punctuation other than what's specified being ignored. Pavel Borisov and Tom Lane Discussion: https://postgr.es/m/CALT9ZEFsBdsogVjG40Z4KfM1Um=wj1FE9hJ00GK3oVfzz0sFNg@mail.gmail.com
-
Peter Eisentraut authored
from 30364019
-
Noah Misch authored
Buildfarm member chipmunk has failed twice due to taking >30s, and twenty-four runs of other members have used >5s. The test is new in v13, so no back-patch.
-
- 25 Apr, 2020 5 commits
-
-
Peter Geoghegan authored
Avoid accessing the leaf page's top parent tuple without a buffer lock held during the second phase of nbtree page deletion. The old approach was safe, though only because VACUUM never drops its buffer pin (and because only VACUUM itself can modify a half-dead page). Even still, it seems like a good idea to be strict here. Tighten things up by copying the top parent page's block number to a local variable before releasing the buffer lock on the leaf page -- not after. This is a follow-up to commit fa7ff642, which fixed a similar issue in the first phase of nbtree page deletion. Update some related comments in passing. Discussion: https://postgr.es/m/CAH2-WzkLgyN3zBvRZ1pkNJThC=xi_0gpWRUb_45eexLH1+k2_Q@mail.gmail.com
-
Peter Geoghegan authored
Avoid accessing the deletion target page's special area during nbtree page deletion at a point where there is no buffer lock held. This issue was detected by a patch that extends Valgrind's memcheck tool to mark nbtree pages that are unsafe to access (due to not having a buffer lock or buffer pin) as NOACCESS. We do hold a buffer pin at this point, and only access the special area, so the old approach was safe. Even still, it seems like a good idea to tighten up the rules in this area. There is no reason to not simply insist on always holding a buffer lock (not just a pin) when accessing nbtree pages. Update some related comments in passing. Discussion: https://postgr.es/m/CAH2-WzkLgyN3zBvRZ1pkNJThC=xi_0gpWRUb_45eexLH1+k2_Q@mail.gmail.com
-
Noah Misch authored
Before sleeping, WalSndWaitForWal() sends a keepalive if MyWalSnd->write < sentPtr. When the latest physical LSN yields no logical replication messages (a common case), that keepalive elicits a reply. Processing the reply updates pg_stat_replication.replay_lsn. WalSndLoop() lacks that; when WalSndLoop() slept, replay_lsn advancement could stall until wal_receiver_status_interval elapsed. This sometimes stalled src/test/subscription/t/001_rep_changes.pl for up to 10s. Reviewed by Fujii Masao and Michael Paquier. Discussion: https://postgr.es/m/20200418070142.GA1075445@rfd.leadboat.com
-
Noah Misch authored
This reverts commit 42168581. It caused idle physical walsenders to busy-wait, as reported by Fujii Masao. Discussion: https://postgr.es/m/20200417054146.GA1061007@rfd.leadboat.com
-
Andrew Gierth authored
CreateRole() was passing a Value node, not a RoleSpec node, for the newly-created role name when adding the role as a member of existing roles for the IN ROLE syntax. This mistake went unnoticed because the node in question is used only for error messages and is not accessed on non-error paths. In older pg versions (such as 9.5 where this was found), this results in an "unexpected node type" error in place of the real error. That node type check was removed at some point, after which the code would accidentally fail to fail on 64-bit platforms (on which accessing the Value node as if it were a RoleSpec would be mostly harmless) or give an "unexpected role type" error on 32-bit platforms. Fix the code to pass the correct node type, and add an lfirst_node assertion just in case. Per report on irc from user m1chelangelo. Backpatch all the way, because this error has been around for a long time.
-
- 24 Apr, 2020 9 commits
-
-
Tom Lane authored
Thanks to Juan José Santamaría Flecha. Discussion: https://postgr.es/m/5752.1587740484@sss.pgh.pa.us
-
Tom Lane authored
Sticking this comment at the end of the last line was a bad idea: it's not particularly readable, and it tempts pgindent to mess with line breaks within the comment, which in turn reveals that win32tzlist.pl's clean_displayname() does the wrong thing to clean up such line breaks. While that's not hard to fix, there's basically no excuse for this arrangement to begin with, especially since it makes the table layout needlessly vary across back branches with different pgindent rules. Let's just put the comment inside the braces, instead. This commit just moves and reformats the comments, and updates win32tzlist.pl to match; there's no actual data change. Per odd-looking results from Juan José Santamaría Flecha. Back-patch, since the point is to make win32_tzmap[] look the same in all supported branches again. Discussion: https://postgr.es/m/5752.1587740484@sss.pgh.pa.us
-
Tom Lane authored
This includes the usual amount of editorial cleanup, such as correcting wrong or less-helpful-than-they-could-be examples. I moved the two tsvector-updating triggers into "9.28 Trigger Functions", which seems like a better home for them. (I believe that section didn't exist when this text was originally written.)
-
Bruce Momjian authored
e.g., REL_12_STABLE
-
Robert Haas authored
Per report from Andres Freund, who also says that this fix works for him. Discussion: http://postgr.es/m/20200405193118.alprgmozhxcfabkw@alap3.anarazel.de
-
Tom Lane authored
Commit 32ff2691 introduced use of rank() into the triggers view to calculate the spec-mandated action_order column. As written, this prevents query constraints on the table-name column from being pushed below the window aggregate step. That's bad for performance of this typical usage pattern, since the view now has to be evaluated for all tables not just the one(s) the user wants to see. It's also the cause of some recent buildfarm failures, in which trying to evaluate the view rows for triggers in process of being dropped resulted in "cache lookup failed for function NNN" errors. Those rows aren't of interest to the test script doing the query, but the filter that would eliminate them is being applied too late. None of this happened before the rank() call was there, so it's a regression compared to v10 and before. We can improve matters by changing the rank() call so that instead of partitioning by OIDs, it partitions by nspname and relname, casting those to sql_identifier so that they match the respective view output columns exactly. The planner has enough intelligence to know that constraints on partitioning columns are safe to push down, so this eliminates the performance problem and the regression test failure risk. We could make the other partitioning columns match view outputs as well, but it'd be more complicated and the performance benefits are questionable. Side note: as this stands, the planner will push down constraints on event_object_table and trigger_schema, but not on event_object_schema, because it checks for ressortgroupref matches not expression equivalence. That might be worth improving someday, but it's not necessary to fix the immediate concern. Back-patch to v11 where the rank() call was added. Ordinarily we'd not change information_schema in released branches, but the test failure has been seen in v12 and presumably could happen in v11 as well, so we need to do this to keep the buildfarm happy. The change is harmless so far as users are concerned. Some might wish to apply it to existing installations if performance of this type of query is of concern, but those who don't are no worse off. I bumped catversion in HEAD as a pro forma matter (there's no catalog incompatibility that would really require a re-initdb). Obviously that can't be done in the back branches. Discussion: https://postgr.es/m/5891.1587594470@sss.pgh.pa.us
-
Tom Lane authored
DST law changes in Morocco and the Canadian Yukon. Historical corrections for Shanghai. The America/Godthab zone is renamed to America/Nuuk to reflect current English usage; however, the old name remains available as a compatibility link.
-
Peter Eisentraut authored
-
Michael Paquier authored
The test is proving to have timing issues when looking at archive status files on standbys after crash recovery, while other parts of the test rely on pg_stat_archiver as a wait point to make sure that a given state of the archiving is reached. The coverage is not heavily impacted by the removal those extra tests. Per reports from several buildfarm animals, like crake, piculet, culicidae and francolin. Discussion: https://postgr.es/m/20200424005929.GK33034@paquier.xyz Backpatch-through: 9.5
-