pgsql: Fix inconsistency in determining the timestamp of the db statfil

2020-09-11 Thread Amit Kapila
Fix inconsistency in determining the timestamp of the db statfile. We use the timestamp of the global statfile if we are not able to determine it for a particular database in case the entry for that database doesn't exist. However, we were using it even when the statfile is corrupt. As there is n

pgsql: Remove unused function declaration in logicalproto.h.

2020-09-11 Thread Amit Kapila
Remove unused function declaration in logicalproto.h. In the passing, fix a typo in pgoutput.c. Reported-by: Tomas Vondra Author: Tomas Vondra Reviewed-by: Dilip Kumar Discussion: https://postgr.es/m/20200909084353.pncuclpbwlr7vylh@development Branch -- master Details --- https://git.po

pgsql: logtape.c: do not preallocate for tapes when sorting

2020-09-11 Thread Jeff Davis
logtape.c: do not preallocate for tapes when sorting The preallocation logic is only useful for HashAgg, so disable it when sorting. Also, adjust an out-of-date comment. Reviewed-by: Peter Geoghegan Discussion: https://postgr.es/m/[email protected]

pgsql: logtape.c: do not preallocate for tapes when sorting

2020-09-11 Thread Jeff Davis
logtape.c: do not preallocate for tapes when sorting The preallocation logic is only useful for HashAgg, so disable it when sorting. Also, adjust an out-of-date comment. Reviewed-by: Peter Geoghegan Discussion: https://postgr.es/m/[email protected]

pgsql: Accept SIGQUIT during error recovery in auxiliary processes.

2020-09-11 Thread Tom Lane
Accept SIGQUIT during error recovery in auxiliary processes. The bgwriter, checkpointer, walwriter, and walreceiver processes claimed to allow SIGQUIT "at all times". In reality SIGQUIT would get re-blocked during error recovery, because we didn't update the actual signal mask immediately, so sig

pgsql: psql: Display stats target of extended statistics

2020-09-11 Thread Alvaro Herrera
psql: Display stats target of extended statistics The stats target can be set since commit d06215d03, but wasn't shown by psql. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Reviewed-by: Georgios Kokolatos Reviewed-by: Tatsuro Yamada Branch -- R

pgsql: psql: Display stats target of extended statistics

2020-09-11 Thread Alvaro Herrera
psql: Display stats target of extended statistics The stats target can be set since commit d06215d03, but wasn't shown by psql. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Reviewed-by: Georgios Kokolatos Reviewed-by: Tatsuro Yamada Branch -- m

pgsql: Log a message when resorting to SIGKILL during shutdown/crash re

2020-09-11 Thread Tom Lane
Log a message when resorting to SIGKILL during shutdown/crash recovery. Currently, no useful trace is left in the logs when the postmaster is forced to use SIGKILL to shut down children that failed to respond to SIGQUIT. Some questions were raised about how often that scenario happens in the buil

pgsql: Don't run atexit callbacks during signal exits from ProcessStart

2020-09-11 Thread Tom Lane
Don't run atexit callbacks during signal exits from ProcessStartupPacket. Although 58c6feccf fixed the case for SIGQUIT, we were still calling proc_exit() from signal handlers for SIGTERM and timeout failures in ProcessStartupPacket. Fortunately, at the point where that code runs, we haven't yet

pgsql: Update copyright year

2020-09-11 Thread Alvaro Herrera
Update copyright year Thinko in 40b3e2c201af. Reported-by: "Wang, Shenhao" Discussion: https://postgr.es/m/ed98706b82694b57a8c0d339a10732aa@G08CNEXMBPEKD06.g08.fujitsu.local Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6dcec8fe13b41b0773e9122168a1b53f3e

pgsql: Update copyright year

2020-09-11 Thread Alvaro Herrera
Update copyright year Thinko in 40b3e2c201af. Reported-by: "Wang, Shenhao" Discussion: https://postgr.es/m/ed98706b82694b57a8c0d339a10732aa@G08CNEXMBPEKD06.g08.fujitsu.local Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6a68a233cef86d81b35fb4c1c21a094768875af2