Hi, On Wed, Aug 03, 2022 at 02:32:05PM +0530, Satyamnaidu Gokeda wrote: > > We are getting following error while running this query. As checked You probably forgot to copy the query here. > org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [53400]: ERROR: > temporary file size exceeds temp_file_limit (52428800kB) This error is raised because the query used more than temp_file_limit (see https://www.postgresql.org/docs/current/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-DISK). Your options are to raise that parameter (and maybe increase the underlying disk given the message subject) or find a way to consume less disk in temporary files. It's hard to know without knowing the query and the underlying data, but maybe rewriting the query or splitting it into multiple queries over a temporary table would work.