Re: long transactions / backend memory usage - Mailing list pgsql-general

From Tom Lane
Subject Re: long transactions / backend memory usage
Date
Msg-id 621.1448559821@sss.pgh.pa.us
Whole thread Raw
In response to long transactions / backend memory usage  (krichy@tvnetwork.hu)
List pgsql-general
krichy@tvnetwork.hu writes:
> We have run into a case where we run a long transaction, and during the
> transaction the backend process's memory usage is growing constantly.
> [ test program just inserts and immediately deletes rows ]

I see a leakage of about 40 bytes per cycle in this example, arising from
the need to track a "combo cid" for each deleted row.  This is the price
we pay for combining insertion and deletion CIDs into one field on disk.
The memory will be reclaimed at end of transaction ... so the short answer
is close out your transaction occasionally.  Extremely long transactions
like this will cause you headaches in a number of other ways too, like
inability to reclaim disk space.

            regards, tom lane


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: long transactions / backend memory usage
Next
From: Jerry Sievers
Date:
Subject: Re: Postgresql Dump Question