Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread Laurenz Albe
pinker wrote: > Laurenz Albe wrote > > Yes, you should set vm.dirty_background_bytes and vm.dirty_bytes > > and not use the *_ratio settings. > > > > 2 GB for vm.dirty_background_bytes and 1 GB for vm.dirty_bytes sounds > > fine. To repeat (for the archive): it should be the other way round. > T

save query as sql file

2018-03-06 Thread Łukasz Jarych
Hello, I ma trying to save query as sql file in pg_admin4 but file --> save as not exists like here: https://www.youtube.com/watch?v=L4KJ_Kpymh4 where can i do it ? Best, Jacek

RE: help to query json column

2018-03-06 Thread Charles Clavadetscher
Hello > -Original Message- > From: Arup Rakshit [mailto:aruprakshit1...@outlook.com] > Sent: Mittwoch, 7. März 2018 05:41 > To: pgsql-general@lists.postgresql.org > Subject: help to query json column > > Hi, > > I would like to select only rows where signature has a non null value. My >

Re: Help troubleshooting SubtransControlLock problems

2018-03-06 Thread Rene Romero Benavides
For such issues, I find this view very useful (the first one): https://wiki.postgresql.org/wiki/Lock_Monitoring Examine blocking_pid's , and tell us what kind of operation is blocking the other processes . Also, are there many long running transactions in your server? 2018-03-06 21:24 GMT-06:00

help to query json column

