Re: Performance problem postgresql 9.5

2018-06-08 Thread Chapman Flack
On 06/08/2018 03:56 PM, Miguel Angel Sanchez Sandoval wrote: > I see the querys active and encounter > select fun ('./ 2yhdgrfrt63788') Would it be possible (observing appropriate precautions for a compromised server) to report here the language and definition of any function(s) named 'fun' in

Re: Multiple PostgreSQL instances on one machine

2018-06-08 Thread Adrian Klaver
On 06/08/2018 01:29 PM, Tony Sullivan wrote: I am trying to consolidate some machines in my server room particularly in the testing environment and I was hoping someone could point me in the right direction. I currently have three machines running PostgreSQL for testing purposes. Each week a

Re: Multiple PostgreSQL instances on one machine

2018-06-08 Thread Vick Khera
If they are just test environments, why a whole dedicated cluster per instance? Just give each a unique name for the database and run it all on one cluster. I'd also go back and reconsider why these are separate machines in the first place and make sure you're not violating any assumptions that

Multiple PostgreSQL instances on one machine

2018-06-08 Thread Tony Sullivan
I am trying to consolidate some machines in my server room particularly in the testing environment and I was hoping someone could point me in the right direction. I currently have three machines running PostgreSQL for testing purposes. Each week a backup is made of the production database and

Re: Performance problem postgresql 9.5

2018-06-08 Thread Steve Atkins
> On Jun 8, 2018, at 1:09 PM, Alvaro Herrera wrote: > > On 2018-Jun-08, Miguel Angel Sanchez Sandoval wrote: > >> Hi guys, migrate from 8.4 to 9.5, all OK except that 2-3 days pass and the >> database experiences slowness, I execute the linux top command and it shows >> me a postgres user

Re: Performance problem postgresql 9.5

2018-06-08 Thread Alvaro Herrera
On 2018-Jun-08, Miguel Angel Sanchez Sandoval wrote: > Hi guys, migrate from 8.4 to 9.5, all OK except that 2-3 days pass and the > database experiences slowness, I execute the linux top command and it shows > me a postgres user process executing a strange command (2yhdgrfrt63788) > that I

Re: Performance problem postgresql 9.5

2018-06-08 Thread Pavan Teja
Could you please give more briefing about the queries executed. Let me know whether they are dml or ddl. Provide information like how long and from what time the queries are in running state, so that we can find a way to find the exact pain area. What is the size of the database?? When were the

Performance problem postgresql 9.5

2018-06-08 Thread Miguel Angel Sanchez Sandoval
Hi guys, migrate from 8.4 to 9.5, all OK except that 2-3 days pass and the database experiences slowness, I execute the linux top command and it shows me a postgres user process executing a strange command (2yhdgrfrt63788) that I consume a lot of CPU, I see the querys active and encounter select

Use index with x = ANY(array_column) expression

2018-06-08 Thread Havasvölgyi Ottó
Hi all, Is there a way to speed up ANY-based array element search with some kind of index? I mean this: WHERE = ANY() Or is GIN index the only option with the @> operator? WHERE @> ARRAY[] Thank you, Otto

Re: ERROR: found multixact from before relminmxid

2018-06-08 Thread Jeremy Finzel
On Fri, Jun 8, 2018 at 1:08 PM Andres Freund wrote: > On 2018-06-08 12:38:03 -0500, Jeremy Finzel wrote: > > On Tue, Jun 5, 2018 at 8:42 PM, Alexandre Arruda > wrote: > > > > > Em seg, 28 de mai de 2018 às 16:44, Andres Freund > > > escreveu: > > > > > > > > Hi, > > > > > > > > I think I found

Re: ERROR: found multixact from before relminmxid

2018-06-08 Thread Andres Freund
On 2018-06-08 12:38:03 -0500, Jeremy Finzel wrote: > On Tue, Jun 5, 2018 at 8:42 PM, Alexandre Arruda wrote: > > > Em seg, 28 de mai de 2018 às 16:44, Andres Freund > > escreveu: > > > > > > Hi, > > > > > > I think I found the bug, and am about to post a fix for it belo > > >

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Tom Lane
Alexey Dokuchaev writes: > What is the rationale for (int ^ int) to return double precision rather > than numeric? I am missing something obvious here? There are two ^ operators, one taking float8 and one taking numeric. Since float8 is the preferred datatype in the numeric category (i.e. the

Re: ERROR: found multixact from before relminmxid

2018-06-08 Thread Jeremy Finzel
On Tue, Jun 5, 2018 at 8:42 PM, Alexandre Arruda wrote: > Em seg, 28 de mai de 2018 às 16:44, Andres Freund > escreveu: > > > > Hi, > > > > I think I found the bug, and am about to post a fix for it belo > > https://postgr.es/m/20180525203736.crkbg36muzxrj...@alap3.anarazel.de. > > > >

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Adrian Klaver
On 06/08/2018 10:23 AM, Alexey Dokuchaev wrote: Hi there, P.S. On a tangentally related note, why is "NO CYCLE" is the default for sequences? [*] Per documentation, "The [SQL] standard's AS expression is not supported." Another "why is it so?" question, btw. ;-) I found it. Its in the

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Adrian Klaver
On 06/08/2018 10:23 AM, Alexey Dokuchaev wrote: Hi there, I've decided to run some tests to see how my tables' ids would survive when their yielding sequences would start hitting their MAXVALUE's, by doing some "SELECT setval('foo_id_seq', ~maxbigint)". As I don't like to hardcode numbers

