public inbox for [email protected]
help / color / mirror / Atom feed[PATCH v54 3/7] Make archiver process an auxiliary process
2+ messages / 2 participants
[nested] [flat]
* [PATCH v54 3/7] Make archiver process an auxiliary process
@ 2021-03-11 09:01 Kyotaro Horiguchi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Kyotaro Horiguchi @ 2021-03-11 09:01 UTC (permalink / raw)
This makes it possible to archiver process uses ipc functions and let
us monitor archiver process status.
---
doc/src/sgml/monitoring.sgml | 1 +
src/backend/access/transam/xlogarchive.c | 4 +-
src/backend/bootstrap/bootstrap.c | 22 ++-
src/backend/postmaster/pgarch.c | 241 +++++++++--------------
src/backend/postmaster/postmaster.c | 81 ++++----
src/backend/storage/ipc/ipci.c | 2 +
src/include/miscadmin.h | 2 +
src/include/postmaster/pgarch.h | 14 +-
src/include/storage/pmsignal.h | 1 -
src/include/storage/proc.h | 8 +-
src/tools/pgindent/typedefs.list | 1 +
11 files changed, 160 insertions(+), 217 deletions(-)
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 1ba813bbb9..a96455bdb2 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -935,6 +935,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<literal>logical replication worker</literal>,
<literal>parallel worker</literal>, <literal>background writer</literal>,
<literal>client backend</literal>, <literal>checkpointer</literal>,
+ <literal>archiver</literal>,
<literal>startup</literal>, <literal>walreceiver</literal>,
<literal>walsender</literal> and <literal>walwriter</literal>.
In addition, background workers registered by extensions may have
diff --git a/src/backend/access/transam/xlogarchive.c b/src/backend/access/transam/xlogarchive.c
index 1c5a4f8b5a..26b023e754 100644
--- a/src/backend/access/transam/xlogarchive.c
+++ b/src/backend/access/transam/xlogarchive.c
@@ -25,11 +25,11 @@
#include "common/archive.h"
#include "miscadmin.h"
#include "postmaster/startup.h"
+#include "postmaster/pgarch.h"
#include "replication/walsender.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/lwlock.h"
-#include "storage/pmsignal.h"
/*
* Attempt to retrieve the specified file from off-line archival storage.
@@ -491,7 +491,7 @@ XLogArchiveNotify(const char *xlog)
/* Notify archiver that it's got something to do */
if (IsUnderPostmaster)
- SendPostmasterSignal(PMSIGNAL_WAKEN_ARCHIVER);
+ PgArchWakeup();
}
/*
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 6f615e6622..41da0c5059 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -317,6 +317,9 @@ AuxiliaryProcessMain(int argc, char *argv[])
case StartupProcess:
MyBackendType = B_STARTUP;
break;
+ case ArchiverProcess:
+ MyBackendType = B_ARCHIVER;
+ break;
case BgWriterProcess:
MyBackendType = B_BG_WRITER;
break;
@@ -437,30 +440,29 @@ AuxiliaryProcessMain(int argc, char *argv[])
proc_exit(1); /* should never return */
case StartupProcess:
- /* don't set signals, startup process has its own agenda */
StartupProcessMain();
- proc_exit(1); /* should never return */
+ proc_exit(1);
+
+ case ArchiverProcess:
+ PgArchiverMain();
+ proc_exit(1);
case BgWriterProcess:
- /* don't set signals, bgwriter has its own agenda */
BackgroundWriterMain();
- proc_exit(1); /* should never return */
+ proc_exit(1);
case CheckpointerProcess:
- /* don't set signals, checkpointer has its own agenda */
CheckpointerMain();
- proc_exit(1); /* should never return */
+ proc_exit(1);
case WalWriterProcess:
- /* don't set signals, walwriter has its own agenda */
InitXLOGAccess();
WalWriterMain();
- proc_exit(1); /* should never return */
+ proc_exit(1);
case WalReceiverProcess:
- /* don't set signals, walreceiver has its own agenda */
WalReceiverMain();
- proc_exit(1); /* should never return */
+ proc_exit(1);
default:
elog(PANIC, "unrecognized process type: %d", (int) MyAuxProcType);
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c
index edec311f12..8e572afea3 100644
--- a/src/backend/postmaster/pgarch.c
+++ b/src/backend/postmaster/pgarch.c
@@ -38,16 +38,14 @@
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
-#include "postmaster/fork_process.h"
#include "postmaster/interrupt.h"
#include "postmaster/pgarch.h"
-#include "postmaster/postmaster.h"
-#include "storage/dsm.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/latch.h"
-#include "storage/pg_shmem.h"
#include "storage/pmsignal.h"
+#include "storage/procsignal.h"
+#include "storage/spin.h"
#include "utils/guc.h"
#include "utils/ps_status.h"
@@ -73,6 +71,12 @@
*/
#define NUM_ORPHAN_CLEANUP_RETRIES 3
+/* Shared memory area for archiver process */
+typedef struct PgArchData
+{
+ int pgprocno; /* pgprocno of archiver process */
+} PgArchData;
+
/* ----------
* Local data
@@ -80,146 +84,79 @@
*/
static time_t last_pgarch_start_time;
static time_t last_sigterm_time = 0;
+static PgArchData *PgArch = NULL;
/*
* Flags set by interrupt handlers for later service in the main loop.
*/
-static volatile sig_atomic_t wakened = false;
static volatile sig_atomic_t ready_to_stop = false;
/* ----------
* Local function forward declarations
* ----------
*/
-#ifdef EXEC_BACKEND
-static pid_t pgarch_forkexec(void);
-#endif
-
-NON_EXEC_STATIC void PgArchiverMain(int argc, char *argv[]) pg_attribute_noreturn();
-static void pgarch_waken(SIGNAL_ARGS);
static void pgarch_waken_stop(SIGNAL_ARGS);
static void pgarch_MainLoop(void);
static void pgarch_ArchiverCopyLoop(void);
static bool pgarch_archiveXlog(char *xlog);
static bool pgarch_readyXlog(char *xlog);
static void pgarch_archiveDone(char *xlog);
+static void pgarch_die(int code, Datum arg);
+/* Report shared memory space needed by PgArchShmemInit */
+Size
+PgArchShmemSize(void)
+{
+ Size size = 0;
-/* ------------------------------------------------------------
- * Public functions called from postmaster follow
- * ------------------------------------------------------------
- */
+ size = add_size(size, sizeof(PgArchData));
+
+ return size;
+}
+
+/* Allocate and initialize archiver-related shared memory */
+void
+PgArchShmemInit(void)
+{
+ bool found;
+
+ PgArch = (PgArchData *)
+ ShmemInitStruct("Archiver Data", PgArchShmemSize(), &found);
+
+ if (!found)
+ {
+ /* First time through, so initialize */
+ MemSet(PgArch, 0, PgArchShmemSize());
+ PgArch->pgprocno = INVALID_PGPROCNO;
+ }
+}
/*
- * pgarch_start
+ * PgArchIsSuppressed
*
- * Called from postmaster at startup or after an existing archiver
- * died. Attempt to fire up a fresh archiver process.
+ * Return true if archiver relaunch is suppressed.
*
- * Returns PID of child process, or 0 if fail.
- *
- * Note: if fail, we will be called again from the postmaster main loop.
+ * This is a safety valve to protect against continuous respawn attempts if the
+ * archiver is dying immediately at launch. Note that since we will retry to
+ * launch the archiver from the postmaster main loop, we will get another
+ * chance later.
*/
-int
-pgarch_start(void)
+bool
+PgArchIsSuppressed(void)
{
- time_t curtime;
- pid_t pgArchPid;
+ time_t curtime = time(NULL);
- /*
- * Do nothing if no archiver needed
- */
- if (!XLogArchivingActive())
- return 0;
+ if ((curtime - last_pgarch_start_time) < PGARCH_RESTART_INTERVAL)
+ return true;
- /*
- * Do nothing if too soon since last archiver start. This is a safety
- * valve to protect against continuous respawn attempts if the archiver is
- * dying immediately at launch. Note that since we will be re-called from
- * the postmaster main loop, we will get another chance later.
- */
- curtime = time(NULL);
- if ((unsigned int) (curtime - last_pgarch_start_time) <
- (unsigned int) PGARCH_RESTART_INTERVAL)
- return 0;
last_pgarch_start_time = curtime;
-
-#ifdef EXEC_BACKEND
- switch ((pgArchPid = pgarch_forkexec()))
-#else
- switch ((pgArchPid = fork_process()))
-#endif
- {
- case -1:
- ereport(LOG,
- (errmsg("could not fork archiver: %m")));
- return 0;
-
-#ifndef EXEC_BACKEND
- case 0:
- /* in postmaster child ... */
- InitPostmasterChild();
-
- /* Close the postmaster's sockets */
- ClosePostmasterPorts(false);
-
- /* Drop our connection to postmaster's shared memory, as well */
- dsm_detach_all();
- PGSharedMemoryDetach();
-
- PgArchiverMain(0, NULL);
- break;
-#endif
-
- default:
- return (int) pgArchPid;
- }
-
- /* shouldn't get here */
- return 0;
-}
-
-/* ------------------------------------------------------------
- * Local functions called by archiver follow
- * ------------------------------------------------------------
- */
-
-
-#ifdef EXEC_BACKEND
-
-/*
- * pgarch_forkexec() -
- *
- * Format up the arglist for, then fork and exec, archive process
- */
-static pid_t
-pgarch_forkexec(void)
-{
- char *av[10];
- int ac = 0;
-
- av[ac++] = "postgres";
-
- av[ac++] = "--forkarch";
-
- av[ac++] = NULL; /* filled in by postmaster_forkexec */
-
- av[ac] = NULL;
- Assert(ac < lengthof(av));
-
- return postmaster_forkexec(ac, av);
+ return false;
}
-#endif /* EXEC_BACKEND */
-/*
- * PgArchiverMain
- *
- * The argc/argv parameters are valid only in EXEC_BACKEND case. However,
- * since we don't use 'em, it hardly matters...
- */
-NON_EXEC_STATIC void
-PgArchiverMain(int argc, char *argv[])
+/* Main entry point for archiver process */
+void
+PgArchiverMain(void)
{
/*
* Ignore all signals usually bound to some action in the postmaster,
@@ -231,33 +168,51 @@ PgArchiverMain(int argc, char *argv[])
/* SIGQUIT handler was already set up by InitPostmasterChild */
pqsignal(SIGALRM, SIG_IGN);
pqsignal(SIGPIPE, SIG_IGN);
- pqsignal(SIGUSR1, pgarch_waken);
+ pqsignal(SIGUSR1, procsignal_sigusr1_handler);
pqsignal(SIGUSR2, pgarch_waken_stop);
+
/* Reset some signals that are accepted by postmaster but not here */
pqsignal(SIGCHLD, SIG_DFL);
+
+ /* Unblock signals (they were blocked when the postmaster forked us) */
PG_SETMASK(&UnBlockSig);
- MyBackendType = B_ARCHIVER;
- init_ps_display(NULL);
+ /* We shouldn't be launched unnecessarily. */
+ Assert(XLogArchivingActive());
+
+ /* Arrange to clean up at archiver exit */
+ on_shmem_exit(pgarch_die, 0);
+
+ /*
+ * Advertise our latch that backends can use to wake us up while we're
+ * sleeping.
+ */
+ PgArch->pgprocno = MyProc->pgprocno;
pgarch_MainLoop();
- exit(0);
+ proc_exit(0);
}
-/* SIGUSR1 signal handler for archiver process */
-static void
-pgarch_waken(SIGNAL_ARGS)
+/*
+ * Wake up the archiver
+ */
+void
+PgArchWakeup(void)
{
- int save_errno = errno;
+ int arch_pgprocno = PgArch->pgprocno;
- /* set flag that there is work to be done */
- wakened = true;
- SetLatch(MyLatch);
-
- errno = save_errno;
+ /*
+ * We don't acquire ProcArrayLock here. It's actually fine because
+ * procLatch isn't ever freed, so we just can potentially set the wrong
+ * process' (or no process') latch. Even in that case the archiver will be
+ * relaunched shortly and will start archiving.
+ */
+ if (arch_pgprocno != INVALID_PGPROCNO)
+ SetLatch(&ProcGlobal->allProcs[arch_pgprocno].procLatch);
}
+
/* SIGUSR2 signal handler for archiver process */
static void
pgarch_waken_stop(SIGNAL_ARGS)
@@ -282,14 +237,6 @@ pgarch_MainLoop(void)
pg_time_t last_copy_time = 0;
bool time_to_stop;
- /*
- * We run the copy loop immediately upon entry, in case there are
- * unarchived files left over from a previous database run (or maybe the
- * archiver died unexpectedly). After that we wait for a signal or
- * timeout before doing more.
- */
- wakened = true;
-
/*
* There shouldn't be anything for the archiver to do except to wait for a
* signal ... however, the archiver exists to protect our data, so she
@@ -328,12 +275,8 @@ pgarch_MainLoop(void)
}
/* Do what we're here for */
- if (wakened || time_to_stop)
- {
- wakened = false;
- pgarch_ArchiverCopyLoop();
- last_copy_time = time(NULL);
- }
+ pgarch_ArchiverCopyLoop();
+ last_copy_time = time(NULL);
/*
* Sleep until a signal is received, or until a poll is forced by
@@ -354,13 +297,9 @@ pgarch_MainLoop(void)
WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH,
timeout * 1000L,
WAIT_EVENT_ARCHIVER_MAIN);
- if (rc & WL_TIMEOUT)
- wakened = true;
if (rc & WL_POSTMASTER_DEATH)
time_to_stop = true;
}
- else
- wakened = true;
}
/*
@@ -744,3 +683,15 @@ pgarch_archiveDone(char *xlog)
StatusFilePath(rlogdone, xlog, ".done");
(void) durable_rename(rlogready, rlogdone, WARNING);
}
+
+
+/*
+ * pgarch_die
+ *
+ * Exit-time cleanup handler
+ */
+static void
+pgarch_die(int code, Datum arg)
+{
+ PgArch->pgprocno = INVALID_PGPROCNO;
+}
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index edab95a19e..4f8e364284 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -443,9 +443,10 @@ static void InitPostmasterDeathWatchHandle(void);
* even during recovery.
*/
#define PgArchStartupAllowed() \
- ((XLogArchivingActive() && pmState == PM_RUN) || \
- (XLogArchivingAlways() && \
- (pmState == PM_RECOVERY || pmState == PM_HOT_STANDBY)))
+ (((XLogArchivingActive() && pmState == PM_RUN) || \
+ (XLogArchivingAlways() && \
+ (pmState == PM_RECOVERY || pmState == PM_HOT_STANDBY))) && \
+ !PgArchIsSuppressed())
#ifdef EXEC_BACKEND
@@ -548,6 +549,7 @@ static void ShmemBackendArrayRemove(Backend *bn);
#endif /* EXEC_BACKEND */
#define StartupDataBase() StartChildProcess(StartupProcess)
+#define StartArchiver() StartChildProcess(ArchiverProcess)
#define StartBackgroundWriter() StartChildProcess(BgWriterProcess)
#define StartCheckpointer() StartChildProcess(CheckpointerProcess)
#define StartWalWriter() StartChildProcess(WalWriterProcess)
@@ -1792,7 +1794,7 @@ ServerLoop(void)
/* If we have lost the archiver, try to start a new one. */
if (PgArchPID == 0 && PgArchStartupAllowed())
- PgArchPID = pgarch_start();
+ PgArchPID = StartArchiver();
/* If we need to signal the autovacuum launcher, do so now */
if (avlauncher_needs_signal)
@@ -3007,7 +3009,7 @@ reaper(SIGNAL_ARGS)
if (!IsBinaryUpgrade && AutoVacuumingActive() && AutoVacPID == 0)
AutoVacPID = StartAutoVacLauncher();
if (PgArchStartupAllowed() && PgArchPID == 0)
- PgArchPID = pgarch_start();
+ PgArchPID = StartArchiver();
if (PgStatPID == 0)
PgStatPID = pgstat_start();
@@ -3142,20 +3144,22 @@ reaper(SIGNAL_ARGS)
}
/*
- * Was it the archiver? If so, just try to start a new one; no need
- * to force reset of the rest of the system. (If fail, we'll try
- * again in future cycles of the main loop.). Unless we were waiting
- * for it to shut down; don't restart it in that case, and
+ * Was it the archiver? If exit status is zero (normal) or one (FATAL
+ * exit), we assume everything is all right just like normal backends
+ * and just try to restart a new one so that we immediately retry
+ * archiving remaining files. (If fail, we'll try again in future
+ * cycles of the postmaster's main loop.) Unless we were waiting for it
+ * to shut down; don't restart it in that case, and
* PostmasterStateMachine() will advance to the next shutdown step.
*/
if (pid == PgArchPID)
{
PgArchPID = 0;
- if (!EXIT_STATUS_0(exitstatus))
- LogChildExit(LOG, _("archiver process"),
- pid, exitstatus);
+ if (!EXIT_STATUS_0(exitstatus) && !EXIT_STATUS_1(exitstatus))
+ HandleChildCrash(pid, exitstatus,
+ _("archiver process"));
if (PgArchStartupAllowed())
- PgArchPID = pgarch_start();
+ PgArchPID = StartArchiver();
continue;
}
@@ -3403,7 +3407,7 @@ CleanupBackend(int pid,
/*
* HandleChildCrash -- cleanup after failed backend, bgwriter, checkpointer,
- * walwriter, autovacuum, or background worker.
+ * walwriter, autovacuum, archiver or background worker.
*
* The objectives here are to clean up our local state about the child
* process, and to signal all other remaining children to quickdie.
@@ -3609,19 +3613,16 @@ HandleChildCrash(int pid, int exitstatus, const char *procname)
signal_child(AutoVacPID, (SendStop ? SIGSTOP : SIGQUIT));
}
- /*
- * Force a power-cycle of the pgarch process too. (This isn't absolutely
- * necessary, but it seems like a good idea for robustness, and it
- * simplifies the state-machine logic in the case where a shutdown request
- * arrives during crash processing.)
- */
- if (PgArchPID != 0 && take_action)
+ /* Take care of the archiver too */
+ if (pid == PgArchPID)
+ PgArchPID = 0;
+ else if (PgArchPID != 0 && take_action)
{
ereport(DEBUG2,
(errmsg_internal("sending %s to process %d",
- "SIGQUIT",
+ (SendStop ? "SIGSTOP" : "SIGQUIT"),
(int) PgArchPID)));
- signal_child(PgArchPID, SIGQUIT);
+ signal_child(PgArchPID, (SendStop ? SIGSTOP : SIGQUIT));
}
/*
@@ -3804,12 +3805,11 @@ PostmasterStateMachine(void)
* (including autovac workers), no bgworkers (including unconnected
* ones), and no walwriter, autovac launcher or bgwriter. If we are
* doing crash recovery or an immediate shutdown then we expect the
- * checkpointer to exit as well, otherwise not. The archiver, stats,
- * and syslogger processes are disregarded since they are not
- * connected to shared memory; we also disregard dead_end children
- * here. Walsenders are also disregarded, they will be terminated
- * later after writing the checkpoint record, like the archiver
- * process.
+ * checkpointer to exit as well, otherwise not. The stats and syslogger
+ * processes are disregarded since they are not connected to shared
+ * memory; we also disregard dead_end children here. Walsenders and
+ * archiver are also disregarded, they will be terminated later after
+ * writing the checkpoint record.
*/
if (CountChildren(BACKEND_TYPE_ALL - BACKEND_TYPE_WALSND) == 0 &&
StartupPID == 0 &&
@@ -3912,6 +3912,7 @@ PostmasterStateMachine(void)
Assert(CheckpointerPID == 0);
Assert(WalWriterPID == 0);
Assert(AutoVacPID == 0);
+ Assert(PgArchPID == 0);
/* syslogger is not considered here */
pmState = PM_NO_CHILDREN;
}
@@ -5037,12 +5038,6 @@ SubPostmasterMain(int argc, char *argv[])
StartBackgroundWorker();
}
- if (strcmp(argv[1], "--forkarch") == 0)
- {
- /* Do not want to attach to shared memory */
-
- PgArchiverMain(argc, argv); /* does not return */
- }
if (strcmp(argv[1], "--forkcol") == 0)
{
/* Do not want to attach to shared memory */
@@ -5140,7 +5135,7 @@ sigusr1_handler(SIGNAL_ARGS)
*/
Assert(PgArchPID == 0);
if (XLogArchivingAlways())
- PgArchPID = pgarch_start();
+ PgArchPID = StartArchiver();
/*
* If we aren't planning to enter hot standby mode later, treat
@@ -5194,16 +5189,6 @@ sigusr1_handler(SIGNAL_ARGS)
if (StartWorkerNeeded || HaveCrashedWorker)
maybe_start_bgworkers();
- if (CheckPostmasterSignal(PMSIGNAL_WAKEN_ARCHIVER) &&
- PgArchPID != 0)
- {
- /*
- * Send SIGUSR1 to archiver process, to wake it up and begin archiving
- * next WAL file.
- */
- signal_child(PgArchPID, SIGUSR1);
- }
-
/* Tell syslogger to rotate logfile if requested */
if (SysLoggerPID != 0)
{
@@ -5445,6 +5430,10 @@ StartChildProcess(AuxProcType type)
ereport(LOG,
(errmsg("could not fork startup process: %m")));
break;
+ case ArchiverProcess:
+ ereport(LOG,
+ (errmsg("could not fork archiver process: %m")));
+ break;
case BgWriterProcess:
ereport(LOG,
(errmsg("could not fork background writer process: %m")));
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index f9bbe97b50..3e4ec53a97 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -144,6 +144,7 @@ CreateSharedMemoryAndSemaphores(void)
size = add_size(size, ReplicationOriginShmemSize());
size = add_size(size, WalSndShmemSize());
size = add_size(size, WalRcvShmemSize());
+ size = add_size(size, PgArchShmemSize());
size = add_size(size, ApplyLauncherShmemSize());
size = add_size(size, SnapMgrShmemSize());
size = add_size(size, BTreeShmemSize());
@@ -258,6 +259,7 @@ CreateSharedMemoryAndSemaphores(void)
ReplicationOriginShmemInit();
WalSndShmemInit();
WalRcvShmemInit();
+ PgArchShmemInit();
ApplyLauncherShmemInit();
/*
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 54693e047a..013850ac28 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -417,6 +417,7 @@ typedef enum
BootstrapProcess,
StartupProcess,
BgWriterProcess,
+ ArchiverProcess,
CheckpointerProcess,
WalWriterProcess,
WalReceiverProcess,
@@ -429,6 +430,7 @@ extern AuxProcType MyAuxProcType;
#define AmBootstrapProcess() (MyAuxProcType == BootstrapProcess)
#define AmStartupProcess() (MyAuxProcType == StartupProcess)
#define AmBackgroundWriterProcess() (MyAuxProcType == BgWriterProcess)
+#define AmArchiverProcess() (MyAuxProcType == ArchiverProcess)
#define AmCheckpointerProcess() (MyAuxProcType == CheckpointerProcess)
#define AmWalWriterProcess() (MyAuxProcType == WalWriterProcess)
#define AmWalReceiverProcess() (MyAuxProcType == WalReceiverProcess)
diff --git a/src/include/postmaster/pgarch.h b/src/include/postmaster/pgarch.h
index d102a21ab7..640692d33e 100644
--- a/src/include/postmaster/pgarch.h
+++ b/src/include/postmaster/pgarch.h
@@ -26,14 +26,10 @@
#define MAX_XFN_CHARS 40
#define VALID_XFN_CHARS "0123456789ABCDEF.history.backup.partial"
-/* ----------
- * Functions called from postmaster
- * ----------
- */
-extern int pgarch_start(void);
-
-#ifdef EXEC_BACKEND
-extern void PgArchiverMain(int argc, char *argv[]) pg_attribute_noreturn();
-#endif
+extern Size PgArchShmemSize(void);
+extern void PgArchShmemInit(void);
+extern bool PgArchIsSuppressed(void);
+extern void PgArchiverMain(void) pg_attribute_noreturn();
+extern void PgArchWakeup(void);
#endif /* _PGARCH_H */
diff --git a/src/include/storage/pmsignal.h b/src/include/storage/pmsignal.h
index dbbed18f61..8ed4d87ae6 100644
--- a/src/include/storage/pmsignal.h
+++ b/src/include/storage/pmsignal.h
@@ -34,7 +34,6 @@ typedef enum
{
PMSIGNAL_RECOVERY_STARTED, /* recovery has started */
PMSIGNAL_BEGIN_HOT_STANDBY, /* begin Hot Standby */
- PMSIGNAL_WAKEN_ARCHIVER, /* send a NOTIFY signal to xlog archiver */
PMSIGNAL_ROTATE_LOGFILE, /* send SIGUSR1 to syslogger to rotate logfile */
PMSIGNAL_START_AUTOVAC_LAUNCHER, /* start an autovacuum launcher */
PMSIGNAL_START_AUTOVAC_WORKER, /* start an autovacuum worker */
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index a777cb64a1..2fd1ff09a7 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -370,11 +370,11 @@ extern PGPROC *PreparedXactProcs;
* We set aside some extra PGPROC structures for auxiliary processes,
* ie things that aren't full-fledged backends but need shmem access.
*
- * Background writer, checkpointer and WAL writer run during normal operation.
- * Startup process and WAL receiver also consume 2 slots, but WAL writer is
- * launched only after startup has exited, so we only need 4 slots.
+ * Background writer, checkpointer, WAL writer and archiver run during normal
+ * operation. Startup process and WAL receiver also consume 2 slots, but WAL
+ * writer is launched only after startup has exited, so we only need 5 slots.
*/
-#define NUM_AUXILIARY_PROCS 4
+#define NUM_AUXILIARY_PROCS 5
/* configurable options */
extern PGDLLIMPORT int DeadlockTimeout;
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 99a34be465..78e852569e 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -1572,6 +1572,7 @@ PGresAttValue
PGresParamDesc
PGresult
PGresult_data
+PgArchData
PHANDLE
PLAINTREE
PLUID_AND_ATTRIBUTES
--
2.27.0
----Next_Part(Fri_Mar_12_13_49_06_2021_682)----
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PostgreSQL 16 release announcement draft
@ 2023-08-26 03:31 Jonathan S. Katz <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan S. Katz @ 2023-08-26 03:31 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: David Rowley <[email protected]>; jian he <[email protected]>; PostgreSQL Hackers <[email protected]>; [email protected]
On 8/24/23 11:19 AM, Alvaro Herrera wrote:
> On 2023-Aug-24, Jonathan S. Katz wrote:
>
>> ### Performance Improvements
>>
>> PostgreSQL 16 improves the performance of existing PostgreSQL functionality
>> through new query planner optimizations. In this latest release, the query
>> planner can parallelize `FULL` and `RIGHT` joins, generate better optimized
>> plans for queries that use aggregate functions (e.g. `count`) with a `DISTINCT`
>> or `ORDER BY` clause, utilize incremental sorts for `SELECT DISTINCT` queries,
>> and optimize window function executions so they execute more efficiently.
>
> "optimize window function executions so that they execute blah" sounds
> redundant and strange. Maybe just "optimize execution of window
> functions" is sufficient? Also, using "e.g." there looks somewhat out
> of place; maybe "(such as `count`)" is a good replacement?
>
>> It also introduces `RIGHT` and `OUTER` "anti-joins", which enable users to
>> identify rows not present in a joined table.
>
> Wait. Are you saying we didn't have those already? Looking at
> release-16.sgml I think this refers to commit 16dc2703c541, which means
> this made them more efficient rather than invented them.
>
>
>> This release includes improvements for bulk loading using `COPY` in both single
>> and concurrent operations, with tests showing up to a 300% performance
>> improvement in some cases. PostgreSQL adds support for load balancing in clients
>
> PostgreSQL 16
>
>> that use `libpq`, and improvements to vacuum strategy that reduce the necessity
>> of full-table freezes. Additionally, PostgreSQL 16 introduces CPU acceleration
>> using `SIMD` in both x86 and ARM architectures, resulting in performance gains
>> when processing ASCII and JSON strings, and performing array and subtransaction
>> searches.
>>
>> ### Logical replication
>>
>> Logical replication lets PostgreSQL users stream data to other PostgreSQL
>
> "L.R. in PostgreSQL lets users"?
>
>> instances or subscribers that can interpret the PostgreSQL logical replication
>> protocol. In PostgreSQL 16, users can perform logical decoding from a standby
>
> s/decoding/replication/ ? (It seems odd to use "decoding" when the
> previous sentence used "replication")
>
>> instance, meaning a standby can publish logical changes to other servers. This
>> provides developers with new workload distribution options – for example, using
>> a standby rather than the busier primary to logically replicate changes to
>> downstream systems.
>>
>> Additionally, there are several performance improvements in PostgreSQL 16 to
>> logical replication. Subscribers can now apply large transactions using parallel
>> workers. For tables that do not have a `PRIMARY KEY`, subscribers can use B-tree
>
> "a primary key", no caps.
>
>> indexes instead of sequential scans to find rows. Under certain conditions,
>> users can also speed up initial table synchronization using the binary format.
>>
>> There are several access control improvements to logical replication in
>> PostgreSQL 16, including the new predefined role pg_create_subscription, which
>> grants users the ability to create a new logical subscription. Finally, this
>> release begins adding support for bidirectional logical replication, introducing
>> functionality to replicate data between two tables from different publishers.
>
> "to create a new logical subscription" -> "to create new logical subscriptions"
>
>> ### Developer Experience
>>
>> PostgreSQL 16 adds more syntax from the SQL/JSON standard, including
>> constructors and predicates such as `JSON_ARRAY()`, `JSON_ARRAYAGG()`, and
>> `IS JSON`. This release also introduces the ability to use underscores for
>> thousands separators (e.g. `5_432_000`) and non-decimal integer literals, such
>> as `0x1538`, `0o12470`, and `0b1010100111000`.
>>
>> Developers using PostgreSQL 16 will also benefit from the addition of multiple
>> commands to `psql` client protocol, including the `\bind` command, which allows
>> users to execute parameterized queries (e.g `SELECT $1 + $2`) then use `\bind`
>> to substitute the variables.
>
> This paragraph sounds a bit suspicious. What do you mean with "multiple
> commands to psql client protocol"? Also, I think "to execute parameterized
> queries" should be "to prepare parameterized queries", and later "then
> use \bind to execute the query substituting the variables".
>
>
>
>> ### Monitoring
>>
>> A key aspect of tuning the performance of database workloads is understanding
>> the impact of your I/O operations on your system. PostgreSQL 16 helps simplify
>> how you can analyze this data with the new pg_stat_io view, which tracks key I/O
>> statistics such as shared_buffer hits and I/O latency.
>
> Hmm, I think what pg_stat_io gives you is data which wasn't available
> previously at all. Maybe do something like "Pg 16 introduces
> pg_stat_io, a new source of key I/O metrics that can be used for more
> fine grained something something".
>
>> Additionally, this release adds a new field to the `pg_stat_all_tables` view
>> that records a timestamp representing when a table or index was last scanned.
>> PostgreSQL also makes auto_explain more readable by logging values passed into
>
> PostgreSQL 16
>
>> parameterized statements, and improves accuracy of pg_stat_activity's
>> normalization algorithm.
>
> I think jian already mentioned that this refers to pg_stat_statement
> query fingerprinting. I know that the query_id also appears in
> pg_stat_activity, but that is much newer, and it's not permanent there
> like in pss. Maybe it should be "of the query fingerprinting algorithm
> used by pg_stat_statement and pg_stat_activity".
>
>> ## Images and Logos
>>
>> Postgres, PostgreSQL, and the Elephant Logo (Slonik) are all registered
>> trademarks of the [PostgreSQL Community Association of Canada](https://www.postgres.ca).
>
> Isn't this just the "PostgreSQL Community Association", no Canada?
Thanks for the feedback. I accepted most of the changes. Please see
revised text here, which also includes the URL substitutions.
Jonathan
September 14, 2023 - The PostgreSQL Global Development Group today announced the
release of PostgreSQL 16, the latest version of the world's most advanced open
source database.
[PostgreSQL 16](https://www.postgresql.org/docs/16/release-16.html) raises its
performance, with notable improvements to query parallelism, bulk data loading,
and logical replication. There are many features in this release for developers
and administrators alike, including more SQL/JSON syntax, new monitoring stats
for your workloads, and greater flexibility in defining access control rules for
management of policies across large fleets.
<HOLD FOR QUOTE>
PostgreSQL, an innovative data management system known for its reliability and
robustness, benefits from over 25 years of open source development from a global
developer community and has become the preferred open source relational database
for organizations of all sizes.
### Performance Improvements
PostgreSQL 16 improves the performance of existing PostgreSQL functionality
through new query planner optimizations. In this latest release, the
[query planner can parallelize](https://www.postgresql.org/docs/16/parallel-query.html)
`FULL` and `RIGHT`
[joins](https://www.postgresql.org/docs/16/queries-table-expressions.html#QUERIES-JOIN),
generate better optimized plans for queries that use
[aggregate functions](https://www.postgresql.org/docs/16/functions-aggregate.html)
with a `DISTINCT` or `ORDER BY` clause, utilize incremental sorts for
[`SELECT DISTINCT`](https://www.postgresql.org/docs/16/queries-select-lists.html#QUERIES-DISTINCT)
queries, and optimize
[window functions](https://www.postgresql.org/docs/16/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS)
so they execute more efficiently. It also improves `RIGHT` and `OUTER`
"anti-joins", which enables users to identify rows not present in a joined
table.
This release includes improvements for bulk loading using
[`COPY`](https://www.postgresql.org/docs/16/sql-copy.html) in both single
and concurrent operations, with tests showing up to a 300% performance
improvement in some cases. PostgreSQL 16 adds support for
[load balancing](https://www.postgresql.org/docs/16/libpq-connect.html#LIBPQ-CONNECT-LOAD-BALANCE-HOSTS)
in clients that use `libpq`, and improvements to vacuum strategy that reduce the
necessity of full-table freezes. Additionally, PostgreSQL 16 introduces CPU
acceleration using `SIMD` in both x86 and ARM architectures, resulting in
performance gains when processing ASCII and JSON strings, and performing array
and subtransaction searches.
### Logical replication
[Logical replication](https://www.postgresql.org/docs/16/logical-replication.html)
lets users stream data to other PostgreSQL instances or subscribers that can
interpret the PostgreSQL logical replication protocol. In PostgreSQL 16, users
can perform logical replication from a standby instance, meaning a standby can
publish logical changes to other servers. This provides developers with new
workload distribution options – for example, using a standby rather than the
busier primary to logically replicate changes to downstream systems.
Additionally, there are several performance improvements in PostgreSQL 16 to
logical replication. Subscribers can now apply large transactions using parallel
workers. For tables that do not have a [primary key](https://www.postgresql.org/docs/16/ddl-constraints.html#DDL-CONSTRAINTS-PRIMARY-KEYS), subscribers can use B-tree
indexes instead of sequential scans to find rows. Under certain conditions,
users can also speed up initial table synchronization using the binary format.
There are several access control improvements to logical replication in
PostgreSQL 16, including the new
[predefined role](https://www.postgresql.org/docs/16/predefined-roles.html)
`pg_create_subscription`, which grants users the ability to create anew logical
subscriptions. Finally, this release begins adding support for bidirectional
logical replication, introducing functionality to replicate data between two
tables from different publishers.
### Developer Experience
PostgreSQL 16 adds more syntax from the
[SQL/JSON](https://www.postgresql.org/docs/16/functions-json.html) standard,
including constructors and predicates such as `JSON_ARRAY()`, `JSON_ARRAYAGG()`,
and `IS JSON`. This release also introduces the ability to use underscores for
thousands separators (e.g. `5_432_000`) and non-decimal integer literals, such
as `0x1538`, `0o12470`, and `0b1010100111000`.
Developers using PostgreSQL 16 also benefit from new commands in `psql`. This
includes
[`\bind`](https://www.postgresql.org/docs/16/app-psql.html#APP-PSQL-META-COMMAND-BIND),
which allows users to prepare parameterized queries and use `\bind` to
substitute the variables (e.g `SELECT $1::int + $2::int \bind 1 2 \g `).
PostgreSQL 16 improves general support for
[text collations](https://www.postgresql.org/docs/16/collation.html), which
provide rules for how text is sorted. PostgreSQL 16 builds with ICU support by
default, determines the default ICU locale from the environment, and allows
users to define custom ICU collation rules.
### Monitoring
A key aspect of tuning the performance of database workloads is understanding
the impact of your I/O operations on your system. PostgreSQL 16 introduces
[`pg_stat_io`](https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEW),
a new source of key I/O metrics for granular analysis of I/O access patterns.
Additionally, this release adds a new field to the
[`pg_stat_all_tables`](https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW)
view that records a timestamp representing when a table or index was last
scanned. PostgreSQL 16 also makes
[`auto_explain`](https://www.postgresql.org/docs/16/auto-explain.html) more
readable by logging values passed into parameterized statements, and improves
the accuracy of the query tracking algorithm used by
[`pg_stat_statements`](https://www.postgresql.org/docs/16/pgstatstatements.html)
and [`pg_stat_activity`](https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW).
### Access Control & Security
PostgreSQL 16 provides finer-grained options for access control and enhances
other security features. The release improves management of
[`pg_hba.conf`](https://www.postgresql.org/docs/16/auth-pg-hba-conf.html) and
[`pg_ident.conf`](https://www.postgresql.org/docs/16/auth-username-maps.html)
files, including allowing regular expression matching for user and database
names and `include` directives for external configuration files.
This release adds several security-oriented client connection parameters,
including require_auth, which allows clients to specify which authentication
parameters they are willing to accept from a server, and
[`sslrootcert="system"`](https://www.postgresql.org/docs/16/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT),
which indicates that PostgreSQL should use the trusted certificate authority
(CA) store provided by the client's operating system. Additionally, the release
adds support for Kerberos credential delegation, allowing extensions such as
[`postgres_fdw`](https://www.postgresql.org/docs/16/postgres-fdw.html) and
[`dblink`](https://www.postgresql.org/docs/16/dblink.html) to use authenticated
credentials to connect to trusted services.
### About PostgreSQL
[PostgreSQL](https://www.postgresql.org) is the world's most advanced open
source database, with a global community of thousands of users, contributors,
companies and organizations. Built on over 35 years of engineering, starting at
the University of California, Berkeley, PostgreSQL has continued with an
unmatched pace of development. PostgreSQL's mature feature set not only matches
top proprietary database systems, but exceeds them in advanced database
features, extensibility, security, and stability.
### Links
* [Download](https://www.postgresql.org/download/)
* [Release Notes](https://www.postgresql.org/docs/16/release-16.html)
* [Press Kit](https://www.postgresql.org/about/press/)
* [Security Page](https://www.postgresql.org/support/security/)
* [Versioning Policy](https://www.postgresql.org/support/versioning/)
* [Follow @postgresql](https://twitter.com/postgresql)
* [Donate](https://www.postgresql.org/about/donate/)
## More About the Features
For explanations of the above features and others, please see the following
resources:
* [Release Notes](https://www.postgresql.org/docs/16/release-16.html)
* [Feature Matrix](https://www.postgresql.org/about/featurematrix/)
## Where to Download
There are several ways you can download PostgreSQL 16, including:
* The [Official Downloads](https://www.postgresql.org/download/) page, with contains installers and tools for [Windows](https://www.postgresql.org/download/windows/), [Linux](https://www.postgresql.org/download/linux/), [macOS](https://www.postgresql.org/download/macosx/), and more.
* [Source Code](https://www.postgresql.org/ftp/source/v16.0)
Other tools and extensions are available on the
[PostgreSQL Extension Network](http://pgxn.org/).
## Documentation
PostgreSQL 16 comes with HTML documentation as well as man pages, and you can also browse the documentation online in both [HTML](https://www.postgresql.org/docs/16/) and [PDF](https://www.postgresql.org/files/documentation/pdf/16/postgresql-16-US.pdf) formats.
## Licence
PostgreSQL uses the [PostgreSQL License](https://www.postgresql.org/about/licence/),
a BSD-like "permissive" license. This
[OSI-certified license](http://www.opensource.org/licenses/postgresql/) is
widely appreciated as flexible and business-friendly, since it does not restrict
the use of PostgreSQL with commercial and proprietary applications. Together
with multi-company support and public ownership of the code, our license makes
PostgreSQL very popular with vendors wanting to embed a database in their own
products without fear of fees, vendor lock-in, or changes in licensing terms.
## Contacts
Website
* [https://www.postgresql.org/](https://www.postgresql.org/)
Email
* [[email protected]](mailto:[email protected])
## Images and Logos
Postgres, PostgreSQL, and the Elephant Logo (Slonik) are all registered
trademarks of the [PostgreSQL Community Association](https://www.postgres.ca).
If you wish to use these marks, you must comply with the [trademark policy](https://www.postgresql.org/about/policies/trademarks/).
## Corporate Support
PostgreSQL enjoys the support of numerous companies, who sponsor developers,
provide hosting resources, and give us financial support. See our
[sponsors](https://www.postgresql.org/about/sponsors/) page for some of these
project supporters.
There is also a large community of
[companies offering PostgreSQL Support](https://www.postgresql.org/support/professional_support/),
from individual consultants to multinational companies.
If you wish to make a financial contribution to the PostgreSQL Global
Development Group or one of the recognized community non-profit organizations,
please visit our [donations](https://www.postgresql.org/about/donate/) page.
Attachments:
[text/plain] release.en.md (10.9K, ../../[email protected]/2-release.en.md)
download | inline:
September 14, 2023 - The PostgreSQL Global Development Group today announced the
release of PostgreSQL 16, the latest version of the world's most advanced open
source database.
[PostgreSQL 16](https://www.postgresql.org/docs/16/release-16.html) raises its
performance, with notable improvements to query parallelism, bulk data loading,
and logical replication. There are many features in this release for developers
and administrators alike, including more SQL/JSON syntax, new monitoring stats
for your workloads, and greater flexibility in defining access control rules for
management of policies across large fleets.
<HOLD FOR QUOTE>
PostgreSQL, an innovative data management system known for its reliability and
robustness, benefits from over 25 years of open source development from a global
developer community and has become the preferred open source relational database
for organizations of all sizes.
### Performance Improvements
PostgreSQL 16 improves the performance of existing PostgreSQL functionality
through new query planner optimizations. In this latest release, the
[query planner can parallelize](https://www.postgresql.org/docs/16/parallel-query.html)
`FULL` and `RIGHT`
[joins](https://www.postgresql.org/docs/16/queries-table-expressions.html#QUERIES-JOIN),
generate better optimized plans for queries that use
[aggregate functions](https://www.postgresql.org/docs/16/functions-aggregate.html)
with a `DISTINCT` or `ORDER BY` clause, utilize incremental sorts for
[`SELECT DISTINCT`](https://www.postgresql.org/docs/16/queries-select-lists.html#QUERIES-DISTINCT)
queries, and optimize
[window functions](https://www.postgresql.org/docs/16/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS)
so they execute more efficiently. It also improves `RIGHT` and `OUTER`
"anti-joins", which enables users to identify rows not present in a joined
table.
This release includes improvements for bulk loading using
[`COPY`](https://www.postgresql.org/docs/16/sql-copy.html) in both single
and concurrent operations, with tests showing up to a 300% performance
improvement in some cases. PostgreSQL 16 adds support for
[load balancing](https://www.postgresql.org/docs/16/libpq-connect.html#LIBPQ-CONNECT-LOAD-BALANCE-HOSTS)
in clients that use `libpq`, and improvements to vacuum strategy that reduce the
necessity of full-table freezes. Additionally, PostgreSQL 16 introduces CPU
acceleration using `SIMD` in both x86 and ARM architectures, resulting in
performance gains when processing ASCII and JSON strings, and performing array
and subtransaction searches.
### Logical replication
[Logical replication](https://www.postgresql.org/docs/16/logical-replication.html)
lets users stream data to other PostgreSQL instances or subscribers that can
interpret the PostgreSQL logical replication protocol. In PostgreSQL 16, users
can perform logical replication from a standby instance, meaning a standby can
publish logical changes to other servers. This provides developers with new
workload distribution options – for example, using a standby rather than the
busier primary to logically replicate changes to downstream systems.
Additionally, there are several performance improvements in PostgreSQL 16 to
logical replication. Subscribers can now apply large transactions using parallel
workers. For tables that do not have a [primary key](https://www.postgresql.org/docs/16/ddl-constraints.html#DDL-CONSTRAINTS-PRIMARY-KEYS), subscribers can use B-tree
indexes instead of sequential scans to find rows. Under certain conditions,
users can also speed up initial table synchronization using the binary format.
There are several access control improvements to logical replication in
PostgreSQL 16, including the new
[predefined role](https://www.postgresql.org/docs/16/predefined-roles.html)
`pg_create_subscription`, which grants users the ability to create anew logical
subscriptions. Finally, this release begins adding support for bidirectional
logical replication, introducing functionality to replicate data between two
tables from different publishers.
### Developer Experience
PostgreSQL 16 adds more syntax from the
[SQL/JSON](https://www.postgresql.org/docs/16/functions-json.html) standard,
including constructors and predicates such as `JSON_ARRAY()`, `JSON_ARRAYAGG()`,
and `IS JSON`. This release also introduces the ability to use underscores for
thousands separators (e.g. `5_432_000`) and non-decimal integer literals, such
as `0x1538`, `0o12470`, and `0b1010100111000`.
Developers using PostgreSQL 16 also benefit from new commands in `psql`. This
includes
[`\bind`](https://www.postgresql.org/docs/16/app-psql.html#APP-PSQL-META-COMMAND-BIND),
which allows users to prepare parameterized queries and use `\bind` to
substitute the variables (e.g `SELECT $1::int + $2::int \bind 1 2 \g `).
PostgreSQL 16 improves general support for
[text collations](https://www.postgresql.org/docs/16/collation.html), which
provide rules for how text is sorted. PostgreSQL 16 builds with ICU support by
default, determines the default ICU locale from the environment, and allows
users to define custom ICU collation rules.
### Monitoring
A key aspect of tuning the performance of database workloads is understanding
the impact of your I/O operations on your system. PostgreSQL 16 introduces
[`pg_stat_io`](https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEW),
a new source of key I/O metrics for granular analysis of I/O access patterns.
Additionally, this release adds a new field to the
[`pg_stat_all_tables`](https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW)
view that records a timestamp representing when a table or index was last
scanned. PostgreSQL 16 also makes
[`auto_explain`](https://www.postgresql.org/docs/16/auto-explain.html) more
readable by logging values passed into parameterized statements, and improves
the accuracy of the query tracking algorithm used by
[`pg_stat_statements`](https://www.postgresql.org/docs/16/pgstatstatements.html)
and [`pg_stat_activity`](https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW).
### Access Control & Security
PostgreSQL 16 provides finer-grained options for access control and enhances
other security features. The release improves management of
[`pg_hba.conf`](https://www.postgresql.org/docs/16/auth-pg-hba-conf.html) and
[`pg_ident.conf`](https://www.postgresql.org/docs/16/auth-username-maps.html)
files, including allowing regular expression matching for user and database
names and `include` directives for external configuration files.
This release adds several security-oriented client connection parameters,
including require_auth, which allows clients to specify which authentication
parameters they are willing to accept from a server, and
[`sslrootcert="system"`](https://www.postgresql.org/docs/16/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT),
which indicates that PostgreSQL should use the trusted certificate authority
(CA) store provided by the client's operating system. Additionally, the release
adds support for Kerberos credential delegation, allowing extensions such as
[`postgres_fdw`](https://www.postgresql.org/docs/16/postgres-fdw.html) and
[`dblink`](https://www.postgresql.org/docs/16/dblink.html) to use authenticated
credentials to connect to trusted services.
### About PostgreSQL
[PostgreSQL](https://www.postgresql.org) is the world's most advanced open
source database, with a global community of thousands of users, contributors,
companies and organizations. Built on over 35 years of engineering, starting at
the University of California, Berkeley, PostgreSQL has continued with an
unmatched pace of development. PostgreSQL's mature feature set not only matches
top proprietary database systems, but exceeds them in advanced database
features, extensibility, security, and stability.
### Links
* [Download](https://www.postgresql.org/download/)
* [Release Notes](https://www.postgresql.org/docs/16/release-16.html)
* [Press Kit](https://www.postgresql.org/about/press/)
* [Security Page](https://www.postgresql.org/support/security/)
* [Versioning Policy](https://www.postgresql.org/support/versioning/)
* [Follow @postgresql](https://twitter.com/postgresql)
* [Donate](https://www.postgresql.org/about/donate/)
## More About the Features
For explanations of the above features and others, please see the following
resources:
* [Release Notes](https://www.postgresql.org/docs/16/release-16.html)
* [Feature Matrix](https://www.postgresql.org/about/featurematrix/)
## Where to Download
There are several ways you can download PostgreSQL 16, including:
* The [Official Downloads](https://www.postgresql.org/download/) page, with contains installers and tools for [Windows](https://www.postgresql.org/download/windows/), [Linux](https://www.postgresql.org/download/linux/), [macOS](https://www.postgresql.org/download/macosx/), and more.
* [Source Code](https://www.postgresql.org/ftp/source/v16.0)
Other tools and extensions are available on the
[PostgreSQL Extension Network](http://pgxn.org/).
## Documentation
PostgreSQL 16 comes with HTML documentation as well as man pages, and you can also browse the documentation online in both [HTML](https://www.postgresql.org/docs/16/) and [PDF](https://www.postgresql.org/files/documentation/pdf/16/postgresql-16-US.pdf) formats.
## Licence
PostgreSQL uses the [PostgreSQL License](https://www.postgresql.org/about/licence/),
a BSD-like "permissive" license. This
[OSI-certified license](http://www.opensource.org/licenses/postgresql/) is
widely appreciated as flexible and business-friendly, since it does not restrict
the use of PostgreSQL with commercial and proprietary applications. Together
with multi-company support and public ownership of the code, our license makes
PostgreSQL very popular with vendors wanting to embed a database in their own
products without fear of fees, vendor lock-in, or changes in licensing terms.
## Contacts
Website
* [https://www.postgresql.org/](https://www.postgresql.org/)
Email
* [[email protected]](mailto:[email protected])
## Images and Logos
Postgres, PostgreSQL, and the Elephant Logo (Slonik) are all registered
trademarks of the [PostgreSQL Community Association](https://www.postgres.ca).
If you wish to use these marks, you must comply with the [trademark policy](https://www.postgresql.org/about/policies/trademarks/).
## Corporate Support
PostgreSQL enjoys the support of numerous companies, who sponsor developers,
provide hosting resources, and give us financial support. See our
[sponsors](https://www.postgresql.org/about/sponsors/) page for some of these
project supporters.
There is also a large community of
[companies offering PostgreSQL Support](https://www.postgresql.org/support/professional_support/),
from individual consultants to multinational companies.
If you wish to make a financial contribution to the PostgreSQL Global
Development Group or one of the recognized community non-profit organizations,
please visit our [donations](https://www.postgresql.org/about/donate/) page.
[application/pgp-signature] OpenPGP_signature (840B, ../../[email protected]/3-OpenPGP_signature)
download
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-08-26 03:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 09:01 [PATCH v54 3/7] Make archiver process an auxiliary process Kyotaro Horiguchi <[email protected]>
2023-08-26 03:31 Re: PostgreSQL 16 release announcement draft Jonathan S. Katz <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox