| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Tiger Technologies <lists(at)tigertech(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Postmaster uses Large Amounts of Swap |
| Date: | 2001-02-10 02:37:13 |
| Message-ID: | 24260.981772633@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Tiger Technologies <lists(at)tigertech(dot)com> writes:
> Today I noticed that the swap used on my system was > 120M, and it seems
> to be coming from the postmaster:
> USER %CPU %MEM VSZ RSS STAT START TIME COMMAND
> postgres 0.0 0.0 1668 0 SW 2000 0:00 [pg_ctl]
> postgres 0.1 1.1 135840 1528 S 2000 134:56 /usr/bin/postmaster -i
> That's not normal, is it?
> It's been running for 73 days, with fairly light load:
Do you use password authentication?
We just recently noticed that the postmaster leaks a few dozen bytes of
memory when processing a password auth request. Attached is a patch
against 7.0.*.
regards, tom lane
*** src/backend/libpq/crypt.c.orig Sat Jul 17 16:17:01 1999
--- src/backend/libpq/crypt.c Wed Feb 7 18:40:01 2001
***************
*** 59,64 ****
--- 59,65 ----
bufsize = strlen(pwdfilename) + strlen(CRYPT_PWD_RELOAD_SUFX) + 1;
rpfnam = (char *) palloc(bufsize);
snprintf(rpfnam, bufsize, "%s%s", pwdfilename, CRYPT_PWD_RELOAD_SUFX);
+ pfree(pwdfilename);
return rpfnam;
}
***************
*** 79,84 ****
--- 80,87 ----
pwdfile = AllocateFile(filename, "rb");
#endif
+ pfree(filename);
+
return pwdfile;
}
***************
*** 131,136 ****
--- 134,140 ----
filename = crypt_getpwdreloadfilename();
result = unlink(filename);
+ pfree(filename);
/*
* We want to delete the flag file before reading the contents of the
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-02-10 04:18:37 | Re: ODBC with Visio |
| Previous Message | Doug McNaught | 2001-02-10 01:57:13 | Re: Re: Re: PostgreSQL over NFS? |