Skip to content

Commit 20be0d4

Browse files
committed
Make log_temp_files based on kB, and revert docs & comments to match.
Per extensive discussion on pgsql-hackers. We are deliberately not back-patching this even though the behavior of 8.3 and 8.4 is unquestionably broken, for fear of breaking existing users of this parameter. This incompatibility should be release-noted.
1 parent 458474d commit 20be0d4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

doc/src/sgml/config.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.292 2010/07/06 21:14:25 rhaas Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.293 2010/07/06 22:55:26 rhaas Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -3607,7 +3607,7 @@ FROM pg_stat_activity;
36073607
A log entry is made for each temporary file when it is deleted.
36083608
A value of zero logs all temporary file information, while positive
36093609
values log only files whose size is greater than or equal to
3610-
the specified number of bytes. The
3610+
the specified number of kilobytes. The
36113611
default setting is <literal>-1</>, which disables such logging.
36123612
Only superusers can change this setting.
36133613
</para>

src/backend/storage/file/fd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.156 2010/02/26 02:00:59 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.157 2010/07/06 22:55:26 rhaas Exp $
1111
*
1212
* NOTES:
1313
*
@@ -1062,7 +1062,7 @@ FileClose(File file)
10621062
{
10631063
if (stat(vfdP->fileName, &filestats) == 0)
10641064
{
1065-
if (filestats.st_size >= log_temp_files)
1065+
if ((filestats.st_size / 1024) >= log_temp_files)
10661066
ereport(LOG,
10671067
(errmsg("temporary file: path \"%s\", size %lu",
10681068
vfdP->fileName,

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.560 2010/07/06 19:18:58 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.561 2010/07/06 22:55:26 rhaas Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -2061,7 +2061,7 @@ static struct config_int ConfigureNamesInt[] =
20612061

20622062
{
20632063
{"log_temp_files", PGC_SUSET, LOGGING_WHAT,
2064-
gettext_noop("Log the use of temporary files larger than this number of bytes."),
2064+
gettext_noop("Log the use of temporary files larger than this number of kilobytes."),
20652065
gettext_noop("Zero logs all files. The default is -1 (turning this feature off)."),
20662066
GUC_UNIT_KB
20672067
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy