Re: [GENERAL] How to ALTER EXTENSION name OWNER TO new_owner ?

2017-08-10 Thread Colin 't Hart
Would this be a relatively easy patch for a beginning contributor? If so, I wouldn't mind having a go. /Colin On 9 August 2017 at 21:37, Melvin Davidson wrote: > > > On Wed, Aug 9, 2017 at 3:32 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Wed, Aug

Re: [GENERAL] Curious planning decision

2017-08-10 Thread Tom Lane
Steve Rogerson writes: > The date is "today" at the time of writing. The table is analyzed, to pg > should "know" that date1 <= "today" hence there is no data beyond today. It doesn't seem to, given this: >-> Bitmap Index Scan on ctable_date1

[GENERAL] Curious planning decision

2017-08-10 Thread Steve Rogerson
I have a query that behaves in an odd way, specifically it does different things depending on if I use "=" or ">=" : mydb=# explain analyze select count(*) from ctable c where c.date1 >= '2017-08-10' and c.col2 = '637' and c.col3 = 'TEXT3' and c.col4 not in ('TEXT4');

Re: [GENERAL] foreign key with char and varchar

2017-08-10 Thread Tom Lane
Thomas Poty writes: > I wanted to test if char and varchar can be cross-referenced as foreign > key. So i did these tests : > ... > I thought the columns referring and referenced had to be the same data type > with the same length but it seems not to be the case. Looking

Re: [GENERAL] pg_stat_statements -- Historical Query

2017-08-10 Thread Julien Rouhaud
On Thu, Aug 10, 2017 at 6:41 AM, Michael Paquier wrote: > On Thu, Aug 10, 2017 at 6:23 AM, anand086 wrote: >> I was looking for a way to maintain historical query details in Postgres to >> answer questions like >> >> What was the sql call rate

[GENERAL] foreign key with char and varchar

2017-08-10 Thread Thomas Poty
Hi world, I wanted to test if char and varchar can be cross-referenced as foreign key. So i did these tests : 1) Can a varchar(7) reference a char(2) ? PostgreSQL accepts it create table t1 (id char(2) primary key, data text); create table t2 (id char(2) primary key, data text, id_t1 varchar(7)

[GENERAL] pglogical repo

2017-08-10 Thread armand pirvu
Hi folks Looking at the installatoion steps and the yum repositories sudo yum install http://packages.2ndquadrant.com/pglogical/yum-repo-rpms/pglogical-rhel-1.0-2.noarch.rpm [ ] pglogical-rhel-1.0-1.noarch.rpm [ ] pglogical-rhel-1.0-2.noarch.rpm [ ] pglogical-rhel-1.0-3.noarch.rpm

[GENERAL] pglogical sync

2017-08-10 Thread armand pirvu
Hi folks A question about pglogical sync I have a setup with a schema named myschema. All works well but looking at sync pglogical.alter_subscription_resynchronize_table(subscription_name name, relation regclass) Resynchronize one existing table. WARNING: This function will truncate the

[GENERAL] Re: could not find function "pglogical_table_data_filtered" in file "/usr/pgsql-9.5/lib/pglogical.so"

2017-08-10 Thread armand pirvu
Looks like upgrading from 9.5.2 to 9.5.8 did it I had another box on 9.5.5 and it was broken there too > On Aug 10, 2017, at 2:13 PM, armand pirvu wrote: > > So I ventured in uninstalling the >

Re: [GENERAL] pglogical sync

2017-08-10 Thread armand pirvu
I see says the blind man Looked in the code and correct the syntax and ran on subscriber all good > On Aug 10, 2017, at 12:29 PM, armand pirvu wrote: > > Hi folks > > A question about pglogical sync > > I have a setup with a schema named myschema. > All works well

[GENERAL] sequence used on null value or get the max value for a column whith concurrency

2017-08-10 Thread marcelo
In some table, I have a bigint column which at the app level can be null. Call it "DocumentNumber", and of course is not the PK. In most cases, the applications give some value to the column. But sometimes, the value remains null, expecting the backend or someone assign it a unique value.

Re: [GENERAL] sequence used on null value or get the max value for a column whith concurrency

2017-08-10 Thread David G. Johnston
Thinking aloud... On Thu, Aug 10, 2017 at 3:05 PM, marcelo wrote: > In some table, I have a bigint column which at the app level can be null. > Call it "DocumentNumber", and of course is not the PK. > In most cases, the applications give some value to the column. > >

Re: [GENERAL] pglogical repo

2017-08-10 Thread John R Pierce
On 8/10/2017 10:30 AM, armand pirvu wrote: Looking at the installatoion steps and the yum repositories sudo yum installhttp://packages.2ndquadrant.com/pglogical/yum-repo-rpms/pglogical-rhel-1.0-2.noarch.rpm [ ] pglogical-rhel-1.0-1.noarch.rpm [ ] pglogical-rhel-1.0-2.noarch.rpm [ ]

Re: [GENERAL] pglogical repo

2017-08-10 Thread armand pirvu
Updated since last time I installed it Okay Will go move from 1.0.2 to 1.0.3 to stay up to date Thks > On Aug 10, 2017, at 1:21 PM, John R Pierce wrote: > > On 8/10/2017 10:30 AM, armand pirvu wrote: >> Looking at the installatoion steps and the yum repositories >>

Re: [GENERAL] pg_stat_statements -- Historical Query

2017-08-10 Thread Julien Rouhaud
On Thu, Aug 10, 2017 at 3:00 PM, Melvin Davidson wrote: > > If you are interested in historical stats, you would probably fair a lot > better with PgBadger. It is free > and highly customizable. In addition to SQL call rates at different times, > it provides analysis of >

[GENERAL] could not find function "pglogical_table_data_filtered" in file "/usr/pgsql-9.5/lib/pglogical.so"

2017-08-10 Thread armand pirvu
So I ventured in uninstalling the https://www.2ndquadrant.com/en/resources/pglogical/pglogical-installation-instructions/ yum install

Re: [GENERAL] pg_stat_statements -- Historical Query

2017-08-10 Thread Melvin Davidson
On Thu, Aug 10, 2017 at 3:30 AM, Julien Rouhaud wrote: > On Thu, Aug 10, 2017 at 6:41 AM, Michael Paquier > wrote: > > On Thu, Aug 10, 2017 at 6:23 AM, anand086 wrote: > >> I was looking for a way to maintain historical query

Re: [GENERAL] About using IMCS moldule

2017-08-10 Thread John McKown
On Tue, Aug 8, 2017 at 4:31 AM, 송기훈 wrote: > Hi, I'm trying to use imcs module to store table space in memory. > But, It dose not work with 9.6 version anymore. > Releasing 9.6, lwlockassign() function has been deleted, cause of some > issues. > > So, What I want to ask you