Re: array must have even number of elements

2018-09-20 Thread Susan Hurst
Thanks, everyone! I get it now. It's not just an array but an hstore array. I changed my code to include the original values so now it works: -- new will be substituted for $1 during execution with using clause l_query_string := 'select ($1 #= hstore(array[' || l_orig_list || '],' ||

Re: Code of Conduct

2018-09-20 Thread Bruce Momjian
On Thu, Sep 20, 2018 at 05:20:55PM +0200, Chris Travers wrote: > I suspect most of us could probably get behind the groups listed in the > antidiscrimination section of the European Charter of Fundamental Rights at > least as a compromise. > > Quoting the  English version: > > "Any

Re: array must have even number of elements

2018-09-20 Thread Pavel Stehule
Hi čt 20. 9. 2018 v 19:55 odesílatel Susan Hurst < susan.hu...@brookhurstdata.com> napsal: > > Why must an array have an even number of elements? I need to use a > trigger function on any table, some of which may have an odd number of > columns that I want to cleanse before inserting/updating.

Re: help with startup slave after pg_rewind

2018-09-20 Thread Michael Paquier
On Wed, Sep 19, 2018 at 10:29:44PM +, Dylan Luong wrote: > After promoting slave to master, I completed a pg_rewind of the slave > (old master) to the new master. But when I try to start the slave I am > getting the following error. > > I tried to run pg_rewind again, but now it says I cannot

Re: Code of Conduct

2018-09-20 Thread Stephen Cook
On 2018-09-20 16:13, Bruce Momjian wrote: > On Thu, Sep 20, 2018 at 05:20:55PM +0200, Chris Travers wrote: >> I suspect most of us could probably get behind the groups listed in the >> antidiscrimination section of the European Charter of Fundamental Rights at >> least as a compromise. >> >>

Out of Memory

2018-09-20 Thread greigwise
Hello, I'm running postgres 9.6.10 on Centos 7. Seeing the occasional out of memory error trying to run a query. In the logs I see something like this: Grand total: 462104832 bytes in 795 blocks; 142439136 free (819860 chunks); 319665696 used 2018-09-20 18:08:01 UTC 5ba3e1a2.7a8a dbname

Re: Out of Memory

2018-09-20 Thread Paul Carlucci
My first two guesses are ulimit or numa. numactl --hardware will show your how many nodes your box has and if you're exhausting any of them. On Thu, Sep 20, 2018, 6:11 PM greigwise wrote: > Hello, I'm running postgres 9.6.10 on Centos 7. Seeing the occasional out > of memory error trying to

Re: Out of Memory

2018-09-20 Thread Tom Lane
greigwise writes: > Hello, I'm running postgres 9.6.10 on Centos 7. Seeing the occasional out > of memory error trying to run a query. In the logs I see something like > this: > Grand total: 462104832 bytes in 795 blocks; 142439136 free (819860 chunks); > 319665696 used > 2018-09-20 18:08:01

Re: Out of Memory

2018-09-20 Thread greigwise
ulimit -a for the postgres user shows memory unlimited. numactl --hardware gives command not found. Thanks again. Greig -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Advice on machine specs for growth

2018-09-20 Thread Rory Campbell-Lange
On 18/09/18, Laurenz Albe (laurenz.a...@cybertec.at) wrote: > 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

Re: Replicate Tables from SAP (DB2/HANA) to PostgreSQL

2018-09-20 Thread Thomas Güttler
Am 20.09.2018 um 04:19 schrieb bricklen: On Tue, Sep 18, 2018 at 11:31 PM Thomas Güttler mailto:guettl...@thomas-guettler.de>> wrote: Hi, is it possible to replicate some tables from SAP to PostgreSQL? At the moment there are two underlaying database systems. Some run DB2 and

Re: Pgbouncer and postgres

2018-09-20 Thread Fabio Pardi
I tried to compile 1.8.1 on my (now) up to date Centos 7 and everything went ok. I can run pgbouncer and login to it. this is the relevant part of the diff between config.log files > config.status:1112: lib/usual/config.h is unchanged 4676c4689 < CPPFLAGS='' --- > CPPFLAGS='

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
On Thu, Sep 20, 2018 at 3:41 PM Durgamahesh Manne wrote: > hi > as per your request > i ran below query without distinct > > select sub_head."vchSubmittersCode" ,rec."vchFileName" , > rec."vchCusipFundIDSubFundID" , rec."vchFundUnitPrice" , > sub_head."vchValuationDate" ,rec."vchAdvisorLabel"

Re: Regrading brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
On Thu, Sep 20, 2018 at 3:12 PM Durgamahesh Manne wrote: > > > Hi > > As per your suggestion > > > i ran explain analyse for distinct query > > the size of the table1 is 30mb > the size of the table2 is 368kb > > EXPLAIN ANALYZE select distinct sub_head."vchSubmittersCode" > ,rec."vchFileName"

RE: Advice on machine specs for growth

2018-09-20 Thread Steven Winfield
> Disable memory overcommit and set swappiness to 0 on database servers. Just to be clear, are you suggesting (on linux) setting overcommit_memory = 2 but leaving overcommit_ratio alone, which defaults to 50%? I’ve tried setting them to 2 and 0% respectively in the past and it didn’t end well…

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
On Thu, Sep 20, 2018 at 3:22 PM Andreas Kretschmer wrote: > Hi, > > > the problem is there: > > > Am 20.09.2018 um 11:48 schrieb Durgamahesh Manne: > > Unique (cost=5871873.64..6580630.73 rows=7400074 width=89) (actual > > time=326397.551..389515.863 rows=370 loops=1) > >

Re: Not debuginfo rpm for postgresql96-server package?

2018-09-20 Thread Zexuan Luo
Finally I found that postgresql96-debuginfo actually contains the debuginfo of the postgres executable. So the postgresql96-debuginfo package contains both the debuginfo of the client and the debuginfo of the server. Zexuan Luo 于2018年9月20日周四 下午6:28写道: > > Hello all: > Is there any debuginfo rpm

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Andreas Kretschmer
Am 20.09.2018 um 13:11 schrieb Durgamahesh Manne: Query was executed at less time without distinct As well as query was taking around 7 minutes to complete execution with distinct  select   distinct  sub_head."vchSubmittersCode" ,rec."vchFileName" , rec."vchCusipFundIDSubFundID" ,

Re: Regrading brin_index on required column of the table

2018-09-20 Thread Alban Hertroys
On Thu, 20 Sep 2018 at 11:42, Durgamahesh Manne wrote: ... > | -> Sort (cost=5871873.64..5973124.65 rows=40500405 width=89) (actual > time=326397.550..372470.846 rows=4050 loops=1) > | > | Sort Key: sub_head."vchSubmittersCode",

Re: Code of Conduct

2018-09-20 Thread Chris Travers
On Wed, Sep 19, 2018 at 11:31 PM Bruce Momjian wrote: > On Wed, Sep 19, 2018 at 11:24:29AM +1000, Julian Paul wrote: > > It's overly long and convoluted. > > > > "inclusivity" Is a ideologue buzzword of particular individuals that > offer > > very little value apart from excessive policing of

Re: Converting to number with given format

2018-09-20 Thread Gabriel Furstenheim Milerud
Hi Ken, Thanks a lot, that's a cool idea and I think that it will cover my needs. On Thu, 20 Sep 2018 at 02:04, Ken Tanzer wrote: > On Wed, Sep 19, 2018 at 6:34 AM Gabriel Furstenheim Milerud < > furstenh...@gmail.com> wrote: > > Maybe that is not possible with numbers? To say in a format

Re: Regrading brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
Hi As per your suggestion i ran explain analyse for distinct query the size of the table1 is 30mb the size of the table2 is 368kb EXPLAIN ANALYZE select distinct sub_head."vchSubmittersCode" ,rec."vchFileName" , rec."vchCusipFundIDSubFundID" , rec."vchFundUnitPrice" ,

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Andreas Kretschmer
Hi, the problem is there: Am 20.09.2018 um 11:48 schrieb Durgamahesh Manne:  Unique  (cost=5871873.64..6580630.73 rows=7400074 width=89) (actual time=326397.551..389515.863 rows=370 loops=1)                                                 | |   ->  Sort  (cost=5871873.64..5973124.65

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
hi as per your request i ran below query without distinct select sub_head."vchSubmittersCode" ,rec."vchFileName" , rec."vchCusipFundIDSubFundID" , rec."vchFundUnitPrice" , sub_head."vchValuationDate" ,rec."vchAdvisorLabel" from table1 rec join table2 sub_head on

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
On Wed, Sep 19, 2018 at 8:27 PM Andreas Kretschmer wrote: > > > Am 19.09.2018 um 16:43 schrieb Durgamahesh Manne: > > > > > > On Wed, Sep 19, 2018 at 8:02 PM Andreas Kretschmer > > mailto:andr...@a-kretschmer.de>> wrote: > > > > > > > > Am 19.09.2018 um 15:51 schrieb Durgamahesh Manne: > >

Not debuginfo rpm for postgresql96-server package?

2018-09-20 Thread Zexuan Luo
Hello all: Is there any debuginfo rpm package for postgresql96-server package? I searched it on https://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/ and also via 'yum search', but not matched package found. There is the postgresql96-debuginfo package, but it is for the postgresql96 package (the

Re: Advice on machine specs for growth

2018-09-20 Thread Laurenz Albe
Steven Winfield wrote: > Just to be clear, are you suggesting (on linux) setting overcommit_memory = 2 > but leaving overcommit_ratio alone, which defaults to 50%? > I’ve tried setting them to 2 and 0% respectively in the past and it didn’t > end well… Yes, vm.overcommit_memory = 2 As for

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
On Thu, Sep 20, 2018 at 7:25 PM Durgamahesh Manne wrote: > > > On Thu, Sep 20, 2018 at 6:39 PM Andreas Kretschmer < > andr...@a-kretschmer.de> wrote: > >> >> >> Am 20.09.2018 um 13:11 schrieb Durgamahesh Manne: >> > Query was executed at less time without distinct >> > >> > As well as query was

Re: *Regarding brin_index on required column of the table

2018-09-20 Thread Durgamahesh Manne
On Thu, Sep 20, 2018 at 6:39 PM Andreas Kretschmer wrote: > > > Am 20.09.2018 um 13:11 schrieb Durgamahesh Manne: > > Query was executed at less time without distinct > > > > As well as query was taking around 7 minutes to complete execution > > with distinct > > > > select distinct

array must have even number of elements

2018-09-20 Thread Susan Hurst
Why must an array have an even number of elements? I need to use a trigger function on any table, some of which may have an odd number of columns that I want to cleanse before inserting/updating. Is there a workaround for this? ERROR: array must have even number of elements SQL state: