Issues with compiling libpq 9.1.2 with Visual C++

2018-09-18 Thread Nordström Thomas
OS: Windows 10 Toolset: vc141 (Visual Studio 2017) I'm having trouble compiling version 9.1.2 of libpq with Visual C++. The reason that I want this particular version is because it's the one included with GDAL version 2.1.3 from GISinternals.com. To be specific, I pulled commit

Re: Pgbouncer and postgres

2018-09-18 Thread Fabio Pardi
Hi Nicola, I tried to reproduce the problem using pgbouncer 1.8.1 from RPM on CentOS 7 and (an almost equal to) your configuration file but I m not able tobring it to the same error-state. Your problem might be tied either to the way you compiled it, or to some package installed/reconfigured

Max open files

2018-09-18 Thread Job
Dear all, i am using Bind-DLZ with postgresql and i am experiencing some response problem with a number of concurrent queries above 1000 (about). We use named pipe to connect from Bind DLZ. I noticed that Postgresql 9.6.1 is launched with a max open files. Could be this the problem? How can i

Re: Code of Conduct

2018-09-18 Thread Tom Lane
Stephen Frost writes: > I would ask that you, and anyone else who has a suggestion for how to > improve or revise the CoC, submit your ideas to the committee by > email'ing c...@postgresql.org. > As was discussed previously, the current CoC isn't written in stone and > it will be changed and

Re: Code of Conduct

2018-09-18 Thread Chris Travers
On Tue, Sep 18, 2018 at 8:35 PM Tom Lane wrote: > Stephen Frost writes: > > I would ask that you, and anyone else who has a suggestion for how to > > improve or revise the CoC, submit your ideas to the committee by > > email'ing c...@postgresql.org. > > As was discussed previously, the current

Re: [GENERAL] optimising the pl/pgsql function

2018-09-18 Thread David G. Johnston
On Tue, Sep 18, 2018 at 11:37 AM, VENKTESH GUTTEDAR < venkteshgutte...@gmail.com> wrote: > Can we replace the for loop with something else? > A query probably - depending on what the function does and, in particular, whether dynamic SQL is required. David J.

[GENERAL] optimising the pl/pgsql function

2018-09-18 Thread VENKTESH GUTTEDAR
Hello, We are running a pretty big plsql function, we are fetching data from some tables based on certain conditions. And using that data in a for loop within the function. the problem we are facing is when the no of records are more the function ction is taking too much time, is there a

Re: Select into table%ROWTYPE failed

2018-09-18 Thread marcelo
Ohh, you are right! Thank you! On 18/09/2018 14:10 , Tom Lane wrote: marcelo writes: What was wrong in the first approach? plpgsql's "SELECT INTO" expects a one-for-one match between the output columns of the SELECT and the columns of the INTO destination. So I'd expect something like this

Re: Code of Conduct

2018-09-18 Thread James Keener
> > You may dislike the outcome, but it was not ignored. I can accept that I don't like the outcome, but I can point to maybe a dozen people in the last exchange worried about the CoC being used to further political goals, and the only response was "well, the CoC Committee will handle it

Select into table%ROWTYPE failed

2018-09-18 Thread marcelo
I´m testing a trigger function in a 9.4 installation. It´s for bill number assignation, but with a twist: there are various numbering ranges. This ranges are defined by a text code, a minimum and maximum. Every bill have some code taken from the set defined in a specific table

Re: Code of Conduct

2018-09-18 Thread Chris Travers
On Tue, Sep 18, 2018 at 4:35 PM Tomas Vondra wrote: > On 09/18/2018 01:47 PM, James Keener wrote: > > > following a long consultation process > > > > It's not a consultation if any dissenting voice is simply ignored. > > Don't sugar-coat or politicize it like this -- it was rammed down > >

Re: Select into table%ROWTYPE failed

