Cory Tucker <cory.tucker@xxxxxxxxx> writes: >> Can you extract a self-contained test case that uses unreasonable amounts >> of memory? It seems from this trace that the wheels are coming off in >> at least two places, but identifying exactly where is impossible without >> more info. > I will try to make a test case. The data in this table is PII so I can't > just export it, but I might be able to replicate using fake data. My guess is that the specific data is not critical at all, just the table properties. You might need to take care that the same EXPLAIN plan is selected, which might require fake data that has roughly similar properties as to number of distinct values and so on. regards, tom lane