ERROR: too many dynamic shared memory segments

2019-09-11 Thread Nicola Contu
Hello, We are running postgres 11.5 and in the last two weeks we did : - upgrade of postgres to 11.5 from 11.4 - increased shared_buffer to 1/3 of the memory - increased effective_cache_size = 160GB from 120 - increased checkpoint_completion_target = 0.9 from 0.7 - increased checkpoint_timeout = 1

Re: ERROR: too many dynamic shared memory segments

2019-09-11 Thread Pavel Stehule
Hi st 11. 9. 2019 v 9:48 odesílatel Nicola Contu napsal: > Hello, > We are running postgres 11.5 and in the last two weeks we did : > > - upgrade of postgres to 11.5 from 11.4 > - increased shared_buffer to 1/3 of the memory > - increased effective_cache_size = 160GB from 120 > - increased check

Re: ERROR: too many dynamic shared memory segments

2019-09-11 Thread Nicola Contu
Hello, We did not see any error in the logs, just that one. Unfortunately we had problems installing updates in this machine and we are not installing updates since a few months. Do you think that can be the issue? We are running Centos 7. I will look into those parameters as well. Thanks for yo

Exporting and importing table having blob datatype.

2019-09-11 Thread Daulat Ram
Hello Team, We have a large table having blob data type. Anyone please suggest how we can export it from Oracle DB in parts via ora2pg and then import it into postgres. Thanks, Daulat

Re: ERROR: too many dynamic shared memory segments

2019-09-11 Thread Nicola Contu
If the error persist I will try to revert the work_mem. Thanks a lot Il giorno mer 11 set 2019 alle ore 10:10 Pavel Stehule < pavel.steh...@gmail.com> ha scritto: > Hi > > st 11. 9. 2019 v 9:48 odesílatel Nicola Contu > napsal: > >> Hello, >> We are running postgres 11.5 and in the last two week

Re: pgbouncer with ldap

2019-09-11 Thread Ayub M
Achilleas, for this setup to work are changes to postgresql.conf and pg_hba.conf needed? I am trying to implement this for AWS rds Aurora where these files are not accessible. On Mon, Sep 9, 2019, 6:46 AM Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > On 9/9/19 12:41 μ.μ., Laurenz Al

Re: pg_dump problems: [archiver (db)] query failed: ERROR: relation "pg_opfamily" does not exist

2019-09-11 Thread Erwin Moller
On 8/20/2019 5:11 PM, Adrian Klaver wrote: On 8/20/19 8:02 AM, Adrian Klaver wrote: On 8/20/19 7:37 AM, Erwin Moller wrote: That is a bummer. Since I have no idea how to safely install an older version of pg_dump alongside my current 10.10 install, I will wait for the patch. A quick test

RE: Running a Simple Update Statement Fails, Second Time Suceeds.

2019-09-11 Thread Kumar, Virendra

Re: Running a Simple Update Statement Fails, Second Time Suceeds.

2019-09-11 Thread Tom Lane
"Kumar, Virendra" writes: > Just got confirmation from developer that they are not modifying any type. > We are on 11.5 RHEL. Interesting. Can you exhibit a self-contained test case? regards, tom lane

Re: Recover data from aborted transactions

2019-09-11 Thread Luca Ferrari
On Tue, Sep 10, 2019 at 7:18 PM Aaron Spike wrote: > I'm pretty sure that the records I'm looking for are part of one of these > aborted transactions. From what I read online, it seems that data from > uncommitted transactions exists in the Write-Ahead Logs. Is there anyway to > access this dat

How to reformat output of "age()" function

2019-09-11 Thread David Gauthier
How can I change the default output of the "age" function to be, for example, in minutes? E.g. dvdb=> select age('2019-09-11 09:00:00','2019-09-09 11:00:00'); age 1 day 22:00:00 (1 row) I want the equivalent of that time delta in minutes. Thanks in Advance

Re: How to reformat output of "age()" function

2019-09-11 Thread Ron
On 9/11/19 10:38 AM, David Gauthier wrote: How can I change the default output of the "age" function to be, for example, in minutes? E.g. dvdb=> select age('2019-09-11 09:00:00','2019-09-09 11:00:00');       age  1 day 22:00:00 (1 row) I want the equivalent of that time delta

Re: How to reformat output of "age()" function

2019-09-11 Thread Basques, Bob (CI-StPaul)
SELECT EXTRACT(EPOCH FROM age('2019-09-11 09:00:00','2019-09-09 11:00:00')::INTERVAL)/60; A nice explanation and even a slick function are here: https://stackoverflow.com/questions/3460805/postgresql-format-interval-as-minutes bobb On Sep 11, 2019, at 10:38 AM, David Gauthier mailto:davegau

