Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-20 Thread MauMau
From: "Christian Ullrich" OK, here is the first draft against current master. It builds on Windows with VS 2012 and on FreeBSD 10 with clang 3.3. I ran the regression tests on Windows, they all pass. The changed behavior is limited to Windows, where it now silently ignores Ctrl-C and Ctrl-Break

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-20 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> [ counting bits in ACLs ] > > Wouldn't it be fairly painless to widen AclMode from 32 bits to 64, > and thereby double the number of available bits? Thanks for commenting on

Re: [HACKERS] Audit of logout

2014-06-20 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/13/2014 07:29 AM, Tom Lane wrote: > Fujii Masao writes: >> On Thu, Jun 12, 2014 at 8:51 PM, Fujii Masao >> wrote: >>> Some users enable log_disconnections in postgresql.conf to >>> audit all logouts. But since log_disconnections is defined with

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-20 Thread Tom Lane
Stephen Frost writes: > * Robert Haas (robertmh...@gmail.com) wrote: >> [ counting bits in ACLs ] Wouldn't it be fairly painless to widen AclMode from 32 bits to 64, and thereby double the number of available bits? That code was all written before we required platforms to have an int64 primitive

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-20 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jun 18, 2014 at 10:40 AM, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> Technically, there are 4 bits left, and that's what we need for > >> separate privileges. > > > > I'd really hate to chew them all up

Re: [HACKERS] Window function optimisation, allow pushdowns of items matching PARTITION BY clauses

2014-06-20 Thread Vik Fearing
I've had a chance to look at this and here is my review. On 04/14/2014 01:19 PM, David Rowley wrote: > I've included the updated patch with some regression tests. The first thing I noticed is there is no documentation, but I don't think we document such things outside of the release notes, so tha

Re: [HACKERS] Re: [BUGS] BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby

2014-06-20 Thread Andres Freund
On 2014-06-20 17:38:16 -0400, Alvaro Herrera wrote: > Jeff Janes wrote: > > > 12538 2014-06-17 12:10:02.925 PDT:LOG: JJ deleting 0xb66b20 5183 > > 12498 UPDATE 2014-06-17 12:10:03.188 PDT:DETAIL: Could not open file > > "pg_multixact/members/5183": No such file or directory. > > 12561 UPDATE 20

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-06-20 Thread John Lumby
Thanks Fujii ,   that is a bug   --   an #ifdef  USE_PREFETCH is missing in heapam.c    (maybe several) I will fix it in the next patch version. I also appreciate it is not easy to review the patch. There are really 4 (or maybe 5) parts :    .   async io (librt functions) .   buffer ma

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Tom Lane
Andres Freund writes: > On 2014-06-20 17:29:33 -0400, Tom Lane wrote: >> I think Alvaro was complaining that it's alone in lacking this comment: >> /* This following index is not used for a cache and is not unique */ >> >> But TBH, I don't think those comments are worth much. I'd rather get >> r

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Alvaro Herrera
Andres Freund wrote: > On 2014-06-20 16:50:15 -0400, Alvaro Herrera wrote: > > I think most, if not all, the unique indexes declared are part of a > > syscache. I don't think we allow those to be null, so in effect those > > columns are already not nullable. > > Non-unique indexes in indexing.h

[HACKERS] Re: [BUGS] BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby

