Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Dilip Kumar
On Tue, Nov 28, 2017 at 4:18 AM, Thomas Munro wrote: > On Tue, Nov 28, 2017 at 10:05 AM, Jakub Glapa > wrote: > > As for the crash. I dug up the initial log and it looks like a > segmentation > > fault... > > > > 2017-11-23 07:26:53 CET:192.168.10.83(35238):user@db:[30003]: ERROR: > too > > many

Re: Table and Index bloating

2017-11-27 Thread stevenchang1213
After reading the web pages, index part should be succeeded, but tables may not fit if they got foreign key relations.  steven  原始訊息 自: Carlos Martinez 日期: 2017/11/27 23:13 (GMT+08:00) 至: pgsql-gene...@postgresql.org 主旨: Re: Table and Index bloating Hi. Can we use pg_repack

Setting a serial column with serial object that has a name that is built dynamically

2017-11-27 Thread Robert Lakes
How do I set a serial column with the next value when the serial object has a name that is built dynamically? EXECUTE 'CREATE SEQUENCE '|| *t_name *|| *'id_seq'* || ' OWNED BY '|| t_name || '_cdc'||'.table_id'; EXECUTE 'ALTER TABLE ' || quote_ident(t_name || '_cdc') || ' ALTER COLUMN table_id

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Thomas Munro
On Tue, Nov 28, 2017 at 10:05 AM, Jakub Glapa wrote: > As for the crash. I dug up the initial log and it looks like a segmentation > fault... > > 2017-11-23 07:26:53 CET:192.168.10.83(35238):user@db:[30003]: ERROR: too > many dynamic shared memory segments Hmm. Well this error can only occur in

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Jakub Glapa
Hi Thomas, doubling the max_connection has the problem gone away for now! Yay! As for the crash. I dug up the initial log and it looks like a segmentation fault... 2017-11-23 07:26:53 CET:192.168.10.83(35238):user@db:[30003]: ERROR: too many dynamic shared memory segments 2017-11-23 07:26:53 CET

Re: Setting a default for nextval sequence

2017-11-27 Thread Melvin Davidson
On Mon, Nov 27, 2017 at 2:24 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Mon, Nov 27, 2017 at 12:13 PM, Robert Lakes > wrote: > >> I'm attempting to set the default value for a serial column. I created a >> generic function that I am passing a table name as the only parameter

Re: Setting a default for nextval sequence

2017-11-27 Thread David G. Johnston
On Mon, Nov 27, 2017 at 12:13 PM, Robert Lakes wrote: > I'm attempting to set the default value for a serial column. I created a > generic function that I am passing a table name as the only parameter. I > had it working correctly, however, it does not seem to like the sequence > name being the

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Tom Lane
Thomas Munro writes: > Ah, so you have many Gather nodes under Append? That's one way to eat > arbitrarily many DSM slots. We allow for 64 + 2 * max_backends. Does > it help if you increase max_connections? I am concerned about the > crash failure mode you mentioned in the first email though:

Setting a default for nextval sequence

2017-11-27 Thread Robert Lakes
I'm attempting to set the default value for a serial column. I created a generic function that I am passing a table name as the only parameter. I had it working correctly, however, it does not seem to like the sequence name being the same name for each audit table that is created through the func

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Thomas Munro
On Tue, Nov 28, 2017 at 1:13 AM, Jakub Glapa wrote: > The queries are somehow special. > We are still using the old style partitioning (list type) but we abuse it a > bit when querying. > When querying a set of partitions instead of doing it via parent table we > stitch together the required table

Re: equalant of msdb in sql server

2017-11-27 Thread John R Pierce
On 11/26/2017 8:10 PM, chandra sekhar wrote: What is the query to get list of the archive log files  to capture start date and time of each archive log ls -l nfsserver:/path/to/archive -- john r pierce, recycling bits in santa cruz

Re: How clear the cache on postgresql?

2017-11-27 Thread Jérôme Étévé
Hi, A way to trick EXPLAIN/EXPLAIN ANALYZE to do what you mean is to play with the optimisation variables: https://www.postgresql.org/docs/9.6/static/runtime-config-query.html J. On 25 November 2017 at 15:01, Adam Tauno Williams wrote: > On Fri, 2017-11-24 at 11:58 -0800, John R Pierce wrote:

Re: Table and Index bloating

2017-11-27 Thread stevenchang1213
hello, https://www.postgresql.org/docs/9.3/static/pgstattuple.html some enhancements onward you can try create index concurrent to maintain your index to achieve the goal of reindex.  Steven  原始訊息 自: Stefan Fercot 日期: 2017/11/27 17:17 (GMT+08:00) 至: Vikas Sharma 副本: pgsql-ge

Re: a question about oddities in the data directory

2017-11-27 Thread Melvin Davidson
The directory "base" contains filenames(numbers) that correspond to the oid of the postgreSQL databases. Those databases have subdirectories that contain the filenames(numbers) that correspond to the oid of objects (sequences, tables, etc) in those databases. You may find the attached queries help

Re: a question about oddities in the data directory