Re: How to reformat output of "age()" function

2019-09-11 Thread Francisco Olarte
David: On Wed, Sep 11, 2019 at 5:39 PM David Gauthier wrote: > How can I change the default output of the "age" function to be, for example, > in minutes? > E.g. > dvdb=> select age('2019-09-11 09:00:00','2019-09-09 11:00:00'); > age > > 1 day 22:00:00 > (1 row) > I want

REVOKE DROP rights

2019-09-11 Thread Miles Elam
Is there any way to prevent a user from dropping a table when that user has create rights? I'd like to allow that user to be able to create and delete their own tables but not specific shared tables. Is the only way to put the shared tables into a different schema? Thanks in advance

Re: kind of a bag of attributes in a DB . . .

2019-09-11 Thread Albretch Mueller
On 9/10/19, Adrian Klaver wrote: > If there is no rhyme or reason to the metadata I am not sure how you > could come up with an efficient search strategy. Seems it would be a > brute search over everything. Not exactly. Say some things have colours but now weight. You could still Group them as b

Re: REVOKE DROP rights

2019-09-11 Thread Tom Lane
Miles Elam writes: > Is there any way to prevent a user from dropping a table when that user has > create rights? I'd like to allow that user to be able to create and delete > their own tables but not specific shared tables. I think maybe you didn't read the manual closely. Creation privileges c

Re: REVOKE DROP rights

2019-09-11 Thread Miles Elam
Makes sense. Thanks! On Wed, Sep 11, 2019 at 1:43 PM Tom Lane wrote: > Miles Elam writes: > > Is there any way to prevent a user from dropping a table when that user > has > > create rights? I'd like to allow that user to be able to create and > delete > > their own tables but not specific shar

Re: How to reformat output of "age()" function

2019-09-11 Thread David Gauthier
Thanks a lot! On Wed, Sep 11, 2019 at 12:34 PM Francisco Olarte wrote: > David: > > On Wed, Sep 11, 2019 at 5:39 PM David Gauthier > wrote: > > How can I change the default output of the "age" function to be, for > example, in minutes? > > E.g. > > dvdb=> select age('2019-09-11 09:00:00','2019-

Re: kind of a bag of attributes in a DB . . .

2019-09-11 Thread Adrian Klaver
On 9/11/19 9:46 AM, Albretch Mueller wrote: On 9/10/19, Adrian Klaver wrote: If there is no rhyme or reason to the metadata I am not sure how you could come up with an efficient search strategy. Seems it would be a brute search over everything. Not exactly. Say some things have colours but

Re: How to reformat output of "age()" function

2019-09-11 Thread Adrian Klaver
On 9/11/19 9:34 AM, Francisco Olarte wrote: David: On Wed, Sep 11, 2019 at 5:39 PM David Gauthier wrote: How can I change the default output of the "age" function to be, for example, in minutes? E.g. dvdb=> select age('2019-09-11 09:00:00','2019-09-09 11:00:00'); age

Re: ERROR: too many dynamic shared memory segments

2019-09-11 Thread Thomas Munro
On Wed, Sep 11, 2019 at 11:20 PM Nicola Contu wrote: > If the error persist I will try to revert the work_mem. > Thanks a lot Hi Nicola, It's hard to say exactly what the cause of the problem is in your case and how to avoid it, without knowing what your query plans look like. PostgreSQL allows

update returning order by syntax error question

2019-09-11 Thread raf
Hi, postgresql-9.6.15 I just tried something like: select * from (update tblname t set ... where ... returning ...) order by ...; assuming it would work but it didn't. That's OK. I found on stackoverflow that a CTE can be used to do it: with u as (update tblname t set ... where ... r

Re: update returning order by syntax error question

2019-09-11 Thread Luca Ferrari
On Thu, Sep 12, 2019 at 5:45 AM raf wrote: > ERROR: syntax error at or near "t" > LINE 2: tblname t This works on 9.6.9 and 11.4: luca=> with u as ( update t_all set id = 5 where id <= 5 returning *) select * from u; id | ref_id + 5 | 1 (1 row) luca=> select version();

Re: pgbouncer with ldap

2019-09-11 Thread Achilleas Mantzios
On 11/9/19 2:47 μ.μ., Ayub M wrote: Achilleas, for this setup to work are changes to postgresql.conf and pg_hba.conf needed? I am trying to implement this for AWS rds Aurora where these files are not accessible. Those files are needed in any case if you work with postgresql. Unfortunately no