Re: danger of stats_temp_directory = /dev/shm - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: danger of stats_temp_directory = /dev/shm
Date
Msg-id 20130819215947.GH9264@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: danger of stats_temp_directory = /dev/shm  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: danger of stats_temp_directory = /dev/shm  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: danger of stats_temp_directory = /dev/shm  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> > Here's the second attachment.
> 
> This looks good except that it can't tell "db_123.statfoo" isn't a match.
> The scan limit/buffer size needs to be greater than the longest string
> you care about, not only equal to.  I think strcmp not strncmp would be
> better coding, too.  Please fix that and commit -- I think this part
> is pretty noncontroversial.

Pushed with those fixes, thanks.  I noticed we also needed to match
files global.stat and global.tmp.  Also I added another conversion to
the sscanf pattern, to ignore files named "db_1234.tmp.foo" and such
(i.e.  stuff after whitespace).

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Feature Request on Extensions
Next
From: Jeff Janes
Date:
Subject: Re: StrategyGetBuffer optimization, take 2