Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Heikki Linnakangas
On 04/22/2015 03:30 AM, Michael Paquier wrote: This is going to change a behavior that people are used to for a couple of releases. I would not mind having this patch do "archive_mode = on during recovery" => archive only segments generated by this node + the last partial segment on the old timel

Re: [HACKERS] Add pg_settings.pending_restart column

2015-04-21 Thread Michael Paquier
On Thu, Mar 5, 2015 at 12:04 PM, Peter Eisentraut wrote: > On 2/17/15 10:45 AM, Robert Haas wrote: >> You don't really need the "else" here, and in parallel cases: >> >> if (*conf->variable != newval) >> { >> +record->status |= GUC_

Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Heikki Linnakangas
On 04/22/2015 12:42 AM, Robert Haas wrote: On Tue, Apr 21, 2015 at 6:55 AM, Heikki Linnakangas wrote: On 04/21/2015 12:04 PM, Michael Paquier wrote: On Tue, Apr 21, 2015 at 4:38 PM, Heikki Linnakangas wrote: Note that even though we don't archive the partial last segment on the previous time

[HACKERS] Authenticating from SSL certificates

2015-04-21 Thread kee...@thebrocks.net
Hello, I'm looking into connection to postgres using authentication from client certificates. [1] The documentation states that the common name (aka CN) is read from the certificate and used as the user's login (aka auth_user). The problem is the common name is typically the user's full name. A f

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-04-21 Thread Kouhei Kaigai
Hanada-san, > I reviewed the Custom/Foreign join API patch again after writing a patch of > join > push-down support for postgres_fdw. > Thanks for your dedicated jobs, my comments are inline below. > Here, please let me summarize the changes in the patch as the result of my > review. > > * Ad

Re: [HACKERS] Idea: closing the loop for "pg_ctl reload"

2015-04-21 Thread Jan de Visser
On April 21, 2015 09:34:51 PM Jan de Visser wrote: > On April 21, 2015 09:01:14 PM Jan de Visser wrote: > > On April 21, 2015 07:32:05 PM Payal Singh wrote: ... snip ... > > Urgh. It appears you are right. Will fix. > > jan Attached a new attempt. This was one from the category 'I have no idea h

Re: [HACKERS] Idea: closing the loop for "pg_ctl reload"

2015-04-21 Thread Jan de Visser
On April 21, 2015 09:01:14 PM Jan de Visser wrote: > On April 21, 2015 07:32:05 PM Payal Singh wrote: > > I'm trying to review this patch and applied > > http://www.postgresql.org/message-id/attachment/37123/Let_pg_ctl_check_the > > _r esult_of_a_postmaster_config_reload.patch to postgres. gmake ch

Re: [HACKERS] Idea: closing the loop for "pg_ctl reload"

