From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | krichy(at)tvnetwork(dot)hu |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: long transactions / backend memory usage |
Date: | 2015-11-26 17:43:41 |
Message-ID: | 621.1448559821@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
krichy(at)tvnetwork(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jerry Sievers | 2015-11-26 18:07:06 | Re: Postgresql Dump Question |
Previous Message | Adrian Klaver | 2015-11-26 16:47:26 | Re: long transactions / backend memory usage |