(2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Alexey Dokuchaev
Hi there, I've decided to run some tests to see how my tables' ids would survive when their yielding sequences would start hitting their MAXVALUE's, by doing some "SELECT setval('foo_id_seq', ~maxbigint)". As I don't like to hardcode numbers (esp. huge numbers, because sequences are always[*]

Re: Query hitting empty tables taking 48 minutes

2018-06-08 Thread Robert Creager
> On Jun 8, 2018, at 10:23 AM, David G. Johnston > wrote: > > ​Not sure what the right answer is but its seems your database (those tables > at least) are mis-configured for the workload being ​executed against them. > Significantly increasing the aggressiveness of the auto-vacuum process

Re: Query hitting empty tables taking 48 minutes

2018-06-08 Thread David G. Johnston
On Fri, Jun 8, 2018 at 9:17 AM, Robert Creager wrote: > A nightly VACUUM FULL which ran based on heuristics resolved the problem. > This would seem to point to a db problem more than an app problem? I’m > unsure how the app could have an affect of this magnitude on the database, > although I’d

Re: Query hitting empty tables taking 48 minutes

2018-06-08 Thread Robert Creager
On Jun 7, 2018, at 4:58 PM, David G. Johnston mailto:david.g.johns...@gmail.com>> wrote: I would suspect that vacuuming these tables would solve your problem. Whether there is an issue beyond a lack of vacuuming, or related to auto-vacuum, I am unsure. Though at this point it may take a

Re: Code of Conduct plan

2018-06-08 Thread Tom Lane
Justin Clift writes: > On 2018-06-08 09:46, Simon Riggs wrote: >> Would it not be better to consider arbitration as the first step in >> dispute resolution? > I'd probably leave it up to the CoC team/people to figure it out. :) Yeah, exactly. I don't think it's helpful for the document to try

Re: Code of Conduct plan

2018-06-08 Thread Adrian Klaver
On 06/07/2018 02:55 AM, Gavin Flower wrote: On 07/06/18 21:49, Raymond O'Donnell wrote: On 07/06/18 09:04, Pablo Hendrickx wrote: You don't have to be a magician to predict this is going to harm the community. Please keep your American social politics out of Postgres, thank you! As a

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Adrian Klaver
On 06/08/2018 01:38 AM, Ryan Murphy wrote: Hello. I enjoy using VIEWs.  Often my views are updatable, either automatically (due to being a simple 1-table view, or due to a TRIGGER).  Sometimes they are meant to be just read-only. Is there any way to set a VIEW to be read-only --

Re: manipulating NUMERIC values in C extension

2018-06-08 Thread Geoff Winkless
On Fri, 8 Jun 2018 at 13:44, John McKown wrote: > Have you considered the standard C library functions: "atoi()", "atof()", > "atol()", and "atoll()" ? Hi John My issue wasn't so much how to get a number out of the string, rather how to get that value back into a NUMERIC object to return back

Re: manipulating NUMERIC values in C extension

2018-06-08 Thread Geoff Winkless
On Fri, 8 Jun 2018 at 13:47, Geoff Winkless wrote: > Answering my own question, looks like And just in case anyone googling the question comes across this, this example code works. #include "postgres.h" #include #include "fmgr.h" #include "utils/geo_decls.h" #include "funcapi.h" #include

Re: manipulating NUMERIC values in C extension

2018-06-08 Thread Geoff Winkless
On Fri, 8 Jun 2018 at 13:27, Geoff Winkless wrote: > numeric_in looks like it might do what I want but to do that I would > have to build a FunctionCallInfo struct to do that, and I'm not 100% > clear how to do that either :( Answering my own question, looks like res =

Re: manipulating NUMERIC values in C extension

2018-06-08 Thread John McKown
On Fri, Jun 8, 2018 at 7:27 AM Geoff Winkless wrote: > Hi > > I'd like to be able to perform some manipulation on NUMERIC values in > a C function; however the exposed functionality in numeric.h is pretty > restrictive. > > I can see numeric_normalize will return a pointer to a string >

manipulating NUMERIC values in C extension

2018-06-08 Thread Geoff Winkless
Hi I'd like to be able to perform some manipulation on NUMERIC values in a C function; however the exposed functionality in numeric.h is pretty restrictive. I can see numeric_normalize will return a pointer to a string representation, which is workable, and if there were an equivalent

Re: Code of Conduct plan

2018-06-08 Thread Jonathan S. Katz
> On Jun 8, 2018, at 4:46 AM, Simon Riggs wrote: > > On 6 June 2018 at 19:22, Tom Lane wrote: >> I wrote: >>> Yeah, somebody else made a similar point upthread. I guess we felt that >>> the proper procedure was obvious given the structure, but maybe not. >>> I could support adding text to

Re: Code of Conduct plan

2018-06-08 Thread mariusz
On Tue, 2018-06-05 at 12:06 -0400, James Keener wrote: > Do we need a code of conduct like this, or so we need a more general > dispute resolution process? Something that is public and aimed at > mediating disputes (even ones about bad conduct) and removing repeat > offenders. To be honest, larger

Re: Service pgpool

2018-06-08 Thread Jean Claude
Dear all, Attached you can find my pgpoof.conf file. [root@pgpool02 pgpool-II-10]# pgpool -v pgpool-II version 3.7.3 (amefuriboshi) [root@asa-pgpool02 pgpool-II-10]# [root@pgpool02 pgpool-II-10]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.5 (Maipo) [root@pgpool02

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Ryan Murphy : I could see how I could revoke permissions from, say, all users that aren't superusers to INSERT or UPDATE certain views. However, if possible it would be nice to get an error message about the VIEW not being updatable, rather than a user access error, which could be

Re: Code of Conduct plan

2018-06-08 Thread Chris Travers
On Fri, Jun 8, 2018 at 11:18 AM, Justin Clift wrote: > On 2018-06-08 09:46, Simon Riggs wrote: > > >> Would it not be better to consider arbitration as the first step in >> dispute resolution? >> > > This bit sounds like it'd need to be on a case-by-case basis. > > It's pretty easy to imagine

Re: Service pgpool

2018-06-08 Thread Jean Claude
Hi all, How I can resolved the error about the pgpool daemon? any idea? Jun 08 05:23:05 -pgpool02 pgpool[1400]: [5-1] 2018-06-08 05:23:05: pid 1400: LOG: setting the local watchdog node name to "- pgpool02.adm.cacc.ch:5432 Linux -pgpool02" Jun 08 05:23:05 -pgpool02 pgpool[1400]: [6-1]

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Ron
On 06/08/2018 04:17 AM, Ryan Murphy wrote: maybe it is time to overhaul the security concept. I could see how I could revoke permissions from, say, all users that aren't superusers to INSERT or UPDATE certain views.  However, if possible it would be nice to get an error message about

Re: Code of Conduct plan

2018-06-08 Thread Justin Clift
On 2018-06-08 09:46, Simon Riggs wrote: Would it not be better to consider arbitration as the first step in dispute resolution? This bit sounds like it'd need to be on a case-by-case basis. It's pretty easy to imagine scenarios where arbitration wouldn't be appropriate. Whether or not they

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Ryan Murphy
> maybe it is time to overhaul the security concept. > I could see how I could revoke permissions from, say, all users that aren't superusers to INSERT or UPDATE certain views. However, if possible it would be nice to get an error message about the VIEW not being updatable, rather than a user

Re: Code of Conduct plan

2018-06-08 Thread Simon Riggs
On 6 June 2018 at 19:22, Tom Lane wrote: > I wrote: >> Yeah, somebody else made a similar point upthread. I guess we felt that >> the proper procedure was obvious given the structure, but maybe not. >> I could support adding text to clarify this, perhaps along the line of > > Hmm ... actually,

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Thiemo Kellner
Zitat von Ryan Murphy : Is there any way to set a VIEW to be read-only -- specifically, can I do this for a view that is automatically updatable due to being simple? Without saying anything about if this is directly possible, using different users with appropriate grants Comes to my mind,

Can you make a simple view non-updatable?

2018-06-08 Thread Ryan Murphy
Hello. I enjoy using VIEWs. Often my views are updatable, either automatically (due to being a simple 1-table view, or due to a TRIGGER). Sometimes they are meant to be just read-only. Is there any way to set a VIEW to be read-only -- specifically, can I do this for a view that is

Re: Code of Conduct plan

2018-06-08 Thread Chris Travers
On Fri, Jun 8, 2018 at 7:53 AM, Tom Lane wrote: > Christophe Pettus writes: > > 2. I don't think that there is a country where someone being driven out > of a technical community by harassment is an acceptable local value. > > Yeah, this. People that I've known and respected, and who did not

Re: Code of Conduct plan

2018-06-08 Thread Ron
On 06/08/2018 12:09 AM, Gavin Flower wrote: On 08/06/18 16:55, Ron wrote: On 06/07/2018 04:55 AM, Gavin Flower wrote: [snip] The Americans often seem to act as though most people lived in the USA, therefore we should all be bound by what they think is correct! "You" are wearing a

Re: Code of Conduct plan

2018-06-08 Thread Szymon Lipiński
On Fri, 8 Jun 2018 at 06:01, Gavin Flower wrote: > On 08/06/18 14:21, Christophe Pettus wrote: > >> On Jun 7, 2018, at 02:55, Gavin Flower > wrote: > >> The Americans often seem to act as though most people lived in the USA, > therefore we should all be bound by what they think is correct! > >