2018-03-06 Thread Arup Rakshit
Hi, I would like to select only rows where signature has a non null value. My json looks like : { "carInspection": { "damages": [ { "x": 68.670309653916, "y": 44.08014571949, "errors": [ { "code": "BR", "description": "Gebroch

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread Andres Freund
On 2018-03-06 18:59:01 -0700, pinker wrote: > Andres Freund wrote > > With a halfway modern PG I'd suggest to rather tune postgres settings > > that control flushing. That leaves files like temp sorting in memory for > > longer, while flushing things controlledly for other sources of > > writes. Se

Help troubleshooting SubtransControlLock problems

2018-03-06 Thread Scott Frazer
Hi, we have a Postgres 9.6 setup using replication that has recently started seeing a lot of processes stuck in "SubtransControlLock" as a wait_event on the read-replicas. Like this, only usually about 300-800 of them: 179706 | LWLockNamed | SubtransControlLock 186602 | LWLockNamed | S

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread pinker
Laurenz Albe wrote > Yes, you should set vm.dirty_background_bytes and vm.dirty_bytes > and not use the *_ratio settings. > > 2 GB for vm.dirty_background_bytes and 1 GB for vm.dirty_bytes sounds > fine. > > Yours, > Laurenz Albe > -- > Cybertec | https://www.cybertec-postgresql.com Thank you L

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread pinker
Andres Freund wrote > With a halfway modern PG I'd suggest to rather tune postgres settings > that control flushing. That leaves files like temp sorting in memory for > longer, while flushing things controlledly for other sources of > writes. See *_flush_after settings. > > Greetings, > > Andres

Re: Can I grant permissions to specific set of uids (linux) ?

2018-03-06 Thread David G. Johnston
On Tue, Mar 6, 2018 at 1:26 PM, David Gauthier wrote: > Hi: > > I'd like to grant select, insert, update, delete to a table for a specific > set of uids (linux). All others get select only. Can the DB authenticate > the current linux user and grant access based on the fact that they are > logge

Re: Can I grant permissions to specific set of uids (linux) ?

2018-03-06 Thread Melvin Davidson
On Tue, Mar 6, 2018 at 3:26 PM, David Gauthier wrote: > Hi: > > I'd like to grant select, insert, update, delete to a table for a specific > set of uids (linux). All others get select only. Can the DB authenticate > the current linux user and grant access based on the fact that they are > logge

Can I grant permissions to specific set of uids (linux) ?

2018-03-06 Thread David Gauthier
Hi: I'd like to grant select, insert, update, delete to a table for a specific set of uids (linux). All others get select only. Can the DB authenticate the current linux user and grant access based on the fact that they are logged in ()IOW, no passwords ?Is this possible ? If so, how ? Than

Barman versus pgBackRest

2018-03-06 Thread Thomas Poty
Hello Community, I hesitate to use barman or pgBackRest. I have found a lot of common points between them and a few differences: About pgBarman, I like : - be able restore on a remote server from the backup server - use replication slots for backingup wal on the backup server. About pgBackRest,

Re: plpgsql function-parsing

2018-03-06 Thread Pavel Stehule
Hi 2018-03-06 16:51 GMT+01:00 chris : > Hi, > > I am trying to create a function that gets passed a statement as a string > and then I need to change the table_name within the string by adding a > "_cdc" to it, then execute the statement > > ex: > > string passed could be GRANT all ON authors TO

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread Andres Freund
On 2018-03-06 03:23:29 -0700, pinker wrote: > Hi, > I've got cutomer with really huge RAM, now it's: > total used free sharedbuffers cached > Mem: 31021113052596 49515 2088019922961185 > -/+ buffers/cache: 904183011693 > S

Re: normalizing a float array?

2018-03-06 Thread Achilleas Mantzios
On 06/03/2018 18:12, Celia McInnis wrote: Hi - I can write a stored procedure to normalize float arrays, but is there a nicer way of doing this in postgresql? Last time I checked (1-2 yrs ago) no. -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt

normalizing a float array?

2018-03-06 Thread Celia McInnis
Hi - I can write a stored procedure to normalize float arrays, but is there a nicer way of doing this in postgresql?

plpgsql function-parsing

2018-03-06 Thread chris
Hi, I am trying to create a function that gets passed a statement as a string and then I need to change the table_name within the string by adding a "_cdc" to it, then execute the statement ex: string passed could be GRANT all ON authors TO bob. then EXECUTE GRANT all ON authors_cdc TO bob

Re: What is wrong with my pgadmin?

2018-03-06 Thread David G. Johnston
On Tue, Mar 6, 2018 at 3:15 AM, Laurenz Albe wrote: > David G. Johnston wrote: > > On Monday, March 5, 2018, Łukasz Jarych wrote: > > > Anyone pleasE? > > > > Don't know but you might get better results by emailing the support list > for the pgAdmin application. This list is for general questio

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread Laurenz Albe
Tomas Vondra wrote: > > > > 2 GB for vm.dirty_background_bytes and 1 GB for vm.dirty_bytes sounds fine. > > > > It should be the other way around: dirty_background_bytes < dirty_bytes Of course, thanks for the correction. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread Tomas Vondra
On 03/06/2018 01:16 PM, Laurenz Albe wrote: > pinker wrote: >> I've got cutomer with really huge RAM, now it's: >> total used free sharedbuffers cached >> Mem: 31021113052596 49515 2088019922961185 >> -/+ buffers/cache: 9041

Re: dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread Laurenz Albe
pinker wrote: > I've got cutomer with really huge RAM, now it's: > total used free sharedbuffers cached > Mem: 31021113052596 49515 2088019922961185 > -/+ buffers/cache: 904183011693 > Swap: 8191 1 8

dirty_ratio & dirty_background_ratio settings with huge memory

2018-03-06 Thread pinker
Hi, I've got cutomer with really huge RAM, now it's: total used free sharedbuffers cached Mem: 31021113052596 49515 2088019922961185 -/+ buffers/cache: 904183011693 Swap: 8191 1 8190 (free -m) and

Re: What is wrong with my pgadmin?

2018-03-06 Thread Laurenz Albe
David G. Johnston wrote: > On Monday, March 5, 2018, Łukasz Jarych wrote: > > Anyone pleasE? > > Don't know but you might get better results by emailing the support list for > the pgAdmin application. This list is for general questions about the server. I agree about asking the specialized lis

Re: psql variables in the DO command

2018-03-06 Thread Pavel Stehule
2018-03-06 10:17 GMT+01:00 Pavel Luzanov : > On 05.03.2018 18:35, Pavel Stehule wrote: > > I am slowly working on prototype. The work is simple, when variables are > just scalars. But it is much harder, when we allow composite variables. > When prototype will be done, I invite any cooperation - th

Re: psql variables in the DO command

2018-03-06 Thread Pavel Luzanov
On 05.03.2018 18:35, Pavel Stehule wrote: I am slowly working on prototype. The work is simple, when variables are just scalars. But it is much harder, when we allow composite variables. When prototype will be done, I invite any cooperation - there are lot of question - and one very hard - wher