2014-06-20 Thread Alvaro Herrera
Jeff Janes wrote: > 12538 2014-06-17 12:10:02.925 PDT:LOG: JJ deleting 0xb66b20 5183 > 12498 UPDATE 2014-06-17 12:10:03.188 PDT:DETAIL: Could not open file > "pg_multixact/members/5183": No such file or directory. > 12561 UPDATE 2014-06-17 12:10:04.473 PDT:DETAIL: Could not open file > "pg_mul

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Andres Freund
On 2014-06-20 17:29:33 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-06-20 16:50:15 -0400, Alvaro Herrera wrote: > >> Non-unique indexes in indexing.h > >> already bear a standard comment that they are not used for syscache. > >> The only exception was added recently in f01d1ae3a10401

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Tom Lane
Andres Freund writes: > On 2014-06-20 16:50:15 -0400, Alvaro Herrera wrote: >> Non-unique indexes in indexing.h >> already bear a standard comment that they are not used for syscache. >> The only exception was added recently in f01d1ae3a104019: >> DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Andres Freund
On 2014-06-20 16:50:15 -0400, Alvaro Herrera wrote: > Tom Lane wrote: > > > The idea I'm toying with right now is to additionally mark as not nullable > > any column referenced in a DECLARE_UNIQUE_INDEX command in > > catalog/indexing.h. But I've not looked through that set carefully; it's > > co

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Alvaro Herrera
Tom Lane wrote: > The idea I'm toying with right now is to additionally mark as not nullable > any column referenced in a DECLARE_UNIQUE_INDEX command in > catalog/indexing.h. But I've not looked through that set carefully; it's > conceivable that we actually have some indexed catalog columns tha

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Tom Lane
Robert Haas writes: >> On Jun 20, 2014, at 10:01 AM, Tom Lane wrote: >> Some of my Salesforce colleagues are looking into making every system >> catalog be declared with a true primary key. They came across the >> fact that pg_seclabel and pg_shseclabel are declared with unique >> indexes that i

