In the logs, after I got the OOM, I noticed I had several thousand lines similar to the following: CachedPlan: 7168 total in 3 blocks; 2472 free (0 chunks); 4696 used CachedPlan: 7168 total in 3 blocks; 3200 free (0 chunks); 3968 used CachedPlan: 1024 total in 1 blocks; 64 free (0 chunks); 960 used CachedPlanSource: 3072 total in 2 blocks; 1288 free (1 chunks); 1784 used CachedPlanQuery: 1024 total in 1 blocks; 112 free (0 chunks); 912 used SPI Plan: 1024 total in 1 blocks; 832 free (0 chunks); 192 used I am not exactly sure what this means, but could it be that the CachedPlans are somehow not being freed and are accumulating until the OOM? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Postgresql-9-2-OOM-tp5726013p5726014.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general