pgsql: Update obsolete reference in vacuumlazy.c.

2021-11-05 Thread Peter Geoghegan
Update obsolete reference in vacuumlazy.c. Oversight in commit 7ab96cf6. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/02f9fd129432cab565b2a3cb9f3b3a5000dfe540 Modified Files -- src/backend/access/heap/vacuumlazy.c | 2 +- 1 file changed, 1 insertion(+

Re: pgsql: Introduce 'bbstreamer' abstraction to modularize pg_basebackup.

2021-11-05 Thread Peter Geoghegan
On Fri, Nov 5, 2021 at 7:30 AM Robert Haas wrote: > Introduce 'bbstreamer' abstraction to modularize pg_basebackup. I'm seeing a pretty straightforward looking compiler warning following this commit: bbstreamer_file.c:564:24: warning: unused variable ‘mystreamer’ [-Wunused-variable] 564 | bbs

pgsql: First-draft release notes for 14.1.

2021-11-05 Thread Tom Lane
First-draft release notes for 14.1. As usual, the release notes for other branches will be made by cutting these down, but put them up for community review first. Also as usual for a .1 release, there are some entries here that are not really relevant for v14 because they already appeared in 14.0

Re: pgsql: Change ThisTimeLineID from a global variable to a local variable

2021-11-05 Thread Michael Paquier
Hi Robert, On Fri, Nov 05, 2021 at 04:55:52PM +, Robert Haas wrote: > Change ThisTimeLineID from a global variable to a local variable. > > StartupXLOG() still has ThisTimeLineID as a local variable, but the > remaining code in xlog.c now needs to the relevant TimeLineID by some > other means

pgsql: Update obsolete heap pruning comments.

2021-11-05 Thread Peter Geoghegan
Update obsolete heap pruning comments. Add new comments that spell out what VACUUM expects from heap pruning: pruning must never leave behind DEAD tuples that still have tuple storage. This has at least been the case since commit 8523492d, which established the principle that vacuumlazy.c doesn't

pgsql: Change ThisTimeLineID from a global variable to a local variable

2021-11-05 Thread Robert Haas
Change ThisTimeLineID from a global variable to a local variable. StartupXLOG() still has ThisTimeLineID as a local variable, but the remaining code in xlog.c now needs to the relevant TimeLineID by some other means. Mostly, this means that we now pass it as a function parameter to a bunch of func

pgsql: Remove all use of ThisTimeLineID global variable outside of xlog

2021-11-05 Thread Robert Haas
Remove all use of ThisTimeLineID global variable outside of xlog.c All such code deals with this global variable in one of three ways. Sometimes the same functions use it in more than one of these ways at the same time. First, sometimes it's an implicit argument to one or more functions being cal

pgsql: Don't set ThisTimeLineID when there's no reason to do so.

2021-11-05 Thread Robert Haas
Don't set ThisTimeLineID when there's no reason to do so. In slotfuncs.c, pg_replication_slot_advance() needs to determine the LSN up to which the slot should be advanced, but that doesn't require us to update ThisTimeLineID, because none of the code called from here depends on it. If the replicat

Re: pgsql: Add various assertions to heap pruning code.

2021-11-05 Thread Peter Geoghegan
On Thu, Nov 4, 2021 at 11:48 PM Michael Paquier wrote: > This generates some warnings on Windows without asserts: > pruneheap.c(847): warning C4101: 'htup' unreferenced local variable > pruneheap.c(859): warning C4101: 'tolp' unreferenced local variable > > You could move those two variables withi

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Avoid crash in rare case of concurrent DROP

2021-11-05 Thread Alvaro Herrera
Avoid crash in rare case of concurrent DROP When a role being dropped contains is referenced by catalog objects that are concurrently also being dropped, a crash can result while trying to construct the string that describes the objects. Suppress that by ignoring objects whose descriptions are re

pgsql: Document that ALTER TABLE .. TYPE removes statistics

2021-11-05 Thread Alvaro Herrera
Document that ALTER TABLE .. TYPE removes statistics Co-authored-by: Nikolai Berkoff Discussion: https://postgr.es/m/vCc8XnwDmlP4ZnHBQLIVxzD405BiYHVC9qZlhIF7IsfxK0gC9mZ4PUUOH0-3y6kv5p-87-3_ljqT1KvQVAnb8OoWhPU3kcqWn2ZpmxRBCQg=@pm.me Branch -- master Details --- https://git.postgresql.or

pgsql: Pipeline mode disallows multicommand strings

2021-11-05 Thread Alvaro Herrera
Pipeline mode disallows multicommand strings ... so mention that in appropriate places of the libpq docs. Backpatch to 14. Reported-by: RekGRpth Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: Pipeline mode disallows multicommand strings

2021-11-05 Thread Alvaro Herrera
Pipeline mode disallows multicommand strings ... so mention that in appropriate places of the libpq docs. Backpatch to 14. Reported-by: RekGRpth Discussion: https://postgr.es/m/[email protected] Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/comm

Re: pgsql: Report progress of startup operations that take a long time.

2021-11-05 Thread Alvaro Herrera
On 2021-Oct-29, Robert Haas wrote: > On Fri, Oct 29, 2021 at 5:23 PM Alvaro Herrera > wrote: > > I noticed that the docs for this don't mention the default value and how > > can it be changed. I propose something like the attached, where I also > > change the order of things so that the example

pgsql: Document default and changeability of log_startup_progress_inter

2021-11-05 Thread Alvaro Herrera
Document default and changeability of log_startup_progress_interval Review for 9ce346eabf35. Author: Álvaro Herrera Reviewed-by: Robert Haas Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e

pgsql: Introduce 'bbstreamer' abstraction to modularize pg_basebackup.

2021-11-05 Thread Robert Haas
Introduce 'bbstreamer' abstraction to modularize pg_basebackup. pg_basebackup knows how to do quite a few things with a backup that it gets from the server, like just write out the files, or compress them first, or even parse the tar format and inject a modified postgresql.auto.conf file into the

pgsql: Reword doc blurb for vacuumdb --analyze-in-stages

2021-11-05 Thread Alvaro Herrera
Reword doc blurb for vacuumdb --analyze-in-stages Make users aware that using it in a database with existing stats might cause transient problems. Author: Nikolai Berkoff Discussion: https://postgr.es/m/s-kSljtWXMWgMfGTztPTPcS80R8FHdOrBxDTnrQI6GMZbT7au1A4b0fzaSFtKwCI8nwN0MhgPLfVOTvJ7DwTjkip4P3d

pgsql: Introduce 'bbsink' abstraction to modularize base backup code.

2021-11-05 Thread Robert Haas
Introduce 'bbsink' abstraction to modularize base backup code. The base backup code has accumulated a healthy number of new features over the years, but it's becoming increasingly difficult to maintain and further enhance that code because there's no real separation of concerns. For example, the c

pgsql: amcheck: Add additional TOAST pointer checks.

2021-11-05 Thread Robert Haas
amcheck: Add additional TOAST pointer checks. Expand the checks of toasted attributes to complain if the rawsize is overlarge. For compressed attributes, also complain if compression appears to have expanded the attribute or if the compression method is invalid. Mark Dilger, reviewed by Justin P

pgsql: pgcrypto: Remove non-OpenSSL support

2021-11-05 Thread Peter Eisentraut
pgcrypto: Remove non-OpenSSL support pgcrypto had internal implementations of some encryption algorithms, as an alternative to calling out to OpenSSL. These were rarely used, since most production installations are built with OpenSSL. Moreover, maintaining parallel code paths makes the code more