2017-11-27 Thread Adam Tauno Williams
On Mon, 2017-11-27 at 15:19 +, Martin Mueller wrote: >  Apologies if I asked this question before. > Is this normal behavior?  Yes. >  Where in the postgres documentation do I read up on this? Start here - https://www.postgresql.org/docs/10/static/admin.html > string functions and regular

Re: a question about oddities in the data directory

2017-11-27 Thread Tomas Vondra
Hi, I think you need to read this: https://www.postgresql.org/docs/current/static/storage-file-layout.html On 11/27/2017 04:19 PM, Martin Mueller wrote: > Apologies if I asked this question before. > > I’m a newcomer to Postgres, having migrated from Mysql. Information > about tables seems har

a question about oddities in the data directory

2017-11-27 Thread Martin Mueller
Apologies if I asked this question before. I’m a newcomer to Postgres, having migrated from Mysql. Information about tables seems harder to get at in Postgres. That data directory on my machine is suspiciously large—well over 100 GB. The directory Postgres/var-9.5/base/ contains a number of

Re: Table and Index bloating

2017-11-27 Thread Carlos Martinez
Hi. Can we use pg_repack with standard community edition of postgresql? Yes. and can it be used on the databases with streaming replication? Yes. Best regards. Carlos Martinez On Mon, Nov 27, 2017 at 10:08 AM, Vikas Sharma wrote: > Thank you Stefan for the queries. > > Thanks you Carlos for

Re: Table and Index bloating

2017-11-27 Thread Vikas Sharma
Thank you Stefan for the queries. Thanks you Carlos for pg_repack suggestion, Can we use pg_repack with standard community edition of postgresql? and can it be used on the databases with streaming replication? Regards Vikas Sharma On 27 November 2017 at 14:58, Carlos Martinez wrote: > Hi. > >

Re: Table and Index bloating

2017-11-27 Thread Carlos Martinez
Hi. You can consider use pg_repack to remove bloat (http://reorg.github.io/pg_repack/) Best regards. Carlos Martinez On Mon, Nov 27, 2017 at 4:17 AM, Stefan Fercot wrote: > Hi, > > You can track that with some monitoring tools like check_pgactivity. The > queries can be found here : > https:/

Install numpy to use within plpython3u in postgres 9.6 for Windows 2012 (64 bit)

2017-11-27 Thread PeterS
I am trying to install numpy to use within plpython3u in postgres 9.6 for Windows 2012 (64 bit) but I run into dependency problems. 1) I have installed Postgres 9.6 from EnterpriseDB and the language pack, which installs Python 3.3. <- is there a way to install a newer version of Python? I have

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Jakub Glapa
Hi Thomas, log excerpt: ... 2017-11-27 12:21:14 CET:192.168.10.83(33424):user@db:[27291]: ERROR: too many dynamic shared memory segments 2017-11-27 12:21:14 CET:192.168.10.83(33424):user@db:[27291]: STATEMENT: SELECT << REMOVED>> 2017-11-27 12:21:14 CET:192.168.10.83(35182):user@db:[28281]: ERRO

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Thomas Munro
On Mon, Nov 27, 2017 at 10:54 PM, Jakub Glapa wrote: > The DB enters recovery mode after that. That's not good. So it actually crashes? Can you please show the full error messages? > 2017-11-23 07:20:39 CET::@:[24823]: ERROR: could not attach to dynamic > shared area >From src/backend/utils/

ERROR: too many dynamic shared memory segments

2017-11-27 Thread Jakub Glapa
Hi, I started seeing those errors on Postgresql 10.1 running on Ubuntu 16.04.3 (64GB/8CPU) server. The DB enters recovery mode after that. 2017-11-23 07:20:39 CET::@:[24823]: ERROR: could not attach to dynamic shared area 2017-11-23 07:20:39 CET::@:[24822]: ERROR: could not map dynamic shared me

Re: Table and Index bloating

2017-11-27 Thread Stefan Fercot
Hi, You can track that with some monitoring tools like check_pgactivity. The queries can be found here : https://github.com/ioguix/pgsql-bloat-estimation. Tables : https://github.com/ioguix/pgsql-bloat-estimation/blob/master/table/table_bloat.sql Indexes : https://github.com/ioguix/pgsql-bloat-es

Table and Index bloating

2017-11-27 Thread Vikas Sharma
Hi All, Could someone please provide the query/queries to find table and Index bloating in PgSql 9.3 onwards? and are there any other maintenance tasks inPgSql except vacuum & analyse. Regards Vikas

Re: equalant of msdb in sql server

2017-11-27 Thread chandra sekhar
What is the query to get list of the archive log files to capture start date and time of each archive log On Sun, Nov 26, 2017 at 5:31 PM Craig Ringer wrote: > On 27 November 2017 at 04:59, Daniel Gustafsson wrote: > >> > On 26 Nov 2017, at 17:54, chandra sekhar >> wrote: >> > >> > sql server

Re: equalant of msdb in sql server

2017-11-27 Thread Craig Ringer
On 27 November 2017 at 12:10, chandra sekhar wrote: > What is the query to get list of the archive log files to capture start > date and time of each archive log > There isn't one. You may be looking for a tool like PgBarman or other archive and backup managers. -- Craig Ringer