2018-09-18 Thread Tom Lane
marcelo writes: > What was wrong in the first approach? plpgsql's "SELECT INTO" expects a one-for-one match between the output columns of the SELECT and the columns of the INTO destination. So I'd expect something like this to work: DECLARE ranger billnumberrange%ROWTYPE; BEGIN SELECT *

Re: Code of Conduct

2018-09-18 Thread Stephen Frost
Greetings, * Chris Travers (chris.trav...@gmail.com) wrote: > I said I would stand aside my objections after the last point I mentioned > them but I did not feel that my particular objection and concern with > regard to one specific sentence added got much of a hearing. This being > said, it is

Why the sql is not executed in parallel mode

2018-09-18 Thread jimmy
Why the sql is not executed in parallel mode, does the sql has some problem? with sql1 as (select a.* from snaps a where a.f_date between to_date('2018-03-05', '-MM-dd') and to_date('2018-03-11', '-MM-dd') ), sql2 as (select '1' as pId, PM_TO as pValue, type_code as typeCode,

how to know whether query data from memory after pg_prewarm

2018-09-18 Thread jimmy
I use select pg_prewarm('table1','read','main') to load data of table1 into the memory. when I use select count(1) from table1 group by aa to query data. I find the speed of query is not fast, I wonder whether it query data from memory. And it is slower than Oracle, both of Oracle and

Re: Why the sql is not executed in parallel mode

2018-09-18 Thread Thomas Munro
On Wed, Sep 19, 2018 at 1:53 PM jimmy wrote: > > Why the sql is not executed in parallel mode, does the sql has some problem? > with sql1 as Hello Jimmy, WITH is the problem. From the manual[1]: "The following operations are always parallel restricted. Scans of common table expressions

Re: how to know whether query data from memory after pg_prewarm

2018-09-18 Thread Thomas Munro
On Wed, Sep 19, 2018 at 1:35 PM jimmy wrote: > I use select pg_prewarm('table1','read','main') to load data of table1 into > the memory. > when I use select count(1) from table1 group by aa to query data. > I find the speed of query is not fast, I wonder whether it query data from > memory. >

Re: Code of Conduct

2018-09-18 Thread James Keener
> following a long consultation process It's not a consultation if any dissenting voice is simply ignored. Don't sugar-coat or politicize it like this -- it was rammed down everyone's throats. That is core's right, but don't act as everyone's opinions and concerns were taken into

Re: Code of Conduct

2018-09-18 Thread Tomas Vondra
On 09/18/2018 01:47 PM, James Keener wrote: > following a long consultation process It's not a consultation if any dissenting voice is simply ignored. Don't sugar-coat or politicize it like this -- it was rammed down everyone's throats. That is core's right, but don't act as everyone's

Code of Conduct

2018-09-18 Thread Dave Page
The PostgreSQL Core team are pleased to announce that following a long consultation process, the project’s Code of Conduct (CoC) has now been finalised and published at https://www.postgresql.org/about/policies/coc/. Please take time to read and understand the CoC, which is intended to ensure

Advice on machine specs for growth

2018-09-18 Thread Rory Campbell-Lange
[I sent this to the performance list a couple of days ago and received no replies. Apologies for the cross-post] We are looking to upgrade our current database server infrastructure so that it is suitable for the next 3 years or so. Presently we have two physical servers with the same specs:

Re: Issues with compiling libpq 9.1.2 with Visual C++

2018-09-18 Thread Tom Lane
=?iso-8859-1?Q?Nordstr=F6m_Thomas?= writes: > Toolset: vc141 (Visual Studio 2017) > I'm having trouble compiling version 9.1.2 of libpq with Visual C++. That's going to be ... exciting. I don't think we promise to support VS2017 even yet; the latest VS patches I can remember seeing were for

Re: Advice on machine specs for growth

2018-09-18 Thread Laurenz Albe
Rory Campbell-Lange wrote: > We are looking to upgrade our current database server infrastructure so > that it is suitable for the next 3 years or so. > > We envisage needing about 800GB of primary database storage in the next > three years, with 1000 databases in the cluster. 1000 is a lot, but