1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Patch reverted because of random buildfarm failures:

---------------------------------------------------------------------------

Delay write of pg_stats file to once every five minutes, during
shutdown, or when requested by a backend:

It changes so the file is only written once every 5 minutes (changeable
of course, I just picked something) instead of once every half second.
It's still written when the stats collector shuts down, just as before.
And it is now also written on backend request. A backend requests a
rewrite by simply sending a special stats message. It operates on the
assumption that the backends aren't actually going to read the
statistics file very often, compared to how frequent it's written today.

Magnus Hagander
This commit is contained in:
Bruce Momjian
2006-05-30 02:35:39 +00:00
parent 63cb35c41c
commit e8ea69e3fa
2 changed files with 14 additions and 121 deletions

View File

@ -5,7 +5,7 @@
*
* Copyright (c) 2001-2006, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.45 2006/05/19 19:08:26 alvherre Exp $
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.46 2006/05/30 02:35:39 momjian Exp $
* ----------
*/
#ifndef PGSTAT_H
@ -32,8 +32,7 @@ typedef enum StatMsgType
PGSTAT_MTYPE_RESETCOUNTER,
PGSTAT_MTYPE_AUTOVAC_START,
PGSTAT_MTYPE_VACUUM,
PGSTAT_MTYPE_ANALYZE,
PGSTAT_MTYPE_REWRITE
PGSTAT_MTYPE_ANALYZE
} StatMsgType;
/* ----------
@ -108,15 +107,6 @@ typedef struct PgStat_MsgDummy
char m_dummy[512];
} PgStat_MsgDummy;
/* ----------
* PgStat_MsgRewrite Sent by backends to cause a rewrite of the stats file
* ----------
*/
typedef struct Pgstat_MsgRewrite
{
PgStat_MsgHdr m_hdr;
} PgStat_MsgRewrite;
/* ----------
* PgStat_MsgBestart Sent by the backend on startup
* ----------