Trying to understand odd trigger behavior

2018-06-14 Thread Bruno Wolff III
I think I know what is happening, but I wanted to see if my understanding is correct. I have a perl after insert trigger for a table with a non-null column element and I am getting an occasional error when the trigger executes for printing a null value which is $TD->{new}{element}. However, I

Re: Can I disable sslcert/sslkey in pg_service.conf?

2018-06-14 Thread Peter Eisentraut
On 6/14/18 15:06, George Woodring wrote: > If I put the blanks into pg_service.conf: > > [mydb] > dbname=mydb > host=host1 > sslmode=require > sslcert= > sslkey= > > It does not work. I can believe that. > [woodring@ibeam]$ PGSERVICE=mydb psql > psql: SSL error: tlsv1 alert unknown ca > > I

Re: Question on Buckets and Batches in explain plan

2018-06-14 Thread Adrian Klaver
On 06/14/2018 05:47 PM, Charlin Barak wrote: Hi, I ran a query on two supposedly similarly configured 9.6.8 databases but got two different timings. One ran three times faster than the other. I think the first thing to do would be to verify the configurations in their respective

Question on Buckets and Batches in explain plan

2018-06-14 Thread Charlin Barak
Hi, I ran a query on two supposedly similarly configured 9.6.8 databases but got two different timings. One ran three times faster than the other. The explain plans on both systems look the same except for the Buckets and Batches. Can someone explain what that means and what configuration

Faster way of estimating database size

2018-06-14 Thread Sam Saffron
Hi there, At the moment we are using: SELECT pg_database.datname, pg_database_size(pg_database.datname) as size FROM pg_database To gather size of databases for monitoring purposes in Prometheus. Our pg stat logging now shows this is our number one query cause we seem to be running it for some

Re: Impact of multixact "members" limit exceeded

2018-06-14 Thread Daniel Lagerman
> Did you observe whether the vacuumed tables' relminmxid advance? If it > didn't, then those vacuums are a waste of time. > > Note that freeze_table_age affects when vacuum does a full table scan > vs. when it skips pages due to visibility map. A vacuum that does a > partial scan does *not*

Re: Impact of multixact "members" limit exceeded

