RE: posgresql.log

2018-05-21 Thread Bartosz Dmytrak
-Original Message- From: Steve Atkins [mailto:st...@blighty.com] Sent: Tuesday, May 22, 2018 12:44 AM To: PG-General Mailing List Cc: bdmyt...@gmail.com Subject: Re: posgresql.log > On May 21, 2018, at 3:21 PM, Steve Crawford > wrote: > > > > If this is a test server and you can

RE: posgresql.log

2018-05-21 Thread Bartosz Dmytrak
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, May 22, 2018 12:03 AM To: Bartosz Dmytrak ; pgsql-gene...@postgresql.org Subject: Re: posgresql.log On 05/21/2018 02:40 PM, Bartosz Dmytrak wrote: > Hi Gurus, > > Looking into my postgresql.log on

source of connection fails at pg startup?

2018-05-21 Thread Stuart McGraw
When I start my postgresql server I get 11 messages reporting that "password authentication failed for user 'postgres'" spaced about ~.5sec apart. I increased the logging level to INFO, and added the application name to the message format (after the pid) which resulted in: 2018-05-21 23:04:44.3

Re: Rapid disk usage spikes when updating large tables with GIN indexes

2018-05-21 Thread Jonathan Marks
I believe that we have figured it out. It indeed was a WAL issue — the WAL wasn’t getting measured because it had been moved into an archived folder. We resolved this in a two main ways: 1. By dramatically increasing max_wal_size to decrease the frequency of commits 2. By turning on wal_compress

Re: posgresql.log

2018-05-21 Thread Ron
On 05/21/2018 04:40 PM, Bartosz Dmytrak wrote: Hi Gurus, Looking into my postgresql.log on one of my test servers I found scary entry: --2018-05-19 05:28:21-- http://207.148.79.161/post0514/post Connecting to 207.148.79.161:80... connected. HTTP request sent, awaiting response... 200 OK Len

Re: posgresql.log

2018-05-21 Thread Steve Atkins
> On May 21, 2018, at 3:21 PM, Steve Crawford > wrote: > > > > If this is a test server and you can take it offline for forensics I would do > so, especially if it could provide a path to other internal or critical > resources. If you can image it for safekeeping and forensics, even better.

Re: posgresql.log

2018-05-21 Thread Steve Crawford
On Mon, May 21, 2018 at 2:40 PM Bartosz Dmytrak wrote: > Hi Gurus, > > Looking into my postgresql.log on one of my test servers I found scary > entry: > > > > --2018-05-19 05:28:21-- http://207.148.79.161/post0514/post > > Connecting to 207.148.79.161:80... connected. > > HTTP request sent, awai

Re: posgresql.log

2018-05-21 Thread Adrian Klaver
On 05/21/2018 02:40 PM, Bartosz Dmytrak wrote: Hi Gurus, Looking into my postgresql.log on one of my test servers I found scary entry: Is there a Web app running on this server? The log entries below are from the Postgres logs in?: /var/log/postgresql/ --2018-05-19 05:28:21--  http://207

posgresql.log

2018-05-21 Thread Bartosz Dmytrak
Hi Gurus, Looking into my postgresql.log on one of my test servers I found scary entry: --2018-05-19 05:28:21-- http://207.148.79.161/post0514/post Connecting to 207.148.79.161:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1606648 (1.5M) [application/octet-stream]

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Alexey Dokuchaev
On Mon, May 21, 2018 at 12:54:56PM -0400, Tom Lane wrote: > Alexey Dokuchaev writes: > > Quick reality check question: are count(*) vs. count(_) equivalent > > above? > > Only if _ is guaranteed non-null ... which, as a rowtype result, it > probably is. But I'd use count(*) if you're concerned a

Re: Will Altering and Modifying tables during backup result in a corrupted server after the restore?

2018-05-21 Thread Stephen Frost
Greetings, * Christoph Moench-Tegeder (c...@burggraben.net) wrote: > ## Yashwanth Govinda Setty (ygovindase...@commvault.com): > > > 2. Restore the server with transaction logs > > This is missing a lot of details. If you do it right - see your email > thread from one week ago - you will be a

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Tom Lane
Alexey Dokuchaev writes: > Quick reality check > question: are count(*) vs. count(_) equivalent above? Only if _ is guaranteed non-null ... which, as a rowtype result, it probably is. But I'd use count(*) if you're concerned about speed. regards, tom lane

