[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] 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 worker

[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

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 removing

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-23 Thread Kevin Grittner
Jim Nasby jim.na...@bluetreble.com wrote: On 3/20/15 9:44 AM, Kevin Grittner wrote: Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian br...@momjian.us wrote: OK, are we up for changing the default pg_ctl shutdown method for 9.5, (smart to fast), [...]?

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 t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com 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

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 t...@sss.pgh.pa.us wrote: Heikki Linnakangas hlinn...@iki.fi 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.

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 tomas.von...@2ndquadrant.com 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

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 t...@sss.pgh.pa.us wrote: =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan p...@heroku.com wrote: On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: We could

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 and...@2ndquadrant.com wrote: recoveryApplyDelay() does: TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime, secs, microsecs); if (secs = 0

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

2015-03-23 Thread Tom Lane
Heikki Linnakangas hlinn...@iki.fi 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

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

2015-03-23 Thread Tom Lane
Ashutosh Bapat ashutosh.ba...@enterprisedb.com writes: On Mon, Mar 23, 2015 at 10:51 AM, Tom Lane t...@sss.pgh.pa.us 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

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 r...@simply.name написал(а): 19 марта 2015 г., в 20:30, Sergey Shchukin shchukin@gmail.com mailto:shchukin@gmail.com написал(а): 17.03.2015 13:22, Sergey Shchukin пишет: 05.03.2015 11:25, Jim Nasby пишет: On 2/27/15 5:11 AM, Sergey

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 get the error

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com 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,

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

2015-03-23 Thread Tom Lane
Ashutosh Bapat ashutosh.ba...@enterprisedb.com writes: I might be only one objecting here but ... On Sat, Mar 21, 2015 at 12:45 AM, Tom Lane t...@sss.pgh.pa.us wrote: My Salesforce colleagues noticed some tests flapping as a result of table CHECK constraints not always being enforced in the

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

2015-03-23 Thread didier
Hi, On Sat, Mar 21, 2015 at 8:42 PM, Fabien COELHO coe...@cri.ensmp.fr 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

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

[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

[HACKERS] recovery_min_delay casting problems lead to busy looping

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

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 and...@2ndquadrant.com wrote: recoveryApplyDelay() does: TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime, secs, microsecs); if (secs = 0 microsecs = 0) break; elog(DEBUG2,

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 br...@momjian.us 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] Order of enforcement of CHECK constraints?

2015-03-23 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Fri, Mar 20, 2015 at 4:37 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] Table-level log_autovacuum_min_duration

2015-03-23 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: On Mon, Mar 23, 2015 at 7:07 AM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 11:02 AM, Kevin Grittner kgri...@ymail.com wrote: Jim Nasby jim.na...@bluetreble.com wrote: On 3/20/15 9:44 AM, Kevin Grittner wrote: Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian br...@momjian.us wrote: OK, are we up for

Re: [HACKERS] inherit support for foreign tables

2015-03-23 Thread Ashutosh Bapat
On Mon, Mar 23, 2015 at 12:09 AM, Robert Haas robertmh...@gmail.com wrote: On Sun, Mar 22, 2015 at 1:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: [ fdw-inh-8.patch ] I've committed this with some substantial rearrangements, notably: I'm

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 rajeev.rast...@huawei.com 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

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 t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com 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

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?

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 posted in

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Sat, Mar 21, 2015 at 2:58 AM, Andrew Gierth and...@tao11.riddles.org.uk 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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
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 of the patch, not the original author's and that it may or may not be endorsed by the original author. Having 26

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 12:52 PM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] logical column ordering

2015-03-23 Thread Robert Haas
On Thu, Mar 12, 2015 at 9:57 AM, Alvaro Herrera alvhe...@2ndquadrant.com 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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 12:04 PM, Robert Haas robertmh...@gmail.com 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.