2018-06-14 Thread Alvaro Herrera
On 2018-Jun-14, Daniel Lagerman wrote: > > Set vacuum_multixact_freeze_table_age to 0 (causing all vacuums to scan > > tables fully) and vacuum_multixact_freeze_min_age to some value like one > > million (so that they remove most of the oldest multixacts, leaving > > just the frontmost one

Re: Impact of multixact "members" limit exceeded

2018-06-14 Thread Daniel Lagerman
> > Hello Daniel > > The advice from Lawrence downthread is very much on point. If you can > upgrade to 9.5, do it. He mentions savepoints, but one more case is > plpgsql blocks with EXCEPTION clauses. > Hello Álvaro, Thanks I'll make sure of both even if I do not believe this is this case

Re: PostgreSQL Volume Question

2018-06-14 Thread Melvin Davidson
On Thu, Jun 14, 2018 at 6:30 PM, Adrian Klaver wrote: > On 06/14/2018 02:33 PM, Data Ace wrote: > >> Hi, I'm new to the community. >> >> Recently, I've been involved in a project that develops a social network >> data analysis service (and my client's DBMS is based on PostgreSQL). >> I need to

Re: Impact of multixact "members" limit exceeded

2018-06-14 Thread Daniel Lagerman
Hey Lawrence, Thanks for the input, I will check if this is the case, I do not believe it is but its worth checking out. To me it looks like normal inserts. I think we were just insanely behind on the vacuum. I have another server, same code for the App on top of the DB which does not have this

Re: PostgreSQL Volume Question

2018-06-14 Thread Adrian Klaver
On 06/14/2018 02:33 PM, Data Ace wrote: Hi, I'm new to the community. Recently, I've been involved in a project that develops a social network data analysis service (and my client's DBMS is based on PostgreSQL). I need to gather huge volume of unstructured raw data for this project, and the

Re: PostgreSQL Volume Question

2018-06-14 Thread Ravi Krishna
> > Hi, I'm new to the community. > > Recently, I've been involved in a project that develops a social network data > analysis service (and my client's DBMS is based on PostgreSQL). > I need to gather huge volume of unstructured raw data for this project, and > the problem is that with

PostgreSQL Volume Question

2018-06-14 Thread Data Ace
Hi, I'm new to the community. Recently, I've been involved in a project that develops a social network data analysis service (and my client's DBMS is based on PostgreSQL). I need to gather huge volume of unstructured raw data for this project, and the problem is that with PostgreSQL, it would be

Can I disable sslcert/sslkey in pg_service.conf?

2018-06-14 Thread George Woodring
We currently use pg_service.conf and certificates to log into our databases. Users have their own ~/.postgresql/postgresql.[crt|key] and everything is happy. We are testing a cloud based postgres which is requiring password based authentication, however our existing certificates are causing the

Re: Database connection log

2018-06-14 Thread Pierre Timmermans
I believe that you can achieve what you want with the following configuration parameters: log_connections and log_line_prefix  PostgreSQL: Documentation: 10: 19.8. Error Reporting and Logging | | | | | | | | | | | PostgreSQL: Documentation: 10: 19.8. Error Reporting and Logging |

Re: Database connection log

2018-06-14 Thread Christoph Moench-Tegeder
## Tiffany Thang (tiffanyth...@gmail.com): > Does PostgreSQL keep a log of client connections to the database like > Oracle's listener.log? I would like to extract information such as how many > connections are made to the database daily, the IP addresses they > originated from and the schemas

Database connection log

2018-06-14 Thread Tiffany Thang
Hi, Does PostgreSQL keep a log of client connections to the database like Oracle's listener.log? I would like to extract information such as how many connections are made to the database daily, the IP addresses they originated from and the schemas they are connected to. Would it be possible to

Re: Impact of multixact "members" limit exceeded

2018-06-14 Thread Alvaro Herrera
Hello Daniel The advice from Lawrence downthread is very much on point. If you can upgrade to 9.5, do it. He mentions savepoints, but one more case is plpgsql blocks with EXCEPTION clauses. On 2018-Jun-13, Daniel Lagerman wrote: > Hello Álvaro, > > I'm running at 9.4.3, I know its an older

catalog is missing n attribute(s) for relid xxxx at character yy

2018-06-14 Thread Moreno Andreo
Hi, PostgreSQL 9.1 x86 on Windows 10 (EOL, but in this case it doesn't apply :-) ) When querying a table, I receive the error reported in subject: catalog is missing 5 attribute(s) for relid 33238 at character 15 So I decided to drop and recreate the table. DROP TABLE tbl; same error. Is

Re: How to reference a composite type in schemas not "public"?

2018-06-14 Thread Adrian Klaver
On 06/13/2018 10:34 PM, a wrote: Sorry I was in the wrong db last time TESTDB=# \dn ?0?2 ?0?2 ?0?2 ?0?2 ?0?2|?0?2 ?? -+-- ?0?2MjorTbl | postgres ?0?2Rate?0?2 ?0?2 | postgres ?0?2public?0?2 | postgres In addition try: \dT "MjorTbl".mort -- Adrian

Re: How to reference a composite type in schemas not "public"?

2018-06-14 Thread Adrian Klaver
On 06/13/2018 08:34 PM, a wrote: Hi I have created some composite type: create type "MjorTbl".mort as( adjfac    float8, tablename text, subtype   text, improv  float8, selfac    slfc ); The schema is different from public, while I would like to create table using the composite type, it

Re: Impact of multixact "members" limit exceeded

2018-06-14 Thread Lawrence Jones
Hey Daniel, This may be entirely unrelated to your query, but we’ve previously experienced issues with 9.4 and crazy multixact members growth. After digging into the issue, we found the culprit was code that would perform the following actions: begin; for query in many_queries: savepoint ;

Re: question on streaming replication

2018-06-14 Thread Fabio Pardi
Hi Atul, Please do not cross-post over mailing lists. As per your problem: on a streaming replication setup, all changes applied to master are propagated to standby(s). If standby is stopped or cannot temporary reach master, then it will pick up changes when started or when can reach master

question on streaming replication

2018-06-14 Thread Atul Kumar
Hi, I have postgres edb 9.6 version, i have below query to solve it out. i have configured streaming replication having master and slave node on same server just to test it. All worked fine but when i made slave service stop, and create some test databases in master, after then i made slave

PostgreSQL Version 9.6.1 support in Windows 2016 Server

2018-06-14 Thread YaduMani.Kar
Hi, We are using PostgreSQL Version 9.6.1 in our application. We are planning to deploy our application in Windows 2016 Server. Can you please that PostgreSQL Version 9.6.1 supports in Windows 2016 Server or not? As per below URL Windows 2016 is not listed against 9.6