Re: Will Altering and Modifying tables during backup result in a corrupted server after the restore?

2018-05-21 Thread Christoph Moench-Tegeder
## Yashwanth Govinda Setty (ygovindase...@commvault.com): > 2. Restore the server with transaction logs This is missing a lot of details. If you do it right - see your email thread from one week ago - you will be able to recover the database server to a state as of the _end_ of the backup proc

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Alexey Dokuchaev
On Mon, May 21, 2018 at 12:20:52PM -0400, Tom Lane wrote: > Alexey Dokuchaev writes: > > On Mon, May 21, 2018 at 10:45:27AM -0400, Tom Lane wrote: > >> OP could do something like > >>select json_agg(_) as j, count(*) as c INTO r FROM ( > > > Thanks, I've arrived at the same solution (using lo

Re: Will Altering and Modifying tables during backup result in a corrupted server after the restore?

2018-05-21 Thread Stephen Frost
Greetings, * Yashwanth Govinda Setty (ygovindase...@commvault.com) wrote: > 1. Creating a big table. Identify the physical file on the disk. > 1. While backup process is backing up a file associated with the table - > update the rows , add a column. > 2. Restore the server with transactio

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Tom Lane
Alexey Dokuchaev writes: > On Mon, May 21, 2018 at 10:45:27AM -0400, Tom Lane wrote: >> OP could do something like >> select json_agg(_) as j, count(*) as c INTO r FROM ( > Thanks, I've arrived at the same solution (using local RECORD) eventually. > It works as intended, but I still need to

Re: Will Altering and Modifying tables during backup result in a corrupted server after the restore?

2018-05-21 Thread Alvaro Aguayo Garcia-Rada
Not sure if such case would corrup the backup, but I won't make a backup just by copying the data directory. Use pg_basebackup instead, it's safer Regards, Alvaro Aguayo Operations Manager Open Comb Systems E.I.R.L. Office: (+51-1) 3377813 | Mobile: (+51) 995540103 | (+51) 954183248 Web: www.o

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Alexey Dokuchaev
On Mon, May 21, 2018 at 10:45:27AM -0400, Tom Lane wrote: > OP could do something like > > declare r record; > ... > select json_agg(_) as j, count(*) as c INTO r FROM ( > SELECT foo, bar, baz ... > FROM t1, t2, t3 WHERE ...) AS _; > > This would be slightly more expensive

Will Altering and Modifying tables during backup result in a corrupted server after the restore?

2018-05-21 Thread Yashwanth Govinda Setty
Hi All, We are trying this scenario: Here are the steps being done: 1. Creating a big table. Identify the physical file on the disk. 1. While backup process is backing up a file associated with the table - update the rows , add a column. 2. Restore the server with transaction logs

Re: Installing PostgreSQL as non-root by Extracting the binaries from RPMs

2018-05-21 Thread Alvaro Aguayo Garcia-Rada
Should work with no problem, but I would not recommend it. You may not be able to setup a service(SysV or systemd) to automatically start postgres, and updating version could be troublesome. Regards, Alvaro Aguayo Operations Manager Open Comb Systems E.I.R.L. Office: (+51-1) 3377813 | Mobile:

Re: Installing PostgreSQL as non-root by Extracting the binaries from RPMs

2018-05-21 Thread Tom Lane
Thiagarajan Lakshminarayanan writes: > Thanks Benjamin. Actually, we don't use Docker in our environment. We just > use a standard RHEL OS install. Will there be any issues if I install > PostgreSQL by extracting the RPM binaries? What exactly is your purpose here? Is it just that you want to r

Re: Installing PostgreSQL as non-root by Extracting the binaries from RPMs

2018-05-21 Thread Thiagarajan Lakshminarayanan
Thanks Benjamin. Actually, we don't use Docker in our environment. We just use a standard RHEL OS install. Will there be any issues if I install PostgreSQL by extracting the RPM binaries? Please let me know. Thanks Raj On Mon, May 21, 2018 at 10:15 AM, Benjamin Scherrey < scher...@proteus-tech.

Re: Installing PostgreSQL as non-root by Extracting the binaries from RPMs

2018-05-21 Thread Benjamin Scherrey
You know this is something super easy to do if you do it within Docker. Advise you to go ahead and map the data directories to the host file system rather than use a storage container until you get a lot more experience with Docker. Otherwise it's crazy easy and, in fact, there already exist Docker

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Tom Lane
"David G. Johnston" writes: >> Is it possible to obtain the >> first ROW_COUNT (after SELECT) without performing it twice? > ​Not directly, no. You should execute the inner query to a temporary table > than perform your counting and json_agg from that. OP could do something like declar

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Adrian Klaver
On 05/21/2018 05:54 AM, Alexey Dokuchaev wrote: Hi, I'm seeing somewhat confusing results here with 9.6.8, and cannot find the answer in the docs or google. I'm returning JSON array (or any array, it does not make a difference) from my plpgsql function like this: OUT retcode int, OUT

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread David G. Johnston
On Mon, May 21, 2018 at 5:54 AM, Alexey Dokuchaev wrote: > result := json_agg(_) FROM ( > SELECT foo, bar, baz ... > FROM t1, t2, t3 WHERE ...) AS _; -- this works fine > > GET DIAGNOSTICS retcode = ROW_COUNT;-- always returns 1 > > I'd expected `retcode' to c

Installing PostgreSQL as non-root by Extracting the binaries from RPMs

2018-05-21 Thread Thiagarajan Lakshminarayanan
Hello, In our environment, our standard RHEL OS install comes with all the PostgreSQL required packages / libraries installed. So, can I just extract the binaries from PostgreSQL RPMs via rpm2cpio and create a tar file and install it as non-root user in an alternate location? I tested the above

Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Alexey Dokuchaev
Hi, I'm seeing somewhat confusing results here with 9.6.8, and cannot find the answer in the docs or google. I'm returning JSON array (or any array, it does not make a difference) from my plpgsql function like this: OUT retcode int, OUT result json) . . . result := json_agg(_) FR

Re: [GENERAL] Postgre compatible version with RHEL 7.5

2018-05-21 Thread David G. Johnston
On Sun, May 20, 2018 at 10:15 PM, Deepti Sharma S < deepti.s.sha...@ericsson.com> wrote: > Hello Team, > > Can you please let us know what postgre version is compatible with > RHEL7.5? We are currently using Postgre version 9.6.6. > ​9.6.6 is compatible but not supported - the current supported r

Errors with physical replication

2018-05-21 Thread greigwise
Hello. We are on Postgresql version 9.6.6. We have 2 EC2 instances in different Amazon regions and we are doing physical replication via VPN. It all seems to work just fine most of the time. I'm noticing in the logs that we have recurring erros (maybe 10 or 12 times per day) that look like t

Re: [GENERAL] Postgre compatible version with RHEL 7.5

2018-05-21 Thread Martín Marqués
El 21/05/18 a las 02:15, Deepti Sharma S escribió: > Hello Team, > > Can you please let us know what postgre version is compatible with RHEL7.5? > We are currently using Postgre version 9.6.6. Please, don't hijack other threads just changing the subject line. Start a new mail thread with the que

RE: [GENERAL] Postgre compatible version with RHEL 7.5

2018-05-21 Thread Deepti Sharma S
Hello Team, Can you please let us know what postgre version is compatible with RHEL7.5? We are currently using Postgre version 9.6.6. DEEPTI SHARMA Specialist ITIL 2011 Foundation Certified BDGS, R&D Ericsson 3rd Floor, ASF Insignia - Block B Kings Canyon, Gwal Pahari, Gurgaon, Haryana 122

Re: Streaming Replication between PostGreSQL 9.2.2 on Red Hat and PostGreSQL 9.2.24 on Debian

2018-05-21 Thread Ian Barwick
On 05/21/2018 07:18 PM, Jonatan Evald Buus wrote: > Hi there, > > I'm trying to configure streaming replication between a Red Hat server > running PostGreSQL 9.2.2 and a Debian server running PostGreSQL 9.2.24 > with Hot Standby enabled. > > While the base backup works fine using /pg_basebackup/,

Streaming Replication between PostGreSQL 9.2.2 on Red Hat and PostGreSQL 9.2.24 on Debian

2018-05-21 Thread Jonatan Evald Buus
Hi there, I'm trying to configure streaming replication between a Red Hat server running PostGreSQL 9.2.2 and a Debian server running PostGreSQL 9.2.24 with Hot Standby enabled. While the base backup works fine using *pg_basebackup*, I get the following errors with hot standby enabled on the Debi