Automatic backup in windows

2021-08-01 Thread obi reddy
Hello everyone, I want to schedule the automatic backup in windows postgresql platform. I have attached the script, if any changes is required please correct and send back. This is my humble request. Actually I don't know to write the windows script. Otherwise if incase any have the script plea

Re: postgres vacuum memory limits

2021-08-01 Thread Vijaykumar Jain
https://rhaas.blogspot.com/2012/01/linux-memory-reporting.html?m=1 I think this awesome blog will clear a lot of 'understanding of top' output in postgresql context of memory growth.

Re: postgres vacuum memory limits

2021-08-01 Thread Vijaykumar Jain
On Sun, 1 Aug 2021 at 20:04, Vijaykumar Jain < vijaykumarjain.git...@gmail.com> wrote: > > On Sun, 1 Aug 2021 at 10:27, Ayub M wrote: > > > > Hello, when maintenance_work_mem and autovacuum_work_mem are set, my > understanding is that the vacuum and autovacuum sessions should be limited > to use

Re: ERROR: ImportError: No module named 'psutil'

2021-08-01 Thread Tom Lane
Adrian Klaver writes: > In that vein the OP could run: > DO $$ > import sys > plpy.notice(sys.version) > $$ LANGUAGE plpython3u; > in the database to see what plpython3u is actually pointing at? +1 ... looking at sys.path in the same way would also be useful.

Re: ERROR: ImportError: No module named 'psutil'

2021-08-01 Thread Adrian Klaver
On 8/1/21 8:51 AM, Tom Lane wrote: Adrian Klaver writes: Now it's possible that the wording didn't change exactly at the 2/3 boundary, but I doubt it. So it looks to me like the alleged plpython3u language is actually invoking python 2.something, which is unlikely to work well at all. In

Re: ERROR: ImportError: No module named 'psutil'

2021-08-01 Thread Tom Lane
Adrian Klaver writes: > On 8/1/21 7:40 AM, Ganesh Korde wrote: >> I am trying to run a python function using the language plpython3u and >> I am getting the below error, though I have installed psutil. >> >> postgres=# select * from get_psutil_mem(); >> ERROR:  ImportError: No module named 'psut

Re: ERROR: ImportError: No module named 'psutil'

2021-08-01 Thread Adrian Klaver
On 8/1/21 7:40 AM, Ganesh Korde wrote: Hi Everyone, Environment OS : Linux ubuntu 4.4.0-87-generic Database:  PostgreSQL 10.7 on x86_64-pc-linux-gnu, Extension: plpython3u Python version: Python 3.5.2  I am trying to run a python function using the language plpython3u and I am getting the bel

Re: postgres vacuum memory limits

2021-08-01 Thread Tom Lane
"David G. Johnston" writes: > On Saturday, July 31, 2021, Ayub M wrote: >> But when default_statistics_target is increased to 3000, the session usage >> is 463mb > IIUC, the analyze process doesn’t consult maintenance_work_mem. It simply > creates an array, in memory, to hold the random sample

ERROR: ImportError: No module named 'psutil'

2021-08-01 Thread Ganesh Korde
Hi Everyone, Environment OS : Linux ubuntu 4.4.0-87-generic Database: PostgreSQL 10.7 on x86_64-pc-linux-gnu, Extension: plpython3u Python version: Python 3.5.2 I am trying to run a python function using the language plpython3u and I am getting the below error, though I have installed psutil.

Re: postgres vacuum memory limits

2021-08-01 Thread Vijaykumar Jain
On Sun, 1 Aug 2021 at 10:27, Ayub M wrote: > > Hello, when maintenance_work_mem and autovacuum_work_mem are set, my understanding is that the vacuum and autovacuum sessions should be limited to use the memory limits set by these parameters. But I am seeing more memory being used than these limits

Re: Help with writing a generate_series(tsmultirange, interval)

2021-08-01 Thread Alban Hertroys
> On 1 Aug 2021, at 3:30, Tom Lane wrote: > > =?utf-8?Q?Fran=C3=A7ois_Beausoleil?= writes: >> While mowing the lawn, I thought that since the syntax of multi ranges is >> similar to arrays, maybe I could use unnest(), but sadly, that was not to be >> the case: >> # select >> unnest('{[2021-