diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index d79cc83..19190c8 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -3606,7 +3606,7 @@ FROM pg_stat_activity;
         A log entry is made for each temporary file when it is deleted.
         A value of zero logs all temporary file information, while positive
         values log only files whose size is greater than or equal to
-        the specified number of bytes.  The
+        the specified number of kilobytes.  The
         default setting is <literal>-1</>, which disables such logging.
         Only superusers can change this setting.
        </para>
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 244e35e..1d2eeec 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1062,7 +1062,7 @@ FileClose(File file)
 		{
 			if (stat(vfdP->fileName, &filestats) == 0)
 			{
-				if (filestats.st_size >= log_temp_files)
+				if ((filestats.st_size / 1024) >= log_temp_files)
 					ereport(LOG,
 							(errmsg("temporary file: path \"%s\", size %lu",
 									vfdP->fileName,
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index fd006f5..652b0cd 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2061,7 +2061,7 @@ static struct config_int ConfigureNamesInt[] =
 
 	{
 		{"log_temp_files", PGC_SUSET, LOGGING_WHAT,
-			gettext_noop("Log the use of temporary files larger than this number of bytes."),
+			gettext_noop("Log the use of temporary files larger than this number of kilobytes."),
 			gettext_noop("Zero logs all files. The default is -1 (turning this feature off)."),
 			GUC_UNIT_KB
 		},