2015-04-21 Thread Jan de Visser
(Please don't top post) On April 21, 2015 07:32:05 PM Payal Singh wrote: > I'm trying to review this patch and applied > http://www.postgresql.org/message-id/attachment/37123/Let_pg_ctl_check_the_r > esult_of_a_postmaster_config_reload.patch to postgres. gmake check passed > but while starting pos

Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Michael Paquier
On Wed, Apr 22, 2015 at 6:42 AM, Robert Haas wrote: > > On Tue, Apr 21, 2015 at 6:55 AM, Heikki Linnakangas wrote: > > On 04/21/2015 12:04 PM, Michael Paquier wrote: > >> On Tue, Apr 21, 2015 at 4:38 PM, Heikki Linnakangas > >> wrote: > >>> Note that even though we don't archive the partial last

Re: [HACKERS] Fix broken Install.bat when target directory contains a space

2015-04-21 Thread Michael Paquier
On Wed, Apr 22, 2015 at 12:40 AM, Asif Naeem wrote: > Thank you Michael, latest patch looks good to me. I have changed its > status to ready for committer. > Thanks! -- Michael

Re: [HACKERS] Idea: closing the loop for "pg_ctl reload"

2015-04-21 Thread Payal Singh
I'm trying to review this patch and applied http://www.postgresql.org/message-id/attachment/37123/Let_pg_ctl_check_the_result_of_a_postmaster_config_reload.patch to postgres. gmake check passed but while starting postgres I see: [postgres@vagrant-centos65 data]$ LOG: incomplete data in "postmaste

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Jim Nasby
On 4/21/15 3:21 PM, Robert Haas wrote: It's possible that we could use this infrastructure to freeze more aggressively in other circumstances. For example, perhaps VACUUM should freeze any page it intends to mark all-visible. That's not a guaranteed win, because it might increase WAL volume: se

Re: [HACKERS] GSoC 2015 proposal: Support for microvacuum for GiST

2015-04-21 Thread Ilia Ivanicki
> > GSoC should be treated as a full-time job, that's how much time you're >> expected to dedicate to it. Having bachelor's degree exams in June would be >> a serious problem. You'll need to discuss with the potential mentors on how >> to make up for that time. >> > My bachelor's diploma is almost

[HACKERS] Buffer management improvement wiki page

2015-04-21 Thread Jim Nasby
There's been far more ideas and testing done around improving shared buffer management than I can remember, and I suspect I'm not alone in that regard. So I've created a wiki page as a place to pull this information together. I'll try and keep highlights/important links posted there, but help w

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2015-04-21 Thread Robert Haas
On Mon, Apr 20, 2015 at 2:53 PM, Jim Nasby wrote: > I think that would help, but it still leaves user backends trying to advance > the clock, which is quite painful. Has anyone tested running the clock in > the background? We need a wiki page with all the ideas that have been tested > around buffe

Re: [HACKERS] Update docs in fdwhandler.sgml

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 5:45 AM, Etsuro Fujita wrote: > Since we now allow CHECK constraints to be placed on foreign tables, not > only NOT NULL, I think it'd be better to update docs on considerations > about constraints on foreign tables in fdwhandler.sgml, so as to provide > more general consid

Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 6:55 AM, Heikki Linnakangas wrote: > On 04/21/2015 12:04 PM, Michael Paquier wrote: >> On Tue, Apr 21, 2015 at 4:38 PM, Heikki Linnakangas >> wrote: >>> Note that even though we don't archive the partial last segment on the >>> previous timeline, the same WAL is copied to

Re: [HACKERS] Shouldn't CREATE TABLE LIKE copy the relhasoids property?

2015-04-21 Thread Robert Haas
On Mon, Apr 20, 2015 at 5:41 PM, Bruce Momjian wrote: > On Mon, Apr 20, 2015 at 05:04:14PM -0400, Robert Haas wrote: >> On Mon, Apr 20, 2015 at 4:11 PM, Bruce Momjian wrote: >> > Slightly improved patch applied. >> >> Is it? > > The patch has a slightly modified 'if' statement to check a constant

Re: [HACKERS] Reducing spinlock acquisition within clock sweep loop

2015-04-21 Thread Merlin Moncure
On Tue, Apr 21, 2015 at 3:25 PM, Andres Freund wrote: > On 2015-04-21 14:46:04 -0500, Merlin Moncure wrote: >> The main sources of contention, buffer_strategy_lock, has been removed >> FWICT via 5d7962c6 and d72731a7. However, during the sweep each tick >> locks the buffer header via spinlock in

Re: [HACKERS] Row security violation error is misleading

2015-04-21 Thread Dean Rasheed
On 21 April 2015 at 20:50, Stephen Frost wrote: > Thanks a lot for this. Please take a look at the attached. I've given this a quick read-through, and it looks good to me. The interaction of permissive and restrictive policies from hooks matches my expections, and it's a definite improvement hav

Re: [HACKERS] Parallel Seq Scan

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 9:38 AM, Amit Kapila wrote: > On Mon, Apr 20, 2015 at 10:08 PM, Robert Haas wrote: >> >> On Tue, Apr 7, 2015 at 11:58 PM, Amit Kapila >> wrote: >> > One disadvantage of retaining parallel-paths could be that it can >> > increase the number of combinations planner might ne

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-21 Thread Peter Eisentraut
On 4/21/15 4:45 PM, Jim Nasby wrote: > This comment made me wonder... has anyone considered handing the pruning > work off to a bgworker, at least for SELECTs? That means the selects > themselves wouldn't be burdened by the actual prune work, only in > notifying the bgworker. While that's not going

Re: [HACKERS] Performance tuning assisted by a GUI application

2015-04-21 Thread Jim Nasby
On 4/16/15 8:42 AM, Jacek Wielemborek wrote: I had a brief discussion on #postgresql and thought that perhaps there might be a need for a tool that would enable a fine-tuning of PostgreSQL performance settings by conveniently testing them with a sample SQL query with the aid of a simple GUI appli

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 11:04 AM, Bruce Momjian wrote: > Yes, it might be too much optimization to try to get the checkpoint to > flush all those pages sequentially, but I was thinking of our current > behavior where, after an update of all rows, we effectively write out > the entire table because

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-21 Thread Jim Nasby
On 4/21/15 10:04 AM, Bruce Momjian wrote: One thing to consider is how we handle pruning of index scans that hit multiple heap pages. Do we still write X% of the pages in the table, or %X of the heap pages we actually access via SELECT? With the write-then-skip approach, we would do X% of the p

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-21 Thread Robert Haas
On Mon, Apr 20, 2015 at 6:13 PM, Alvaro Herrera wrote: > Bruce Momjian wrote: >> On Mon, Apr 20, 2015 at 04:19:22PM -0300, Alvaro Herrera wrote: >> > Bruce Momjian wrote: >> > This seems simple to implement: keep two counters, where the second one >> > is pages we skipped cleanup in. Once that co

Re: [HACKERS] Replication identifiers, take 4

2015-04-21 Thread Andres Freund
On 2015-04-21 16:26:08 -0400, Robert Haas wrote: > On Tue, Apr 21, 2015 at 8:08 AM, Andres Freund wrote: > > I've now named the functions: > > > > * pg_replication_origin_create > > * pg_replication_origin_drop > > * pg_replication_origin_get (map from name to id) > > * pg_replication_progress_set

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 4:27 PM, Andres Freund wrote: > On 2015-04-21 16:21:47 -0400, Robert Haas wrote: >> All that having been said, I don't think adding a new fork is a good >> approach. We already have problems pretty commonly where our >> customers complain about running out of inodes. Addi

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Andres Freund
On 2015-04-21 16:21:47 -0400, Robert Haas wrote: > All that having been said, I don't think adding a new fork is a good > approach. We already have problems pretty commonly where our > customers complain about running out of inodes. Adding another fork > for every table would exacerbate that prob

Re: [HACKERS] Replication identifiers, take 4

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 8:08 AM, Andres Freund wrote: > I've now named the functions: > > * pg_replication_origin_create > * pg_replication_origin_drop > * pg_replication_origin_get (map from name to id) > * pg_replication_progress_setup_origin : configure session to replicate > from a specific

Re: [HACKERS] Reducing spinlock acquisition within clock sweep loop

2015-04-21 Thread Andres Freund
On 2015-04-21 14:46:04 -0500, Merlin Moncure wrote: > The main sources of contention, buffer_strategy_lock, has been removed > FWICT via 5d7962c6 and d72731a7. However, during the sweep each tick > locks the buffer header via spinlock in order to to adjust > usage_count. FWIW, I think the best ap

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Robert Haas
On Mon, Apr 20, 2015 at 7:59 PM, Jim Nasby wrote: > http://www.postgresql.org/message-id/ca+tgmoaemnolzmvbb8gvy69na8zw9bwpiz9+tlz-lnabozi...@mail.gmail.com > has a WIP patch that goes the route of using a tuple flag to indicate > frozen, but also raises a lot of concerns about visibility, because

Re: [HACKERS] Row security violation error is misleading

2015-04-21 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > On 7 April 2015 at 16:21, Stephen Frost wrote: > > Agreed and we actually have a patch from Dean already to address this, > > it's just been waiting on me (with a couple of other ones). It'd > > certainly be great if you have time to take

[HACKERS] Reducing spinlock acquisition within clock sweep loop

2015-04-21 Thread Merlin Moncure
Background: The main sources of contention, buffer_strategy_lock, has been removed FWICT via 5d7962c6 and d72731a7. However, during the sweep each tick locks the buffer header via spinlock in order to to adjust usage_count. I believe that removing this lock is possible optimization fruit. I doub

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 10:54 AM, Andres Freund wrote: > On 2015-04-21 10:53:08 -0400, Robert Haas wrote: >> On Tue, Apr 21, 2015 at 6:17 AM, Craig Ringer wrote: >> >> I don't really like the 'pid' field for pg_replication_slots. About >> >> naming it 'active_in' or such? >> > >> > It was origina

Re: [HACKERS] parallel mode and parallel contexts

2015-04-21 Thread Robert Haas
On Mon, Apr 20, 2015 at 6:49 PM, Peter Geoghegan wrote: > I see that you're using git format-patch to generate this. But the > patch is only patch 1/4. Is that intentional? Where are the other > pieces? > > I think that the parallel seqscan patch, and the assessing parallel > safety patch are inte

Re: [HACKERS] parallel mode and parallel contexts

2015-04-21 Thread Robert Haas
On Tue, Mar 24, 2015 at 11:56 PM, Alvaro Herrera wrote: >> Well, it's not actually the same message. They're all a bit >> different. Or mostly all of them. And the variable part is not a >> command name, as in the PreventTransactionChain() case, so it would >> affect translatability if we did t

Re: [HACKERS] parallel mode and parallel contexts

2015-04-21 Thread Robert Haas
On Tue, Mar 24, 2015 at 3:26 PM, Andres Freund wrote: >> You'd need some kind of >> API that says "pretend I'm waiting for this lock, but don't really >> wait for it", and you'd need to be darn sure that you removed yourself >> from the wait queue again before doing any other heavyweight lock >> m

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Bruce Momjian
On Tue, Apr 21, 2015 at 04:54:57PM +0200, Andres Freund wrote: > On 2015-04-21 10:53:08 -0400, Robert Haas wrote: > > On Tue, Apr 21, 2015 at 6:17 AM, Craig Ringer wrote: > > >> I don't really like the 'pid' field for pg_replication_slots. About > > >> naming it 'active_in' or such? > > > > > > It

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

2015-04-21 Thread Andres Freund
On 2015-04-21 16:57:45 +0200, Andres Freund wrote: > * I still think it's unacceptable to redefine > XLOG_HEAP_LAST_MULTI_INSERT as XLOG_HEAP_SPECULATIVE_TUPLE like you > did. I'll try to find something better. I think we should "just" split this into different flag values for insert/update/de

Re: [HACKERS] preprocess_targetlist and inheiritance

2015-04-21 Thread Stephen Frost
Alvaro, On Tuesday, April 21, 2015, Alvaro Herrera wrote: > Stephen Frost wrote: > > Tom, all, > > > > Looks like preprocess_targetlist() should have been adjusted with the > > changes to ExecBuildAuxRowMark() to support foreign tables being part > > of inheritance trees (cb1ca4d800621dcae

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Andres Freund
On 2015-04-22 00:15:53 +0900, Sawada Masahiko wrote: > On Wed, Apr 22, 2015 at 12:02 AM, Andres Freund wrote: > > On 2015-04-21 23:59:45 +0900, Sawada Masahiko wrote: > >> The page as frozen could have the dead tuple for now, but I think to change > >> to that the frozen page guarantees that page

Re: [HACKERS] Fix broken Install.bat when target directory contains a space

2015-04-21 Thread Asif Naeem
Thank you Michael, latest patch looks good to me. I have changed its status to ready for committer. Regards, Muhammad Asif Naeem On Tue, Apr 21, 2015 at 6:02 PM, Michael Paquier wrote: > > > On Tue, Apr 21, 2015 at 4:33 PM, Asif Naeem wrote: > >> The v2 patch looks good to me, just a minor con

Re: [HACKERS] preprocess_targetlist and inheiritance

2015-04-21 Thread Alvaro Herrera
Stephen Frost wrote: > Tom, all, > > Looks like preprocess_targetlist() should have been adjusted with the > changes to ExecBuildAuxRowMark() to support foreign tables being part > of inheritance trees (cb1ca4d800621dcae67ca6c799006de99fa4f0a5) to > also include the tableoid regardless of

Re: [HACKERS] Replication identifiers, take 4

2015-04-21 Thread Andres Freund
On 2015-04-21 12:20:42 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > Catalog wise there's an actual table 'pg_replication_origin' that maps > > between 'roident' and 'roname'. There's a pg_replication_progress view > > (used to be named pg_replication_identifier_progress). I'm not sure if

Re: [HACKERS] Replication identifiers, take 4

2015-04-21 Thread Alvaro Herrera
Andres Freund wrote: > I'm working on changing this (I've implemented the missing WAL > bits). I'd like to discuss the new terms for a sec, before I go and > revise the docs. > > I'm now calling the feature 'replication progress tracking'. There's > "replication origins" and there's progress trac

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Sawada Masahiko
On Wed, Apr 22, 2015 at 12:02 AM, Andres Freund wrote: > On 2015-04-21 23:59:45 +0900, Sawada Masahiko wrote: >> The page as frozen could have the dead tuple for now, but I think to change >> to that the frozen page guarantees that page is all frozen *and* all >> visible. > > It shouldn't. That'd

[HACKERS] preprocess_targetlist and inheiritance

2015-04-21 Thread Stephen Frost
Tom, all, Looks like preprocess_targetlist() should have been adjusted with the changes to ExecBuildAuxRowMark() to support foreign tables being part of inheritance trees (cb1ca4d800621dcae67ca6c799006de99fa4f0a5) to also include the tableoid regardless of the rowMark type, if the relati

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-21 Thread Andrew Gierth
> "Svenne" == Svenne Krap writes: Svenne> I have the explains, Can you post the explain analyze outputs? If need be, you can anonymize the table and column names and any identifiers by using the anonymization option of explain.depesz.com, but please only do that if you actually need to. -

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-21 Thread Bruce Momjian
On Mon, Apr 20, 2015 at 07:13:38PM -0300, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Mon, Apr 20, 2015 at 04:19:22PM -0300, Alvaro Herrera wrote: > > > Bruce Momjian wrote: > > > > > > This seems simple to implement: keep two counters, where the second one > > > is pages we skipped cleanu

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Andres Freund
On 2015-04-21 23:59:45 +0900, Sawada Masahiko wrote: > The page as frozen could have the dead tuple for now, but I think to change > to that the frozen page guarantees that page is all frozen *and* all > visible. It shouldn't. That'd potentially cause corruption after a wraparound. A tuple's visib

[HACKERS] Freeze avoidance of very large table.

2015-04-21 Thread Sawada Masahiko
On Tue, Apr 21, 2015 at 7:00 AM, Jim Nasby wrote: > On 4/20/15 2:45 AM, Sawada Masahiko wrote: >> >> Current patch adds new source file src/backend/access/heap/frozenmap.c >> which is quite similar to visibilitymap.c. They have similar code but >> are separated for now. I do refactoring these sour

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

2015-04-21 Thread Andres Freund
On 2015-04-19 21:37:51 -0700, Peter Geoghegan wrote: > Attached patch, V3.4, implements what I believe you and Heikki have in > mind here. I'm not 100% sure Heikki and I am on exactly the same page here :P I'm looking at git diff $(git merge-base upstream/master HEAD).. where HEAD is e1a5822d164d

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Andres Freund
On 2015-04-21 10:53:08 -0400, Robert Haas wrote: > On Tue, Apr 21, 2015 at 6:17 AM, Craig Ringer wrote: > >> I don't really like the 'pid' field for pg_replication_slots. About > >> naming it 'active_in' or such? > > > > It was originally named active_pid, but changed based on feedback from > > ot

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Robert Haas
On Tue, Apr 21, 2015 at 6:17 AM, Craig Ringer wrote: >> I don't really like the 'pid' field for pg_replication_slots. About >> naming it 'active_in' or such? > > It was originally named active_pid, but changed based on feedback from > others that 'pid' would be consistent with pg_stat_activity and

Re: [HACKERS] Parallel Seq Scan

2015-04-21 Thread Amit Kapila
On Mon, Apr 20, 2015 at 10:08 PM, Robert Haas wrote: > > On Tue, Apr 7, 2015 at 11:58 PM, Amit Kapila wrote: > > One disadvantage of retaining parallel-paths could be that it can > > increase the number of combinations planner might need to evaluate > > during planning (in particular during join

Re: [HACKERS] Fix broken Install.bat when target directory contains a space

2015-04-21 Thread Michael Paquier
On Tue, Apr 21, 2015 at 4:33 PM, Asif Naeem wrote: > The v2 patch looks good to me, just a minor concern on usage message i.e. > > C:\PG\postgresql\src\tools\msvc>install >> Invalid command line options. >> Usage: "install.bat [installtype]" >> installtype: client > > > It seems that there are t

Re: [HACKERS] Replication identifiers, take 4

2015-04-21 Thread Andres Freund
On 2015-04-20 10:28:02 +0200, Andres Freund wrote: > On 2015-04-20 11:26:29 +0300, Heikki Linnakangas wrote: > > I just realized that it talks about "replication identifier" as the new > > fundamental concept. The system table is called "pg_replication_identifier". > > But that's like talking about

Re: [HACKERS] Parallel Seq Scan

2015-04-21 Thread Amit Kapila
On Tue, Apr 21, 2015 at 6:34 AM, Amit Langote wrote: > On 2015-04-21 AM 03:29, Robert Haas wrote: > > On Wed, Apr 8, 2015 at 3:38 AM, Amit Langote wrote: > >> On 08-04-2015 PM 12:46, Amit Kapila wrote: > >>> Going forward, I think we can improve the same if we decide not to shutdown > >>> parallel

Re: [HACKERS] Logical Decoding follows timelines

2015-04-21 Thread Simon Riggs
On 21 April 2015 at 05:49, Michael Paquier wrote: > On Fri, Feb 13, 2015 at 4:57 PM, Michael Paquier wrote: > > Moved patch to CF 2015-02 to not lose track of it, also because it does > not > > seem it received a proper review. > > This patch does not apply anymore, so attached is a rebased versi

Re: [HACKERS] Parallel Seq Scan

2015-04-21 Thread Amit Kapila
On Tue, Apr 21, 2015 at 2:29 PM, David Rowley wrote: > > I've also been thinking about how, instead of having to have a special > PartialSeqScan node which contains a bunch of code to store tuples in a > shared memory queue, could we not have a "TupleBuffer", or > "ParallelTupleReader" node, one o

Re: [HACKERS] installcheck missing in src/bin/pg_rewind/Makefile

2015-04-21 Thread Heikki Linnakangas
On 04/21/2015 07:13 AM, Michael Paquier wrote: Hi all, As mentioned in $subject, the TAP tests of pg_rewind are currently not run by buildfarm machines as the buildfarm client uses installcheck to run the tests in src/bin. A patch is attached to correct the problem. Thanks, applied. (I left o

Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Heikki Linnakangas
On 04/21/2015 12:04 PM, Michael Paquier wrote: On Tue, Apr 21, 2015 at 4:38 PM, Heikki Linnakangas wrote: Note that even though we don't archive the partial last segment on the previous timeline, the same WAL is copied to the first segment on the new timeline. So the WAL isn't lost. But if t

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Andres Freund
On April 21, 2015 1:17:32 PM GMT+03:00, Craig Ringer wrote: >On 21 April 2015 at 15:19, Andres Freund wrote: > >> On 2015-04-07 18:41:59 +0800, Craig Ringer wrote: >> > @@ -331,8 +331,8 @@ ReplicationSlotAcquire(const char *name) >> > volatile ReplicationSlot *vslot = s; >>

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Craig Ringer
On 21 April 2015 at 15:19, Andres Freund wrote: > On 2015-04-07 18:41:59 +0800, Craig Ringer wrote: > > @@ -331,8 +331,8 @@ ReplicationSlotAcquire(const char *name) > > volatile ReplicationSlot *vslot = s; > > > > SpinLockAcquire(&s->mutex); > > -

[HACKERS] Update docs in fdwhandler.sgml

2015-04-21 Thread Etsuro Fujita
Hi, Since we now allow CHECK constraints to be placed on foreign tables, not only NOT NULL, I think it'd be better to update docs on considerations about constraints on foreign tables in fdwhandler.sgml, so as to provide more general considerations. Please find attached a patch. Best regards, Et

Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Michael Paquier
On Tue, Apr 21, 2015 at 4:38 PM, Heikki Linnakangas wrote: > On 04/21/2015 09:53 AM, Michael Paquier wrote: > >> On Thu, Apr 16, 2015 at 8:57 PM, Heikki Linnakangas wrote: >> >>> Oh, hang on, that's not necessarily true. On promotion, the standby >>> >> archives >> >>> the last, partial WAL segme

Re: [HACKERS] Parallel Seq Scan

2015-04-21 Thread David Rowley
On 21 April 2015 at 06:26, Robert Haas wrote: > On Wed, Apr 8, 2015 at 3:34 AM, David Rowley wrote: > > In summary it sounds like with my idea we get: > > > > Pros > > * Optimal plan if no workers are available at execution time. > > * Parallelism possible if the chosen optimal plan happens to s

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2015-04-21 Thread Kyotaro HORIGUCHI
Hi, thank you. My understanding became a bit clearer. At Tue, 21 Apr 2015 15:35:41 +0900, Etsuro Fujita wrote in <5535efbd.8030...@lab.ntt.co.jp> > On 2015/04/21 10:07, Kyotaro HORIGUCHI wrote: > > At Mon, 20 Apr 2015 16:40:52 +0900, Etsuro Fujita > > wrote in > > <5534ad84.3020...@lab.ntt.co.j

Re: [HACKERS] Replication identifiers, take 4

2015-04-21 Thread Simon Riggs
On 20 April 2015 at 09:28, Andres Freund wrote: > On 2015-04-20 11:26:29 +0300, Heikki Linnakangas wrote: > > I just realized that it talks about "replication identifier" as the new > > fundamental concept. The system table is called > "pg_replication_identifier". > > But that's like talking abou

Re: [HACKERS] Streaming replication and WAL archive interactions

2015-04-21 Thread Heikki Linnakangas
On 04/21/2015 09:53 AM, Michael Paquier wrote: On Thu, Apr 16, 2015 at 8:57 PM, Heikki Linnakangas wrote: Oh, hang on, that's not necessarily true. On promotion, the standby archives the last, partial WAL segment from the old timeline. That's just wrong (http://www.postgresql.org/message-id/52

Re: [HACKERS] Fix broken Install.bat when target directory contains a space

2015-04-21 Thread Asif Naeem
The v2 patch looks good to me, just a minor concern on usage message i.e. C:\PG\postgresql\src\tools\msvc>install > Invalid command line options. > Usage: "install.bat [installtype]" > installtype: client It seems that there are two install options i.e. client, all (any other string other than

Re: [HACKERS] PATCH: Add 'pid' column to pg_replication_slots

2015-04-21 Thread Andres Freund
On 2015-04-07 18:41:59 +0800, Craig Ringer wrote: > @@ -331,8 +331,8 @@ ReplicationSlotAcquire(const char *name) > volatile ReplicationSlot *vslot = s; > > SpinLockAcquire(&s->mutex); > - active = vslot->active; > -