Re: pgsql: Split xlog.c into xlog.c and xlogrecovery.c.

2022-02-16 Thread Heikki Linnakangas
There are some segfaults in the buildfarm because of this, eg: Program terminated with signal 11, Segmentation fault. Error while reading shared library symbols: Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so] #0 memcpy (dst0=Variable "d

pgsql: Reject trailing junk after numeric literals

2022-02-16 Thread Peter Eisentraut
Reject trailing junk after numeric literals After this, the PostgreSQL lexers no longer accept numeric literals with trailing non-digits, such as 123abc, which would be scanned as two tokens: 123 and abc. This is undocumented and surprising, and it might also interfere with some extended numeric

pgsql: Fix read beyond buffer bug introduced by the split xlog.c patch.

2022-02-16 Thread Heikki Linnakangas
Fix read beyond buffer bug introduced by the split xlog.c patch. FinishWalRecovery() copied the valid part of the last WAL block into a palloc'd buffer, and the code in StartupXLOG() copied it to the WAL buffer. But the memcpy in StartupXLOG() copied a full 8kB block, not just the valid part, i.e.

pgsql: Add missing TYPEALIGN macros

2022-02-16 Thread John Naylor
Add missing TYPEALIGN macros A couple call sites still had hard-coded characters. Amul Sul Discussion: https://www.postgresql.org/message-id/CAAJ_b94Y35MWB3PJoCbc_O-_Q4%2B-9DHKhWtAwboEyx8wm4mqcA%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/01a

Re: pgsql: Remove IS_AF_UNIX macro

2022-02-16 Thread Peter Eisentraut
On 15.02.22 16:41, Tom Lane wrote: Peter Eisentraut writes: Remove IS_AF_UNIX macro The AF_UNIX macro was being used unprotected by HAVE_UNIX_SOCKETS, apparently since 2008. I hadn't looked closely at this patch, but are you referring to this bit in ip.h? #ifdef HAVE_UNIX_SOCKETS #define

Re: pgsql: Remove IS_AF_UNIX macro

2022-02-16 Thread Tom Lane
Peter Eisentraut writes: > On 15.02.22 16:41, Tom Lane wrote: >> I hadn't looked closely at this patch, but are you referring to >> this bit in ip.h? > In src/backend/utils/adt/pgstatfuncs.c there is a use of AF_UNIX that > has been there unprotected by any #ifdef since about 2008. Oh, I see it

pgsql: Fix bogus log message when starting from a cleanly shut down sta

2022-02-16 Thread Heikki Linnakangas
Fix bogus log message when starting from a cleanly shut down state. In commit 70e81861fa to split xlog.c, I moved the startup code that updates the state in the control file and prints out the "database system was not properly shut down" message to the log, but I accidentally removed the "if (InRe

pgsql: Remove all traces of tuplestore_donestoring() in the C code

2022-02-16 Thread Michael Paquier
Remove all traces of tuplestore_donestoring() in the C code This routine is a no-op since dd04e95 from 2003, with a macro kept around for compatibility purposes. This has led to the same code patterns being copy-pasted around for no effect, sometimes in confusing ways like in pg_logical_slot_get_

pgsql: Avoid VACUUM reltuples distortion.

2022-02-16 Thread Peter Geoghegan
Avoid VACUUM reltuples distortion. Add a heuristic that avoids distortion in the pg_class.reltuples estimates used by VACUUM. Without the heuristic, successive manually run VACUUM commands (run against a table that is never modified after initial bulk loading) will scan the same page in each VACU

pgsql: Increase hash_mem_multiplier default to 2.0.

2022-02-16 Thread Peter Geoghegan
Increase hash_mem_multiplier default to 2.0. Double the default setting for hash_mem_multiplier, from 1.0 to 2.0. This setting makes hash-based executor nodes use twice the usual work_mem limit. The PostgreSQL 15 release notes should have a compatibility note about this change. Author: Peter Geo

pgsql: plpython: Reject Python 2 during build configuration.

2022-02-16 Thread Andres Freund
plpython: Reject Python 2 during build configuration. Python 2.7 went EOL 2020-01-01 and the support for Python 2 requires a fair bit of infrastructure. Therefore we are removing Python 2 support in plpython. This patch just rejects Python 2 during configure / mkvcbuild.pl. Future commits will re