pgsql: Add some checkpoint/restartpoint status to ps display

2020-12-13 Thread Michael Paquier
Add some checkpoint/restartpoint status to ps display

This is done for end-of-recovery and shutdown checkpoints/restartpoints
(end-of-recovery restartpoints don't exist) rather than all types of
checkpoints, in cases where it may not be possible to rely on
pg_stat_activity to get a status from the startup or checkpointer
processes.

For example, at the end of a crash recovery, this is useful to know if a
checkpoint is running in the startup process, while previously the ps
display may only show some information about "recovering" something,
that can be confusing while a checkpoint runs.

Author: Justin Pryzby
Reviewed-by: Nathan Bossart, Kirk Jamison, Fujii Masao, Michael Paquier
Discussion: https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/df9274adf3096feafbbde2562311c8ab80405267

Modified Files
--
src/backend/access/transam/xlog.c | 45 +++
1 file changed, 45 insertions(+)



pgsql: Improve some code around cryptohash functions

2020-12-13 Thread Michael Paquier
Improve some code around cryptohash functions

This adjusts some code related to recent changes for cryptohash
functions:
- Add a variable in md5.h to track down the size of a computed result,
moved from pgcrypto.  Note that pg_md5_hash() assumed a result of this
size already.
- Call explicit_bzero() on the hashed data when freeing the context for
fallback implementations.  For MD5, particularly, it would be annoying
to leave some non-zeroed data around.
- Clean up some code related to recent changes of uuid-ossp.  .gitignore
still included md5.c and a comment was incorrect.

Discussion: https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/9b584953e7bf91e342af87ef44606acd6206cd1c

Modified Files
--
contrib/pgcrypto/internal.c   |  4 
contrib/uuid-ossp/.gitignore  |  1 -
contrib/uuid-ossp/uuid-ossp.c |  4 ++--
src/common/cryptohash.c   | 20 
src/common/md5_common.c   |  2 +-
src/include/common/md5.h  |  4 
6 files changed, 27 insertions(+), 8 deletions(-)