Re: [HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Robert Haas
> On Jun 20, 2014, at 10:01 AM, Tom Lane wrote: > > Some of my Salesforce colleagues are looking into making every system > catalog be declared with a true primary key. They came across the > fact that pg_seclabel and pg_shseclabel are declared with unique > indexes that include the "provider" c

Re: [HACKERS] [bug fix] Memory leak in dblink

2014-06-20 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/19/2014 03:38 PM, MauMau wrote: > From: "Joe Conway" >> Fair enough -- this patch does it at that level in >> materializeQueryResult() > > I'm in favor of this. TBH, I did this at first, but I was afraid > this would be rejected due to the re

Re: [HACKERS] JSON and Postgres Variable Queries

2014-06-20 Thread Andrew Dunstan
On 06/20/2014 11:26 AM, Joey Caughey wrote: I’m having an issue with JSON requests in Postgres and was wondering if anyone had an answer. I have an orders table with a field called “json_data”. In the json data there is a plan’s array with an id value in them. { "plan”: { “id”: “1” } } } I c

[HACKERS] Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

2014-06-20 Thread Tom Lane
Some of my Salesforce colleagues are looking into making every system catalog be declared with a true primary key. They came across the fact that pg_seclabel and pg_shseclabel are declared with unique indexes that include the "provider" column, but that column does not get marked as NOT NULL durin

Re: [HACKERS] modify custom variables

2014-06-20 Thread Tom Lane
Vincent Mora writes: > If I understand the problem correctly, on upgrate (ALTER EXTENSION), the > old postgis library is already loaded, the old spatial functions are > replaced by new ones pointing to the new postgis library, a call to > DefineCustomStringVariable is made and: > ERROR:

[HACKERS] modify custom variables

2014-06-20 Thread Vincent Mora
Hi, When creating postgis extension, a call to DefineCustomStringVariable is made to define postgis.backend. An assign hook allows to change the library used by spatial functions whith a: SET postgis.backend = 'sfcgal'; -- or 'geos' Everything work fine execept when upgrading postgis.

Re: [HACKERS] Is analyze_new_cluster.sh still useful?

2014-06-20 Thread Christoph Berg
Re: Jeff Janes 2014-06-20 > On Wed, Jun 18, 2014 at 8:41 AM, Christoph Berg > wrote: > > Hi, > > > > now that we have vacuumdb --all --analyze-in-stages in 9.4, wouldn't > > it make sense to get rid of the analyze_new_cluster.sh file which > > pg_upgrade writes? The net content is a single line

Re: [HACKERS] Is analyze_new_cluster.sh still useful?

2014-06-20 Thread Jeff Janes
On Wed, Jun 18, 2014 at 8:41 AM, Christoph Berg wrote: > Hi, > > now that we have vacuumdb --all --analyze-in-stages in 9.4, wouldn't > it make sense to get rid of the analyze_new_cluster.sh file which > pg_upgrade writes? The net content is a single line which could as > well be printed by pg_upg

Re: [HACKERS] replication commands and log_statements

2014-06-20 Thread Michael Paquier
On Fri, Jun 20, 2014 at 10:48 PM, Tom Lane wrote: > Fujii Masao writes: >> OK, I've just implemented the patch (attached) which does this, i.e., >> redefines >> log_statement as a list. Thanks to the patch, log_statement can be set >> to "none", >> "ddl", "mod", "dml", "all", and any combination

Re: [HACKERS] [WIP] showing index maintenance on EXPLAIN

2014-06-20 Thread Haribabu Kommi
On Thu, May 8, 2014 at 10:00 AM, Jaime Casanova wrote: > Hi, > > This patch implements $subject only when ANALYZE and VERBOSE are on. > I made it that way because for years nobody seemed interested in this > info (at least no one did it) so i decided that maybe is to much > information for most pe

Re: [HACKERS] replication commands and log_statements

2014-06-20 Thread Tom Lane
Fujii Masao writes: > OK, I've just implemented the patch (attached) which does this, i.e., > redefines > log_statement as a list. Thanks to the patch, log_statement can be set > to "none", > "ddl", "mod", "dml", "all", and any combinations of them. The meanings of > "none", "ddl", "mod" and "all

Re: [HACKERS] Audit of logout

2014-06-20 Thread Fujii Masao
On Fri, Jun 13, 2014 at 11:29 PM, Tom Lane wrote: > Fujii Masao writes: >> On Thu, Jun 12, 2014 at 8:51 PM, Fujii Masao wrote: >>> Some users enable log_disconnections in postgresql.conf to audit all >>> logouts. >>> But since log_disconnections is defined with PGC_BACKEND, it can be changed >>

Re: [HACKERS] How to change the pgsql source code and build it??

2014-06-20 Thread Merlin Moncure
On Wed, Jun 18, 2014 at 12:50 PM, Shreesha wrote: > Well, the initdb issue looks to be resolved. Actually, after making the > changes as suggested by Kyotaro Horiguchi, I copied only initdb binary to my > platform and didn't copy all of them. Hence, the dependencies were still not > resolved and

Re: [HACKERS] Is analyze_new_cluster.sh still useful?

2014-06-20 Thread Christoph Berg
Re: Tom Lane 2014-06-18 <21034.1403110...@sss.pgh.pa.us> > Christoph Berg writes: > > now that we have vacuumdb --all --analyze-in-stages in 9.4, wouldn't > > it make sense to get rid of the analyze_new_cluster.sh file which > > pg_upgrade writes? The net content is a single line which could as >

Re: [HACKERS] replication commands and log_statements

2014-06-20 Thread Fujii Masao
On Thu, Jun 12, 2014 at 10:55 PM, Robert Haas wrote: > On Wed, Jun 11, 2014 at 7:42 AM, Magnus Hagander wrote: >>> Replication commands like IDENTIFY_COMMAND are not logged even when >>> log_statements is set to all. Some users who use log_statements to >>> audit *all* statements might dislike th

Re: [HACKERS] add line number as prompt option to psql

2014-06-20 Thread Jeevan Chalke
Hi Sawada Masahiko, I liked this feature. So I have reviewed it. Changes are straight forward and looks perfect. No issues found with make/make install/initdb/regression. However I would suggest removing un-necessary braces at if, as we have only one statement into it. if (++cur_line >= INT

Re: [HACKERS] inherit support for foreign tables

2014-06-20 Thread Kyotaro HORIGUCHI
Hello, Before continueing discussion, I tried this patch on the current head. This patch applies cleanly except one hunk because of a modification just AFTER it, which did no harm. Finally all regression tests suceeded. Attached is the rebased patch of v11 up to the current master. regards, --