Re: [GENERAL] PG 10 and perl

2017-09-29 Thread Andy Colson
On 09/29/2017 09:32 AM, Tom Lane wrote: Andy Colson writes: I started playing with 10, and cannot get it to use the right version of perl. I'll only use the system version: root@firefly:/usr/local/pg10/lib/postgresql# ldd plperl.so libperl.so =>

Re: [GENERAL] Converting inherited partitions into declarative ones

2017-09-29 Thread Victor Yegorov
2017-09-29 20:32 GMT+03:00 Victor Yegorov : > > Is it possible to avoid Full Scan here? I have TBs worth of data in > partitions, > so it'll takes ages to switch to the declarative partitioning the way > things stand now. > OK, looking at the source code helped — I need to

Re: [GENERAL] Converting inherited partitions into declarative ones

2017-09-29 Thread Melvin Davidson
On Fri, Sep 29, 2017 at 1:32 PM, Victor Yegorov wrote: > Greetings. > > I am looking into new partitioning of 10rc1 on a copy of a production > system. > And I'm having tough times with the full scan. > > Per documentation: > > It is possible to avoid this scan by adding a

[GENERAL] Converting inherited partitions into declarative ones

2017-09-29 Thread Victor Yegorov
Greetings. I am looking into new partitioning of 10rc1 on a copy of a production system. And I'm having tough times with the full scan. Per documentation: > It is possible to avoid this scan by adding a valid CHECK constraint to the table > that would allow only the rows satisfying the desired

Re: [GENERAL] COPY vs \COPY FROM PROGRAM $$ quoting difference?

2017-09-29 Thread Alexander Stoddard
On Fri, Sep 29, 2017 at 11:54 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Sep 29, 2017 at 9:27 AM, Alexander Stoddard < > alexander.stodd...@gmail.com> wrote: > >> I found what seems to be an odd difference between COPY and \copy parsing. >> > ​[...] > ​ > > >> COPY

Re: [GENERAL] COPY vs \COPY FROM PROGRAM $$ quoting difference?

2017-09-29 Thread David G. Johnston
On Fri, Sep 29, 2017 at 9:27 AM, Alexander Stoddard < alexander.stodd...@gmail.com> wrote: > I found what seems to be an odd difference between COPY and \copy parsing. > ​[...] ​ > COPY dest_table FROM PROGRAM $$ sed 's/x/y/' | etc... $$ > > To my surprise this worked with COPY but not \COPY

[GENERAL] COPY vs \COPY FROM PROGRAM $$ quoting difference?

2017-09-29 Thread Alexander Stoddard
I found what seems to be an odd difference between COPY and \copy parsing. I am using a bash pipeline of sed commands to clean up a source data file before importing it into a table. This works fine when working from the command line and piping the result to psql on STDIN. However I attempted

Re: [GENERAL] PG 10 and perl

2017-09-29 Thread Andy Colson
On 9/29/2017 9:28 AM, kbran...@pwhome.com wrote: Andy Colson wrote: In PG 9.5 this worked fine, and compiling and running PG used the 5.26 version of perl: root@firefly:/usr/local/pg95/lib/postgresql# ldd plperl.so libperl.so =>

Re: [GENERAL] PG 10 and perl

2017-09-29 Thread Tom Lane
Andy Colson writes: > I started playing with 10, and cannot get it to use the right version of > perl. I'll only use the system version: > root@firefly:/usr/local/pg10/lib/postgresql# ldd plperl.so > libperl.so => /usr/lib64/perl5/CORE/libperl.so (0x7fc9c67d4000)

Re: [GENERAL] PG 10 and perl

2017-09-29 Thread
>Andy Colson wrote: >In PG 9.5 this worked fine, and compiling and running PG used the 5.26 version >of perl: >root@firefly:/usr/local/pg95/lib/postgresql# ldd plperl.so > libperl.so => > /opt/perl5/perls/perl-5.26/lib/5.26.1/x86_64-linux-thread-multi/CORE/libperl.so >

Re: [GENERAL] Speed of conversion from int to bigint

2017-09-29 Thread Jehan-Guillaume (ioguix) de Rorthais
On Wed, 27 Sep 2017 11:31:54 +0200 Tomas Vondra wrote: > On 09/27/2017 10:08 AM, Jonathan Moules wrote: > > Hi, > > (Postgres 9.5 and 9.6) > > We have a table of about 650million rows. It's a partitioned table, with > > two "child" tables. We want to change its

Re: [GENERAL] pg_rewind copy so much data

2017-09-29 Thread Michael Paquier
On Fri, Sep 29, 2017 at 6:22 PM, Hung Phan wrote: > Thanks for your help. Do you have any more ideas about my case? I cannot > find any reason for that. If pg_rewind just examines WAL for changed blocks > from the common checkpoint, why did it copy all data ? As I

Re: [GENERAL] pg_rewind copy so much data

2017-09-29 Thread Hung Phan
Thanks for your help. Do you have any more ideas about my case? I cannot find any reason for that. If pg_rewind just examines WAL for changed blocks from the common checkpoint, why did it copy all data ? As I understand, the information in WAL about changes cannot cover all data in the database.