Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 10:36 PM, Andrew Gierth wrote: > Peter> (I simply operate on the raw Datum when hashing for hyperLogLog, > Peter> in a similar manner to the text opclass, which is safe with 8 > Peter> byte datums + pass by value int64). > > But this paragraph makes no sense, and the cod

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> By the way, there was another bug in this that I forgot to point Peter> out, but removed, here: "removed"? looks just the same in either of your patches... Peter> + if (nss->estimating) Peter> + { Peter> + uint32 tmp = (uint32)result; Peter>

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-03-23 Thread Kyotaro HORIGUCHI
Hello, > > Patch 0001 needs changes for OIDs since my patch was > > committed. The attached is compatible with current master. > > Thanks. I plan to submit a new version of the patch in a few days, with > significant progress in various directions. I'll have to rebase to > current master before s

Re: [HACKERS] How about to have relnamespace and relrole?

2015-03-23 Thread Kyotaro HORIGUCHI
At Thu, 19 Mar 2015 11:17:34 -0300, Alvaro Herrera wrote in <20150319141734.ge3...@alvh.no-ip.org> > Kyotaro HORIGUCHI wrote: > > > # I hope the CF app to add the author as a receiver when issueing > > # a mail. > > Moreover, it should add everyone who was in To, From, CC in the email > that th

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-23 Thread Ashutosh Bapat
On Mon, Mar 23, 2015 at 7:46 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > I might be only one objecting here but ... > > On Sat, Mar 21, 2015 at 12:45 AM, Tom Lane wrote: > >> My Salesforce colleagues noticed some tests flapping as a result of > table > >> CHECK constraints not always being

Re: [HACKERS] Display of multi-target-table Modify plan nodes in EXPLAIN

2015-03-23 Thread Ashutosh Bapat
On Mon, Mar 23, 2015 at 8:00 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > On Mon, Mar 23, 2015 at 10:51 AM, Tom Lane wrote: > >> Hm? We don't have scan nodes that read more than one table, so I'm > >> not following your point. > > > But in the text output you gave > > Update on public.pt1

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Sun, Mar 22, 2015 at 1:01 PM, Andrew Gierth wrote: > So here's a version 3 patch: By the way, there was another bug in this that I forgot to point out, but removed, here: + if (nss->estimating) + { + uint32 tmp = (uint32)result; + addHyperLogLog(&nss->abbr_card, hash_uint32(tmp)); + } And he

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Alvaro Herrera
Michael Paquier wrote: > On Mon, Mar 23, 2015 at 11:07 PM, Tom Lane wrote: > > Alvaro Herrera writes: > >> Michael Paquier wrote: > >>> So a worker does not see changes in postgresql.conf once it is run and > >>> processes a database, no? The launcher does run ProcessConfigFile() > >>> when SIGHU

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 9:12 PM, Peter Geoghegan wrote: > On Mon, Mar 23, 2015 at 6:02 PM, Robert Haas wrote: >> Well, not committing the patch at all would be even less invasive. >> But that's true of any patch, so I don't think being less invasive can >> be the prime goal. Of course it's usual

Re: [HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-23 Thread Andrew Gierth
> "Michael" == Michael Paquier writes: >> MAJORVERSION is defined in Makefile.global as included by PGXS, fwiw. Michael> Well, my point is to have something on which you can directly Michael> apply maths on without changing its shape ;) There's this trick: # if version < 9.1 ... ifeq ($

Re: [HACKERS] Materialiation is slower than non-materialized

2015-03-23 Thread Rajeev rastogi
On 23 March 2015 21:39, Robert Haas > On Mon, Mar 23, 2015 at 6:01 AM, Rajeev rastogi > wrote: > > The cost of re-scan of SeqScan node is considered to be same scan of > > SeqScan node, which always assumes that the records is fetched from > > disk and hence disk access cost is added (As we don’

Re: [HACKERS] inherit support for foreign tables

2015-03-23 Thread Etsuro Fujita
On 2015/03/23 2:57, Tom Lane wrote: > I've committed this with some substantial rearrangements, notably: Thanks for taking the time to committing the patch! Thanks for the work, Hanada-san! And thank you everyone for the reviews and comments, especially Ashutosh, Horiguchi-san and Noah! > * I f

Re: [HACKERS] printing table in asciidoc with psql

2015-03-23 Thread Michael Paquier
On Tue, Mar 24, 2015 at 8:44 AM, Bruce Momjian wrote: > Notice the added 'l' next to the '<'. Updated patch attached. Any > other issues? Ah, right. That's a good catch and your patch fixes the issue. Still, there are problems with the tuple-only mode and the expanded mode. For example using thi

Re: [HACKERS] Typos in CREATE TABLE doc

2015-03-23 Thread Etsuro Fujita
On 2015/03/21 5:58, Bruce Momjian wrote: On Thu, Nov 13, 2014 at 08:30:49PM +0900, Etsuro Fujita wrote: (2014/11/13 20:07), Heikki Linnakangas wrote: On 11/13/2014 12:45 PM, Etsuro Fujita wrote: It seems to me there are typos in the reference page for CREATE TABLE. The structure of the sente

Re: [HACKERS] Incorrect comment in tablecmds.c

2015-03-23 Thread Etsuro Fujita
On 2015/03/20 21:31, Bruce Momjian wrote: On Thu, Oct 23, 2014 at 06:29:07PM +0900, Etsuro Fujita wrote: I don't think that the lock level mentioned in the following comment in MergeAttributes() in tablecmds.c is right, since that that function has opened the relation with ShareUpdateExclusiveLo

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Michael Paquier
On Mon, Mar 23, 2015 at 11:07 PM, Tom Lane wrote: > Alvaro Herrera writes: >> Michael Paquier wrote: >>> So a worker does not see changes in postgresql.conf once it is run and >>> processes a database, no? The launcher does run ProcessConfigFile() >>> when SIGHUP shows up though. > >> Maybe this

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 6:02 PM, Robert Haas wrote: > Well, not committing the patch at all would be even less invasive. > But that's true of any patch, so I don't think being less invasive can > be the prime goal. Of course it's usually better to be less invasive > and get the same benefits, but

Re: [HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-23 Thread Michael Paquier
On Tue, Mar 24, 2015 at 4:06 AM, Andrew Gierth wrote: >> "Michael" == Michael Paquier writes: > > Michael> Hi all, > Michael> When working on extensions or packaging, one can do some > Michael> grep-ing on pg_config.h to get PG_VERSION_NUM to do > Michael> version-related operations. An e

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 8:54 PM, Peter Geoghegan wrote: > On Mon, Mar 23, 2015 at 5:47 PM, Robert Haas wrote: >> I agree with you. Fewer and fewer people are running 32-bit systems >> these days, but there must surely be more people running 32-bit >> systems than there are running with DEC_DIGIT

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 4:03 PM, Peter Geoghegan wrote: > I must also admit that I am somewhat annoyed here, since Andrew has > questioned essentially ever revision I've proposed to both of the sort > support patches he wrote, and in a rather bellicose way. They were > mostly very modest revisions

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 5:47 PM, Robert Haas wrote: > I agree with you. Fewer and fewer people are running 32-bit systems > these days, but there must surely be more people running 32-bit > systems than there are running with DEC_DIGITS != 4. I think it's a > stretch to say that DEC_DIGITS != 4

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 5:41 PM, Andrew Gierth wrote: >> "Peter" == Peter Geoghegan writes: > > Peter> As I said, I don't really consider that my patch is a rewrite, > Peter> especially V4, which changes nothing substantive except removing > Peter> 32-bit support. > > Well, that's a hell o

Re: [HACKERS] printing table in asciidoc with psql

2015-03-23 Thread Bruce Momjian
On Sun, Mar 22, 2015 at 08:06:17PM +0900, Michael Paquier wrote: > > I have updated the attached patch to do as you suggested. Please also > > test the \x output. Thanks. > > Indeed. If I use a specific column name like this one, I am seeing > problems with the expanded mode: > =# create table "

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 4:08 PM, Andrew Gierth wrote: > The earlier comment should make it clear that all the DEC_DIGITS != 4 > support is "historical". I didn't consider it appropriate to actually > rip out all the #ifs; I simply tried to make it clear where the > landmines were if anyone wanted

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> Your V3 has obsolete comments here: Peter> + nss = palloc(sizeof(NumericSortSupport)); Peter> + Peter> + /* Peter> + * palloc a buffer for handling unaligned packed values in addition to Peter> + * the support struct Peter> + */ Peter> + ns

Re: [HACKERS] recovery_target_time ignored ?

2015-03-23 Thread David Steele
On 3/23/15 12:42 AM, Venkata Balaji N wrote: > Hi, > > Assuming that this might require a patch, i am posting this in > pgsql-hackers. Apologies, if this is not the appropriate mailing list to > start this discussion. > > I performed a PITR and saw the below message in the log file is a bit > con

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-03-23 Thread Tomas Vondra
On 23.3.2015 23:02, Jim Nasby wrote: > On 3/22/15 2:59 PM, Tomas Vondra wrote: >> On 22.3.2015 20:25, Fabien COELHO wrote: >> >>> I guess Tomas put 2 formats because there was 2 time formats >>> to begin with, but truncating/rouding if someone really wants >>> seconds is quite easy. >> >> Yes, that

Re: [HACKERS] logical column ordering

2015-03-23 Thread Tomas Vondra
On 23.3.2015 22:53, Jeff Janes wrote: > On Mon, Mar 23, 2015 at 11:52 AM, Tomas Vondra > > Sorry, the 23/2 one is the one I meant. I got confused over which of > the emails listed as having an attachment but no patch was the one that > actually had a patch. (If the commitfest app can't correctly

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-03-23 Thread Jim Nasby
On 3/22/15 2:59 PM, Tomas Vondra wrote: On 22.3.2015 20:25, Fabien COELHO wrote: > >>>The proposed format is much simpler to manage in a script, and if you're >>>interested in runtime, its formatting would be less expensive than %t >>>and >>>%m. >> >>Maybe, but do we really need two? How abou

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 2:41 PM, Andrew Gierth wrote: > Peter> As I said, I don't really consider that my patch is a rewrite, > Peter> especially V4, which changes nothing substantive except removing > Peter> 32-bit support. > > Well, that's a hell of an "except". I guess you're right. I'm wi

Re: [HACKERS] logical column ordering

2015-03-23 Thread Tomas Vondra
On 23.3.2015 18:30, Andres Freund wrote: >>> >>> I think it fairly can be marked as "returned with feedback" for >>> now? That will eventually be the end result, yes. If it's time to do that now, or leave the patch in the CF and only bounce it at the end, I don't know. >> >> ... which means that

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> As I said, I don't really consider that my patch is a rewrite, Peter> especially V4, which changes nothing substantive except removing Peter> 32-bit support. Well, that's a hell of an "except". Here's my main arguments for why 32bit support sho

Re: [HACKERS] logical column ordering

2015-03-23 Thread Josh Berkus
On 03/23/2015 02:32 PM, Tomas Vondra wrote: > Oh, right. Yes, tracking time since the last status change like this > might be useful, although my experience is that many patches are stuck > at some status yet there was a long discussion on the list ... Not sure > if that counts as 'stalled'. "Tim

Re: [HACKERS] logical column ordering

2015-03-23 Thread Tomas Vondra
On 23.3.2015 19:52, Peter Geoghegan wrote: > On Mon, Mar 23, 2015 at 11:50 AM, Tomas Vondra > wrote: >> Not sure how that's supposed to improve the situation? Also, when you >> change the status to 'stalled', it only makes it more difficult to >> identify why it was stalled (was it waiting for aut

Re: [HACKERS] proposal: plpgsql - Assert statement

2015-03-23 Thread Jim Nasby
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Note that pgcrypto is failing 3 tests, same as in master. The new st

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-23 Thread Jim Nasby
On 3/21/15 12:49 PM, Dmitry Dolgov wrote: > Frankly, I think the whole proposal needs to be rethought with an eye towards supporting and preserving nested elements instead of trying to just flatten everything out. Can you pls show me few examples what do you mean exactly? All the comments oth

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-23 Thread Andres Freund
On 2015-03-22 12:54:37 -0700, Josh Berkus wrote: > On 03/22/2015 06:45 AM, Andres Freund wrote: > > FWIW, I think that's a myth. One I heard various versions of by now. As > > long as the OSs page size (4kb nearly everywhere) is different from > > postgres' (8kb) you can have torn pages. Even if in

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 12:52 PM, Robert Haas wrote: > As > + * with IEEE-754, we use an exponent without a sign (a 7-bit exponent > + * without a sign). > > As to the beginning of this sentence, bringing IEEE-754 into this > discussion doesn't clarify anything in my mind. I don't think most > pe

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
they are two different approaches > to the same problem. In this type of situation, I generally post my > patch with a name like "topicofthepatch-rmh-v1.patch" or > "topicofthepatch-rmh-20150323.patch", putting my initials in there to > show that this is my version o

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 3:07 PM, Peter Geoghegan wrote: > On Mon, Mar 23, 2015 at 12:04 PM, Robert Haas wrote: >> In my opinion, Andrew's version is far clearer. Peter's version is >> full of jargon that I can't understand. I could probably figure it >> out with a few hours and a search engine,

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
em all back and call that "v4". Instead, you should take the hint: these are not "versions" of the same patch - they are two different approaches to the same problem. In this type of situation, I generally post my patch with a name like "topicofthepatch-rmh-v1.patch"

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-23 Thread Andres Freund
On March 23, 2015 8:00:04 PM GMT+01:00, Fabien COELHO wrote: > >> Guys, I don't see this theoretical discussion going anywhere. I think >> it's time to simply implement this and evaluate it on a bigger >> machine. > >Sure. I was kind of hoping that someone else would implement it, >because >I'm

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 12:04 PM, Robert Haas wrote: > In my opinion, Andrew's version is far clearer. Peter's version is > full of jargon that I can't understand. I could probably figure it > out with a few hours and a search engine, but that really shouldn't be > necessary. Really? Andrew's

Re: [HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-23 Thread Andrew Gierth
> "Michael" == Michael Paquier writes: Michael> Hi all, Michael> When working on extensions or packaging, one can do some Michael> grep-ing on pg_config.h to get PG_VERSION_NUM to do Michael> version-related operations. An example of that is the Makefile Michael> of plv8 using --include-

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Sat, Mar 21, 2015 at 2:58 AM, Andrew Gierth wrote: > Peter> I don't really buy it, either way. In what sense is a NULL value > Peter> ever abbreviated? It isn't. Whatever about the cost model, > Peter> that's the truth of the matter. There is always going to be a > Peter> sort of tension in

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-23 Thread Fabien COELHO
Guys, I don't see this theoretical discussion going anywhere. I think it's time to simply implement this and evaluate it on a bigger machine. Sure. I was kind of hoping that someone else would implement it, because I'm a reviewer on this one, and I do not have the bigger machine at hand eith

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-03-23 Thread Alvaro Herrera
Sawada Masahiko wrote: > I tied to look into latest patch, but got following error. > > masahiko [pg_audit] $ LANG=C make > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels > -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing > -fwrapv -

Re: [HACKERS] logical column ordering

2015-03-23 Thread Tomas Vondra
On 23.3.2015 18:08, Jeff Janes wrote: > On Mon, Mar 23, 2015 at 10:01 AM, Robert Haas > wrote: > > There was a patch here, which in the commit fest is "hidden" behind > other non-attachments in the same email: > > Attachment (randomize.sql >

Re: [HACKERS] logical column ordering

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 11:50 AM, Tomas Vondra wrote: > Not sure how that's supposed to improve the situation? Also, when you > change the status to 'stalled', it only makes it more difficult to > identify why it was stalled (was it waiting for author or a review?). > > What might be done is track

Re: [HACKERS] logical column ordering

2015-03-23 Thread Tomas Vondra
Hi, On 23.3.2015 18:07, Peter Geoghegan wrote: > On Mon, Mar 23, 2015 at 10:01 AM, Robert Haas wrote: >> I'm a little confused as to the status of this patch. It's marked as >> Waiting on Author in the CommitFest application, and the last patch >> version was posted in December. The fact that t

Re: [HACKERS] logical column ordering

2015-03-23 Thread Tomas Vondra
Hi, On 23.3.2015 18:01, Robert Haas wrote: > On Thu, Mar 12, 2015 at 9:57 AM, Alvaro Herrera > wrote: >> However, there's a difference between making a query silently given >> different results, and breaking it completely forcing the user to >> re-study how to write it. I think the latter is bet

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-03-23 Thread David Steele
On 3/23/15 1:39 PM, Sawada Masahiko wrote: > On Tue, Mar 24, 2015 at 1:40 AM, David Steele wrote: >> >> I have prepared a patch that brings event triggers and deparse back to >> pg_audit based on the Alvaro's dev/deparse branch at >> git://git.postgresql.org/git/2ndquadrant_bdr.git (commit 0447fc5

Re: [HACKERS] PageRepairFragmentation performance

2015-03-23 Thread Peter Geoghegan
On Tue, Feb 3, 2015 at 4:11 AM, Heikki Linnakangas wrote: > On 01/31/2015 01:49 AM, Peter Geoghegan wrote: >> The refactoring patch certainly looks very reasonable. > > Ok, committed the refactoring part for now. Thanks for the review. Where are we on the rest of this, Heikki? -- Peter Geoghega

Re: [HACKERS] pg_rewind in contrib

2015-03-23 Thread Heikki Linnakangas
On 03/14/2015 02:31 PM, Amit Kapila wrote: Getting below linking error with Asserts enabled in Windows build. 1>xlogreader.obj : error LNK2019: unresolved external symbol ExceptionalCondition referenced in function XLogReadRecord 1>.\Debug\pg_rewind\pg_rewind.exe : fatal error LNK1120: 1 unresol

Re: [HACKERS] proposal GSoC 2015 task: Allow access to the database via HTTP

2015-03-23 Thread Вадим Горбачев
thanks for information! I understood your idea. I originally assumed such structure: https://drive.google.com/file/d/0B4zY7CurvRqwWE9EZUpBU1FpSTQ/view?usp=sharing https://drive.google.com/file/d/0B4zY7CurvRqwSWpCRjlNVWdlMWc/view?usp=sharing https://drive.google.com/file/d/0B4zY7CurvRqwa0RYQ2tldWY5

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-03-23 Thread Sawada Masahiko
On Tue, Mar 24, 2015 at 1:40 AM, David Steele wrote: > Thanks for the review, Abhijit. > > On 3/23/15 1:31 AM, Abhijit Menon-Sen wrote: >> At 2015-02-24 11:22:41 -0500, da...@pgmasters.net wrote: >>> >>> Patch v3 is attached. >>> + >>> +/* Function execution */ >>> +LOG_MISC = (1 << 5), >>

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-03-23 Thread Peter Geoghegan
On Thu, Mar 19, 2015 at 1:02 PM, Robert Haas wrote: > I think this is pretty lousy. The reasons why the user wants things > that way is because they created a UNIQUE index and it got bloated > somehow with lots of dead tuples. So they made a new UNIQUE index on > the same column and then they're

Re: [HACKERS] logical column ordering

2015-03-23 Thread Andres Freund
On 2015-03-23 14:19:50 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > On 2015-03-23 13:01:48 -0400, Robert Haas wrote: > > > I'm a little confused as to the status of this patch. It's marked as > > > Waiting on Author in the CommitFest application, and the last patch > > > version was pos

Re: [HACKERS] logical column ordering

2015-03-23 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-03-23 13:01:48 -0400, Robert Haas wrote: > > I'm a little confused as to the status of this patch. It's marked as > > Waiting on Author in the CommitFest application, and the last patch > > version was posted in December. > > I think it fairly can be marked as "retu

Re: [HACKERS] logical column ordering

2015-03-23 Thread Andres Freund
On 2015-03-23 13:01:48 -0400, Robert Haas wrote: > I'm a little confused as to the status of this patch. It's marked as > Waiting on Author in the CommitFest application, and the last patch > version was posted in December. I think it fairly can be marked as "returned with feedback" for now? Gre

Fwd: [HACKERS] proposal GSoC 2015 task: Allow access to the database via HTTP

2015-03-23 Thread Вадим Горбачев
>> What is a benefit of this implementation for Postgres community? It will be possible to clean this task from https://wiki.postgresql.org/wiki/Todo >> It can be interesting as well integrated project to Postgres - implemented in C as background worker (if it possible) I.e. as I understand http_a

Re: [HACKERS] logical column ordering

2015-03-23 Thread Jeff Janes
On Mon, Mar 23, 2015 at 10:01 AM, Robert Haas wrote: > On Thu, Mar 12, 2015 at 9:57 AM, Alvaro Herrera > wrote: > > However, there's a difference between making a query silently given > > different results, and breaking it completely forcing the user to > > re-study how to write it. I think the

Re: [HACKERS] logical column ordering

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 10:01 AM, Robert Haas wrote: > I'm a little confused as to the status of this patch. It's marked as > Waiting on Author in the CommitFest application, and the last patch > version was posted in December. The fact that the new CommitFest > application encourages people to

Re: [HACKERS] logical column ordering

2015-03-23 Thread Robert Haas
On Thu, Mar 12, 2015 at 9:57 AM, Alvaro Herrera wrote: > However, there's a difference between making a query silently given > different results, and breaking it completely forcing the user to > re-study how to write it. I think the latter is better. In that light > we should just drop attnum as

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Sun, Mar 22, 2015 at 1:01 PM, Andrew Gierth wrote: > The substance of the code is unchanged from my original patch. I didn't > add diagnostic output to numeric_abbrev_abort, see my separate post > about the suggestion of a GUC for that. I don't think that V2 really changed the substance, whic

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-03-23 Thread David Steele
Thanks for the review, Abhijit. On 3/23/15 1:31 AM, Abhijit Menon-Sen wrote: > At 2015-02-24 11:22:41 -0500, da...@pgmasters.net wrote: >> >> Patch v3 is attached. >> + >> +/* Function execution */ >> +LOG_MISC = (1 << 5), > > The comment above LOG_MISC should be changed. Fixed. > More

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-23 Thread Andres Freund
Hi, Guys, I don't see this theoretical discussion going anywhere. I think it's time to simply implement this and evaluate it on a bigger machine. It can't take very long to implement tosimply just write to one file instead of the multiple files as now. The posix guaranteed fprintf locking should a

Re: [HACKERS] proposal GSoC 2015 task: Allow access to the database via HTTP

2015-03-23 Thread Pavel Stehule
Hi 2015-03-22 23:28 GMT+01:00 Вадим Горбачев : > Hi Team. > > I would like to solve a problem of "Allow access to the database via > HTTP". > > But before drawing up the demand in GSOC I wanted to consult here. > Therefore I will be grateful to comments from attendees here! > > 1. I think, will b

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-23 Thread Fabien COELHO
Hello, Yes but for a third thread (each on a physical core) it will be 1/40 + 1/40 and so on up to roughly 40/40 for 40 cores. That is why I proposed a formula which depends on the number of threads. [...] But they aren't constant only close. It may or not show up in this case but I've noti

Re: [HACKERS] proposal GSoC 2015 task: Allow access to the database via HTTP

2015-03-23 Thread Вадим Горбачев
as prompted to me, already there are solutions of this task: pgrest and OpenResty Then it isn't clear why this task is in TODO the sheet https://wiki.postgresql.org/wiki/Todo... Prompt what exactly is understood as "Allow access to the database via HTTP"? >From what party to approach this task? Wh

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-23 Thread Pavel Stehule
Hi 2015-03-15 16:09 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > other variant, I hope better than previous. We can introduce new long > > option "--strict". With this active option, every pattern specified by -t > > option have to have identifies exactly only one table. It can be used for >

Re: [HACKERS] Materialiation is slower than non-materialized

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 6:01 AM, Rajeev rastogi wrote: > The cost of re-scan of SeqScan node is considered to be same scan of SeqScan > node, which always assumes that the records is fetched from disk and hence > disk access cost is added (As we don’t know really how much memory will be > availabl

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 11:02 AM, Kevin Grittner wrote: > Jim Nasby wrote: >> On 3/20/15 9:44 AM, Kevin Grittner wrote: >>> Robert Haas wrote: On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian wrote: > > OK, are we up for changing the default pg_ctl shutdown method > for 9.5, ("smart

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Tom Lane
Jeff Janes writes: > On Mon, Mar 23, 2015 at 7:07 AM, Tom Lane wrote: >> Yeah, checking for SIGHUP in the worker outer loop (ie once per table) >> seems like a reasonable thing. > Could it be done more often? Maybe every time it is about to do a > cost_delay sleep? That sounds risky from here.

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-23 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > On Fri, Mar 20, 2015 at 4:37 PM, Tom Lane wrote: We could fix it by, say, having CheckConstraintFetch() sort the constraints by name after loading them. > Isn't better do this to read pg_constraint in name order? > - conscan = systa

Re: [HACKERS] Zero-padding and zero-masking fixes for to_char(float)

2015-03-23 Thread Bruce Momjian
On Mon, Mar 23, 2015 at 12:36:25AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Sun, Mar 22, 2015 at 12:46:08PM -0400, Noah Misch wrote: > >> I recommend adding a "configure" test to use our snprintf.c replacements if > >> sprintf("%.*f", 65536, 999.0) gives unexpected output. >

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Jeff Janes
On Mon, Mar 23, 2015 at 7:07 AM, Tom Lane wrote: > Alvaro Herrera writes: > > Michael Paquier wrote: > >> So a worker does not see changes in postgresql.conf once it is run and > >> processes a database, no? The launcher does run ProcessConfigFile() > >> when SIGHUP shows up though. > > > Maybe

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-23 Thread Fabrízio de Royes Mello
On Fri, Mar 20, 2015 at 4:37 PM, Tom Lane wrote: > > =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > > On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan wrote: > >> On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane wrote: > >>> We could fix it by, say, having CheckConstraintFetch() sort the > >>> co

Re: [HACKERS] barnacle (running CLOBBER_CACHE_RECURSIVELY) seems stuck since November

2015-03-23 Thread Robert Haas
On Sun, Mar 22, 2015 at 6:26 PM, Tomas Vondra wrote: > This time I've however checked the log, and what caught my eye is that > the last log message is from November. There were regular messages until > then (a few messages per day), but since Nov 19 there's nothing. I'd try strace on the backend

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-23 Thread Kevin Grittner
Jim Nasby wrote: > On 3/20/15 9:44 AM, Kevin Grittner wrote: >> Robert Haas wrote: >>> On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian wrote: OK, are we up for changing the default pg_ctl shutdown method for 9.5, ("smart" to "fast"), [...]? >>> >>> I'm up for it. I think it's long ove

Re: [HACKERS] Display of multi-target-table Modify plan nodes in EXPLAIN

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 10:26 AM, Tom Lane wrote: > Heikki Linnakangas writes: >> On 03/22/2015 03:02 AM, Tom Lane wrote: >>> In a green field we might choose to solve this by refactoring the output >>> so that it's logically ... >>> but I think that ship has sailed. Changing the logical structu

Re: [HACKERS] "snapshot too large" error when initializing logical replication (9.4)

2015-03-23 Thread Andres Freund
On 2015-03-20 08:41:38 -0400, Bruce Momjian wrote: > On Mon, Nov 17, 2014 at 03:52:38PM +0100, Andres Freund wrote: > > On 2014-11-17 11:51:54 -0300, Alvaro Herrera wrote: > > > Andres Freund wrote: > > > > Hi, > > > > > > > > On 2014-10-25 18:09:36 -0400, Steve Singer wrote: > > > > > I sometimes

Re: [HACKERS] [GENERAL] [pgadmin-support] Issue with a hanging apply process on the replica db after vacuum works on primary

2015-03-23 Thread Vladimir Borodin
> 20 марта 2015 г., в 18:00, Vladimir Borodin написал(а): > >> >> 19 марта 2015 г., в 20:30, Sergey Shchukin > > написал(а): >> >> 17.03.2015 13:22, Sergey Shchukin пишет: >>> 05.03.2015 11:25, Jim Nasby пишет: On 2/27/15 5:11 AM, Sergey Shchukin wrote: >>>

Re: [HACKERS] Display of multi-target-table Modify plan nodes in EXPLAIN

2015-03-23 Thread Tom Lane
Ashutosh Bapat writes: > On Mon, Mar 23, 2015 at 10:51 AM, Tom Lane wrote: >> Hm? We don't have scan nodes that read more than one table, so I'm >> not following your point. > But in the text output you gave > Update on public.pt1 (cost=0.00..321.05 rows=3541 width=46) >Update on public.pt

Re: [HACKERS] recovery_min_delay casting problems lead to busy looping

2015-03-23 Thread Andres Freund
On 2015-03-23 10:25:48 -0400, Robert Haas wrote: > On Mon, Mar 23, 2015 at 10:18 AM, Andres Freund > wrote: > > recoveryApplyDelay() does: > > TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime, > > &secs, µsecs); > > > > if (secs <= 0 && microsecs <

Re: [HACKERS] Display of multi-target-table Modify plan nodes in EXPLAIN

2015-03-23 Thread Tom Lane
Heikki Linnakangas writes: > On 03/22/2015 03:02 AM, Tom Lane wrote: >> In a green field we might choose to solve this by refactoring the output >> so that it's logically ... >> but I think that ship has sailed. Changing the logical structure of >> EXPLAIN output like this would break clients tha

Re: [HACKERS] recovery_min_delay casting problems lead to busy looping

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 10:18 AM, Andres Freund wrote: > recoveryApplyDelay() does: > TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime, > &secs, µsecs); > > if (secs <= 0 && microsecs <= 0) > break; > > elog(DEBUG2, "recovery apply delay

[HACKERS] recovery_min_delay casting problems lead to busy looping

2015-03-23 Thread Andres Freund
Hi, recoveryApplyDelay() does: TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime, &secs, µsecs); if (secs <= 0 && microsecs <= 0) break; elog(DEBUG2, "recovery apply delay %ld seconds, %d milliseconds", secs, microsecs / 1000);

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-23 Thread Tom Lane
Ashutosh Bapat writes: > I might be only one objecting here but ... > On Sat, Mar 21, 2015 at 12:45 AM, Tom Lane wrote: >> My Salesforce colleagues noticed some tests flapping as a result of table >> CHECK constraints not always being enforced in the same order; ie, if a >> tuple insertion/update

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Tom Lane
Alvaro Herrera writes: > Michael Paquier wrote: >> So a worker does not see changes in postgresql.conf once it is run and >> processes a database, no? The launcher does run ProcessConfigFile() >> when SIGHUP shows up though. > Maybe this is something that we should change. Yeah, checking for SIG

[HACKERS] proposal GSoC 2015 task: Allow access to the database via HTTP

2015-03-23 Thread Вадим Горбачев
Hi Team. I would like to solve a problem of "Allow access to the database via HTTP". But before drawing up the demand in GSOC I wanted to consult here. Therefore I will be grateful to comments from attendees here! 1. I think, will better use access to DB through the stand-alone program which not

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-03-23 Thread Fabien COELHO
The proposed format is much simpler to manage in a script, and if you're interested in runtime, its formatting would be less expensive than %t and %m. Maybe, but do we really need two? How about just %M? I guess Tomas put 2 formats because there was 2 time formats to begin with, but trunca

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-23 Thread didier
Hi, On Sat, Mar 21, 2015 at 8:42 PM, Fabien COELHO wrote: > > Hello Didier, > >>> If fprintf takes p = 0.025 (1/40) of the time, then with 2 threads the >>> collision probability would be about 1/40 and the delayed thread would be >>> waiting for half this time on average, so the performance impa

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Alvaro Herrera
Michael Paquier wrote: > In AutoVacWorkerMain, I am reading the following: > > * Currently, we don't pay attention to postgresql.conf changes that > * happen during a single daemon iteration, so we can ignore SIGHUP. > */ > pqsignal(SIGHUP, SIG_IGN); > > So a w

[HACKERS] Fwd: proposal GSoC 2015 task: Allow access to the database via HTTP

2015-03-23 Thread Вадим Горбачев
Hi Team. I would like to solve a problem of "Allow access to the database via HTTP". But before drawing up the demand in GSOC I wanted to consult here. Therefore I will be grateful to comments from attendees here! 1. I think, will better use access to DB through the stand-alone program which not

Re: [HACKERS] SSL renegotiation

2015-03-23 Thread Florian Weimer
On 02/23/2015 04:01 PM, Albe Laurenz wrote: >> I think you could remove renegotiation from PostgreSQL as long as you >> offer something better than RC4 in the TLS handshake. > > I'd say it is best to wait if and how OpenSSL change their API when they > implement TLS 1.3. > > I'd vote against rem

[HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-23 Thread Michael Paquier
Hi all, When working on extensions or packaging, one can do some grep-ing on pg_config.h to get PG_VERSION_NUM to do version-related operations. An example of that is the Makefile of plv8 using --include-dir with perl and a regex: https://github.com/plv8/plv8/blob/master/Makefile Wouldn't it be mo

[HACKERS] Materialiation is slower than non-materialized

2015-03-23 Thread Rajeev rastogi
During my routine work, I observed that incase of execution of plan having inner node of NLJ as materialized node (on top of SeqScan) is slower compared to non-materialized SeqScan node. This happens only if "Work_mem is not big enough to hold all tuples in memory." To make test easy and faster