Re: [HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-23 Thread Andrew Gierth
Michael == Michael Paquier michael.paqu...@gmail.com 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

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 coe...@cri.ensmp.fr 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,

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
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 of the patch, not the original author's and that it may or may not be endorsed

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 3:07 PM, Peter Geoghegan p...@heroku.com wrote: On Mon, Mar 23, 2015 at 12:04 PM, Robert Haas robertmh...@gmail.com 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

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

2015-03-23 Thread Peter Geoghegan
On Sun, Mar 22, 2015 at 11:38 PM, Heikki Linnakangas hlinn...@iki.fi wrote: If we have promised that, I think we should break the promise. No application should depend on the details of EXPLAIN output, even if it's in JSON/YAML/XML format. EXPLAIN is used by humans, and by tools like pgAdmin

[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,

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

2015-03-23 Thread Heikki Linnakangas
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 Multi-Table Update [ Update Target: pt1 Plan: (seq scan on pt1 here) ]

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 tomas.von...@2ndquadrant.com 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

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'. Time

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

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

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 about just %M? I

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Andrew Gierth
Peter == Peter Geoghegan p...@heroku.com 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

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's why I added

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

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 no useful

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 2:41 PM, Andrew Gierth and...@tao11.riddles.org.uk 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

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] 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 Вадим Горбачев bmsd...@gmail.com: 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,

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

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

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 fundamentally,

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_api

Re: [HACKERS] logical column ordering

2015-03-23 Thread Jeff Janes
On Mon, Mar 23, 2015 at 10:01 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 12, 2015 at 9:57 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: However, there's a difference between making a query silently given different results, and breaking it completely forcing the user to

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?

Re: [HACKERS] logical column ordering

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 10:01 AM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Sun, Mar 22, 2015 at 1:01 PM, Andrew Gierth and...@tao11.riddles.org.uk 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

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 returned with

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 robertmh...@gmail.com 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

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 alvhe...@2ndquadrant.com 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

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 robertmh...@gmail.com 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.

Re: [HACKERS] PageRepairFragmentation performance

2015-03-23 Thread Peter Geoghegan
On Tue, Feb 3, 2015 at 4:11 AM, Heikki Linnakangas hlinnakan...@vmware.com 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?

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 -g

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

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 da...@pgmasters.net 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] 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

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. 1xlogreader.obj : error LNK2019: unresolved external symbol ExceptionalCondition referenced in function XLogReadRecord 1.\Debug\pg_rewind\pg_rewind.exe : fatal error LNK1120: 1

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 da...@pgmasters.net 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

Re: [HACKERS] logical column ordering

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 11:50 AM, Tomas Vondra tomas.von...@2ndquadrant.com 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?).

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 robertmh...@gmail.com mailto:robertmh...@gmail.com 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] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 4:08 PM, Andrew Gierth and...@tao11.riddles.org.uk 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

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 5

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 6:02 PM, Robert Haas robertmh...@gmail.com 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

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 and...@tao11.riddles.org.uk wrote: Michael == Michael Paquier michael.paqu...@gmail.com 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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Andrew Gierth
Peter == Peter Geoghegan p...@heroku.com 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 +

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 4:03 PM, Peter Geoghegan p...@heroku.com 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

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 confusing.

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Peter Geoghegan
On Mon, Mar 23, 2015 at 5:47 PM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 8:54 PM, Peter Geoghegan p...@heroku.com wrote: On Mon, Mar 23, 2015 at 5:47 PM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 5:41 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Peter == Peter Geoghegan p...@heroku.com 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

Re: [HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-23 Thread Andrew Gierth
Michael == Michael Paquier michael.paqu...@gmail.com 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

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 t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com 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

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 rajeev.rast...@huawei.com 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

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

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

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 this

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

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-23 Thread Robert Haas
On Mon, Mar 23, 2015 at 9:12 PM, Peter Geoghegan p...@heroku.com wrote: On Mon, Mar 23, 2015 at 6:02 PM, Robert Haas robertmh...@gmail.com 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