Re: [HACKERS] pgbench more operators & functions

2016-04-04 Thread Amit Kapila
On Mon, Apr 4, 2016 at 11:51 AM, Andres Freund wrote: > > On 2016-04-04 06:18:47 +0100, Simon Riggs wrote: > > I'd say "why not wait?". Minor, non-urgent patches will definitely go > > nowhere for a long time, so it gains nobody to submit now. > > > > Submitting patches during freeze has been disc

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Craig Ringer
On 4 April 2016 at 14:43, Andres Freund wrote: > > OK, makes sense. And still resume decoding from restart_lsn, despite > having > > that visibility information stashed, because we also have to rebuild the > > information on invalidations for running xacts, which is not stored > > persistently a

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-04 Thread Noah Misch
On Thu, Feb 25, 2016 at 11:19:20AM -0800, Jeff Janes wrote: > On Wed, Feb 24, 2016 at 8:51 AM, Teodor Sigaev wrote: > > Thank you for remembering this problem, at least for me. > > > >>> Well, turns out there's a quite significant difference, actually. The > >>> index sizes I get (quite stable aft

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-04-04 Thread Simon Riggs
On 4 April 2016 at 05:23, Petr Jelinek wrote: > I rebased this patch on top of current master as the generic wal commit > added some conflicting changes. Also fixed couple of typos in comments and > added non ascii message to test. This looks good to me, so have marked it Ready For Committer.

Re: [HACKERS] PATCH: use foreign keys to improve join estimates v1

2016-04-04 Thread Simon Riggs
On 3 April 2016 at 22:44, Simon Riggs wrote: > Detailed comments in the planner part of the patch. The discussion around > this patch isn't reflected enough in the patch. > I think we should record that the planner uses the constraint, even if the constraint is not yet valid, per DDL. The rel

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Fujii Masao
On Sat, Apr 2, 2016 at 10:20 AM, Thomas Munro wrote: > On Thu, Mar 31, 2016 at 5:11 PM, Thomas Munro > wrote: >> On Thu, Mar 31, 2016 at 3:55 AM, Masahiko Sawada >> wrote: >>> On Wed, Mar 30, 2016 at 11:43 PM, Masahiko Sawada >>> wrote: On Tue, Mar 29, 2016 at 5:36 PM, Kyotaro HORIGUCHI

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-04 Thread Amit Langote
Hi, Thanks for the report. On 2016/04/04 15:17, Rajkumar Raghuwanshi wrote: > Hi, > > I observed below in postgres_fdw > > * .Observation: *Prepare statement execution plan is not getting changed > even after altering foreign table to point to new schema. > [ ... ] > PREPARE stmt_ft AS sele

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-04-04 Thread Andres Freund
Hi, On 2016-04-03 16:47:49 +0530, Dilip Kumar wrote: > 6. With Head+ pinunpin-cas-8 + > 0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect performance is > almost same as with > Head+pinunpin-cas-8, only sometime performance at 128 client is low > (~250,000 instead of 650,000) Hm, interesti

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Abhijit Menon-Sen
At 2016-04-04 17:28:07 +0900, masao.fu...@gmail.com wrote: > > Barring any objections, I'll commit this patch. No objections, just a minor wording tweak: doc/src/sgml/config.sgml: "The synchronous standbys will be the standbys that their names appear early in this list" should be "The synchronou

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Kyotaro HORIGUCHI
Hello, thank you for testing. At Sat, 2 Apr 2016 14:20:55 +1300, Thomas Munro wrote in > >>> Attached latest patch incorporate some review comments so far, and is > >>> rebased against current HEAD. > >>> > >> > >> Sorry I attached wrong patch. > >> Attached patch is correct patch. > >> > >> [m

Re: [HACKERS] WIP: Access method extendability

2016-04-04 Thread Emre Hasegeli
I think the variable "magick" should be "magic". Patch attached. bloom-magick.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Simon Riggs
On 4 April 2016 at 09:28, Fujii Masao wrote: > Barring any objections, I'll commit this patch. > That sounds good. May I have one more day to review this? Actually more like 3-4 hours. I have no comments on an initial read, so I'm hopeful of having nothing at all to say on it. -- Simon Rigg

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Andres Freund
On 2016-04-04 10:35:34 +0100, Simon Riggs wrote: > On 4 April 2016 at 09:28, Fujii Masao wrote: > > Barring any objections, I'll commit this patch. No objection here either, just one question: Has anybody thought about the ability to extend this to do per-database syncrep? Logical decoding works

Re: [HACKERS] pgbench more operators & functions

2016-04-04 Thread Fabien COELHO
Hello Andres, I don't see much point in asking people to postpone. I do think however it can make sense to respond with something like: Fabien, you've been submitting a lot of patches over the last year. Thanks for the that! To keep up with the amount of incoming work the prject relies on co

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Craig Ringer
On 1 April 2016 at 14:46, Andres Freund wrote: > > However: It's safe for the slot state on the replica to be somewhat > behind > > the local replay from the master, so the slot state on the replica is > older > > than what it would've been at an equivalent time on the master... so long > > as i

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Andres Freund
On 2016-04-04 17:50:02 +0800, Craig Ringer wrote: > To rephrase per my understanding: The client only specifies the point it > wants to start seeing decoded commits. Decoding starts from the slot's > restart_lsn, and that's the point from which the accumulation of reorder > buffer contents begins,

Re: [HACKERS] PATCH: use foreign keys to improve join estimates v1

2016-04-04 Thread Amit Langote
On 2016/04/04 17:25, Simon Riggs wrote: > The rel cache code you're adding uses a flag called "rd_fkeyvalid" which > indicates that the relcache is correctly filled. That is confusing, since > it has nothing to do with the concept of constraint validity. We should > rename that to rd_fkeycachefille

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

2016-04-04 Thread Etsuro Fujita
On 2016/03/31 16:38, Etsuro Fujita wrote: On 2016/03/31 14:07, Noah Misch wrote: On Thu, Mar 24, 2016 at 01:02:57PM +0900, Etsuro Fujita wrote: On 2016/03/24 11:14, Michael Paquier wrote: On Wed, Mar 23, 2016 at 10:05 PM, Thom Brown wrote: I've noticed that you now can't cancel a query if th

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-04 Thread Magnus Hagander
On Fri, Apr 1, 2016 at 6:47 AM, Amit Kapila wrote: > On Sat, Mar 19, 2016 at 5:45 PM, Magnus Hagander > wrote: > >> On Wed, Mar 2, 2016 at 6:49 PM, Marco Nenciarini < >> marco.nenciar...@2ndquadrant.it> wrote: >> >>> >>> I've attached an updated patch, which is rebased on current master and >> i

[HACKERS] Incorrect comment in contrib/postgres_fdw/deparse.c

2016-04-04 Thread Etsuro Fujita
Hi, I found an incorrect comment in contrib/postgres_fdw/deparse.c: s/FOR SELECT or FOR SHARE/FOR UPDATE or FOR SHARE/ Attached is a patch to fix that comment. Best regards, Etsuro Fujita diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index bdc410d..d78ac79 100644 -

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

2016-04-04 Thread Michael Paquier
On Mon, Apr 4, 2016 at 7:49 PM, Etsuro Fujita wrote: > On 2016/03/31 16:38, Etsuro Fujita wrote: >> >> On 2016/03/31 14:07, Noah Misch wrote: >>> >>> On Thu, Mar 24, 2016 at 01:02:57PM +0900, Etsuro Fujita wrote: On 2016/03/24 11:14, Michael Paquier wrote: > > On Wed, Mar 23, 201

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-04 Thread Teodor Sigaev
The above-described topic is currently a PostgreSQL 9.6 open item. Teodor, since you committed the patch believed to have created it, you own this open item. If that responsibility lies elsewhere, please let us know whose responsibility it is to fix this. Since new open items may be discovered

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-04 Thread Tomas Vondra
On 04/04/2016 02:06 PM, Teodor Sigaev wrote: The above-described topic is currently a PostgreSQL 9.6 open item. Teodor, since you committed the patch believed to have created it, you own this open item. If that responsibility lies elsewhere, please let us know whose responsibility it is to fix t

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-04 Thread David Steele
On 3/19/16 8:15 AM, Magnus Hagander wrote: I've attached an updated patch, which is rebased on current master and includes the oid fix. I've now had a chance to go through this in detail and test thoroughly. We had a lot of discussion about copying pg_control last and that led me to believe

[HACKERS] Tiny patch: sigmask.diff

2016-04-04 Thread Aleksander Alekseev
Hello sigmask macro is defined in win32.h like this: ``` #define sigmask(sig) ( 1 << ((sig)-1) ) ``` And used in signal.c in this fashion: ``` for (i = 0; i < PG_SIGNAL_COUNT; i++) { if (exec_mask & sigmask(i)) { ``` Thus during first iteration we are do

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Masahiko Sawada
On Mon, Apr 4, 2016 at 6:03 PM, Kyotaro HORIGUCHI wrote: > Hello, thank you for testing. > > At Sat, 2 Apr 2016 14:20:55 +1300, Thomas Munro > wrote in > >> >>> Attached latest patch incorporate some review comments so far, and is >> >>> rebased against current HEAD. >> >>> >> >> >> >> Sorry I

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-04-04 Thread Simon Riggs
On 4 April 2016 at 10:45, Andres Freund wrote: > > Simon, perhaps you could hold the above question in your mind while > looking through this? > Sure, np. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, T

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-04 Thread Amit Kapila
On Mon, Apr 4, 2016 at 4:31 PM, Magnus Hagander wrote: > On Fri, Apr 1, 2016 at 6:47 AM, Amit Kapila > wrote: > > >> Also, I think below part of documentation for pg_start_backup() needs to >> be modified: >> >> >> >> pg_start_backup accepts an >> >> arbitrary user-defined label for the

Re: [HACKERS] Choosing parallel_degree

2016-04-04 Thread Corey Huinker
On Mon, Apr 4, 2016 at 2:55 AM, Amit Kapila wrote: > On Sun, Apr 3, 2016 at 4:37 PM, Julien Rouhaud > wrote: > > > > On 22/03/2016 07:58, Julien Rouhaud wrote: > > > On 21/03/2016 20:38, Julien Rouhaud wrote: > > >> On 21/03/2016 05:18, James Sewell wrote: > > >>> OK cool, thanks. > > >>> > > >>

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-04 Thread Teodor Sigaev
It seems to me that the patch is completed. Except, maybe, grammar check of comments and documentation. Looking forward to your review. Are there any objectins on it? I'm planning to look closely today or tommorrow and commit it. -- Teodor Sigaev E-mail: teo..

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-04 Thread Tom Lane
Amit Langote writes: > On 2016/04/04 15:17, Rajkumar Raghuwanshi wrote: >> * .Observation: *Prepare statement execution plan is not getting changed >> even after altering foreign table to point to new schema. > I wonder if performing relcache invalidation upon ATExecGenericOptions() > is the corr

Re: [HACKERS] Tiny patch: sigmask.diff

2016-04-04 Thread Tom Lane
Aleksander Alekseev writes: > sigmask macro is defined in win32.h like this: > #define sigmask(sig) ( 1 << ((sig)-1) ) > And used in signal.c in this fashion: > for (i = 0; i < PG_SIGNAL_COUNT; i++) > if (exec_mask & sigmask(i)) > Thus during first iteration we are doing `<<

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Craig Ringer
On 4 April 2016 at 18:01, Andres Freund wrote: > > The only way I can think of to do that really reliably right now, without > > full failover slots, is to use the newly committed pluggable WAL > mechanism > > and add a hook to SaveSlotToPath() so slot info can be captured, injected > > in WAL,

Re: [HACKERS] Choosing parallel_degree

2016-04-04 Thread Julien Rouhaud
On 04/04/2016 08:55, Amit Kapila wrote: Thanks for the review! > Few comments: > 1. > + limited according to the > > A. typo. >/gux-max-parallel-degree/guc-max-parallel-degree >/worker/workers Oops, fixed. > B. + > + Number of workers wanted for this table. The number o

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-04 Thread Amit Langote
On Mon, Apr 4, 2016 at 11:24 PM, Tom Lane wrote: > Amit Langote writes: >> On 2016/04/04 15:17, Rajkumar Raghuwanshi wrote: >>> * .Observation: *Prepare statement execution plan is not getting changed >>> even after altering foreign table to point to new schema. > >> I wonder if performing relcac

[HACKERS] Patch: fix typo, duplicated word in indexam.sgml

2016-04-04 Thread Artur Zakirov
Hello, There is a duplicated word in indexam.sgml. The patch is attached. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index b36889b..69edeea 100644 --- a/doc/src/sgml/indexam.sgml +

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Andres Freund
On 2016-04-04 22:59:41 +0800, Craig Ringer wrote: > Assuming that here you mean separate slots on different machines > replicating via physical rep: No, I don't. > We don't currently allow the creation of a logical slot on a standby. Nor > replay from it, even to advance it without receiving the

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-04-04 Thread David Steele
Hi Tom, On 3/29/16 12:58 PM, Tom Lane wrote: Oh, I agree that there's a compelling use-case for LOG | ERR_HIDE_FROM_CLIENT. I'm less certain that there's a use-case for supporting such a flag across all elevels that is strong enough to justify all the work we'd have to do to make it happen. B

Re: [HACKERS] Tiny patch: sigmask.diff

2016-04-04 Thread Aleksander Alekseev
> Surely this fix is completely wrong? You'd have to touch every use of > signum() to do it like that. You'd also be introducing similarly- > undefined behavior at the other end of the loop, where this coding > would be asking to compute 1<<31, hence shifting into the sign bit, > which is undefin

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-04-04 Thread Tom Lane
David Steele writes: > On 3/29/16 12:58 PM, Tom Lane wrote: >> ... Basically, >> my point is that LOG_ONLY achieves 95% of the benefit for probably >> 0.01% of the work. > Attached is a patch that re-purposes COMMERROR as LOG_SERVER_ONLY. I > went ahead and replaced all instances of COMMERROR

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-04 Thread Tom Lane
Amit Langote writes: > On Mon, Apr 4, 2016 at 11:24 PM, Tom Lane wrote: >> A related issue, now that I've seen this example, is that altering >> FDW-level or server-level options won't cause a replan either. I'm >> not sure there's any very good fix for that. Surely we don't want >> to try to i

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-04-04 Thread Jesper Pedersen
On 04/01/2016 04:39 PM, Andres Freund wrote: On April 1, 2016 10:25:51 PM GMT+02:00, Jesper Pedersen wrote: Hi, On 03/31/2016 06:21 PM, Andres Freund wrote: On March 31, 2016 11:13:46 PM GMT+02:00, Jesper Pedersen wrote: I can do a USE_CONTENT_LOCK run on 0003 if it is something for 9.6

Re: [HACKERS] SSL indicator in psql prompt

2016-04-04 Thread Robert Haas
On Fri, Apr 1, 2016 at 10:15 AM, Tom Lane wrote: > Peter Eisentraut writes: >> I like how browsers show a little lock in the address bar depending on >> whether SSL is in use. This could be useful in psql as well. Here is a >> prototype patch. >> Comments? > > -1 on the hard-coded UTF8, even wi

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-04-04 Thread David Steele
On 4/4/16 11:21 AM, Tom Lane wrote: David Steele writes: On 3/29/16 12:58 PM, Tom Lane wrote: ... Basically, my point is that LOG_ONLY achieves 95% of the benefit for probably 0.01% of the work. Attached is a patch that re-purposes COMMERROR as LOG_SERVER_ONLY. I went ahead and replaced a

Re: [HACKERS] SSL indicator in psql prompt

2016-04-04 Thread Shulgin, Oleksandr
On Apr 4, 2016 17:54, "Robert Haas" wrote: > > On Fri, Apr 1, 2016 at 10:15 AM, Tom Lane wrote: > > Peter Eisentraut writes: > >> I like how browsers show a little lock in the address bar depending on > >> whether SSL is in use. This could be useful in psql as well. Here is a > >> prototype pa

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-04-04 Thread Robert Haas
On Wed, Mar 30, 2016 at 2:22 AM, Thomas Munro wrote: > On Wed, Mar 30, 2016 at 2:36 PM, Robert Haas wrote: >> OK, I committed this, with a few tweaks. In particular, I added a >> flag variable instead of relying on "latch set" == "need to send >> reply"; the other changes were cosmetic. >> >> I'

[HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-04 Thread Aleksander Alekseev
Hello There is weired peace of code in reorderbuffer.c: ``` /* delete from list of known subxacts */ if (txn->is_known_as_subxact) { /* NB: nsubxacts count of parent will be too high now */ dlist_delete(&txn->node); } /* delete from LSN ordered list of

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-04-04 Thread Tom Lane
David Steele writes: > On 4/4/16 11:21 AM, Tom Lane wrote: >> I had in mind a patch that simply added LOG_SERVER_ONLY as another define >> and did whatever seemed appropriate documentation-wise. I see no reason >> to touch the places that are currently dealing with client communication >> failure

Re: [HACKERS] raw output from copy

2016-04-04 Thread Daniel Verite
Andrew Dunstan wrote: > Inserting the whole contents of a text file unchanged is insanely easy > in psql. > > \set file `cat /path/to/file` > insert into mytable(contents) values(:'file'); That's assuming psql but the asker of that question never mentioned using psql. The COPY

Re: [HACKERS] [BUGS] Breakage with VACUUM ANALYSE + partitions

2016-04-04 Thread Robert Haas
On Sat, Mar 26, 2016 at 8:39 AM, Andres Freund wrote: > On 2016-03-25 12:02:05 -0400, Robert Haas wrote: >> Gosh, that's surprising. I wonder if that just revealed an underlying >> issue rather than creating it. > > I think that's the case; it's just somewhat unlikely to hit in other > cases. > >

Re: [HACKERS] raw output from copy

2016-04-04 Thread Tom Lane
"Daniel Verite" writes: > One reason of adding the format to COPY is that it's where users > are looking for it. It's the canonical way of importing contents > from files so that's where it makes more sense. I'm not sure I buy that argument, because it could be used to justify adding absolutely a

Re: [HACKERS] raw output from copy

2016-04-04 Thread David G. Johnston
On Fri, Apr 1, 2016 at 8:42 AM, Daniel Verite wrote: > Andrew Dunstan wrote: > > > If someone can make a good case that this is going to be of > > general use I'll happily go along, but I haven't seen one so far. > > About COPY FROM with a raw format, for instance just yesterday > there w

Re: [HACKERS] SSL indicator in psql prompt

2016-04-04 Thread Robert Haas
On Mon, Apr 4, 2016 at 12:07 PM, Shulgin, Oleksandr wrote: > On Apr 4, 2016 17:54, "Robert Haas" wrote: >> >> On Fri, Apr 1, 2016 at 10:15 AM, Tom Lane wrote: >> > Peter Eisentraut writes: >> >> I like how browsers show a little lock in the address bar depending on >> >> whether SSL is in use.

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-04-04 Thread David Steele
On 4/4/16 12:36 PM, Tom Lane wrote: David Steele writes: On 4/4/16 11:21 AM, Tom Lane wrote: I had in mind a patch that simply added LOG_SERVER_ONLY as another define and did whatever seemed appropriate documentation-wise. I see no reason to touch the places that are currently dealing with cl

Re: [HACKERS] raw output from copy

2016-04-04 Thread Daniel Verite
Tom Lane wrote: > >> Code that uses PQexecParams() binary "resultFormat", or the > >> binary format of copy doesn't have that problem, but most > >> client-side drivers don't do that. > > > And maybe they just can't realistically, because getting result > > format in binary is exposed a

Re: [HACKERS] Choosing parallel_degree

2016-04-04 Thread Julien Rouhaud
On 04/04/2016 17:03, Julien Rouhaud wrote: > On 04/04/2016 08:55, Amit Kapila wrote: > > Thanks for the review! > >> Few comments: >> 1. >> + limited according to the >> >> A. typo. >>/gux-max-parallel-degree/guc-max-parallel-degree >>/worker/workers > > Oops, fixed. > And I mana

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-04 Thread Peter Geoghegan
On Mon, Apr 4, 2016 at 7:14 AM, Teodor Sigaev wrote: > Are there any objectins on it? I'm planning to look closely today or > tommorrow and commit it. I object to committing the patch in that time frame. I'm looking at it again. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] psql metaqueries with \gexec

2016-04-04 Thread Tom Lane
Corey Huinker writes: > Patch attached. Changes are thus: > - rebased > - pset.gexec_flag unconditionally set to false at end of SendQuery > - wording of documentation describing execution order of results > - rebasing allowed for undoing the re-wrap of enumerated slash commands. I whacked this a

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-04 Thread Tom Lane
Peter Geoghegan writes: > On Mon, Apr 4, 2016 at 7:14 AM, Teodor Sigaev wrote: >> Are there any objectins on it? I'm planning to look closely today or >> tommorrow and commit it. > I object to committing the patch in that time frame. I'm looking at it again. Since it's a rather complex patch, p

Re: [HACKERS] psql metaqueries with \gexec

2016-04-04 Thread Corey Huinker
On Mon, Apr 4, 2016 at 3:31 PM, Tom Lane wrote: > Corey Huinker writes: > > Patch attached. Changes are thus: > > - rebased > > - pset.gexec_flag unconditionally set to false at end of SendQuery > > - wording of documentation describing execution order of results > > - rebasing allowed for undoi

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Robert Haas
On Mon, Apr 4, 2016 at 10:59 AM, Craig Ringer wrote: > To allow logical rep and failover to be a reasonable substitute for physical > rep and failover IMO *need*: > > * Robust sequence decoding and replication. If you were following the later > parts of that discussion you will've seen how fun tha

Re: [HACKERS] [PATCH v11] GSSAPI encryption support

2016-04-04 Thread Robbie Harwood
Michael Paquier writes: > On Sat, Apr 2, 2016 at 7:34 AM, Robbie Harwood wrote: > >> Since I still can't reproduce this locally (left a client machine and >> a process on the same machine retrying for over an hour on your test >> case and didn't see it), could you provide me with some more

Re: [HACKERS] WIP: Failover Slots

2016-04-04 Thread Oleksii Kliukin
Hi, > On 17 Mar 2016, at 09:34, Craig Ringer wrote: > > OK, here's the latest failover slots patch, rebased on top of today's master > plus, in order: > > - Dirty replication slots when confirm_lsn is changed > > (http://www.postgresql.org/message-id/camsr+yhj0oycug2zbyqprhxmcjnkt9d57msxdzg

Re: [HACKERS] show xl_prev in xlog.c errcontext

2016-04-04 Thread Alvaro Herrera
Michael Paquier wrote: > On Thu, Apr 16, 2015 at 3:25 PM, Heikki Linnakangas wrote: > > On 04/15/2015 11:35 PM, Alvaro Herrera wrote: > >> > >> I found this patch in my local repo that I wrote some weeks or months > >> ago while debugging some XLog corruption problem: it was difficult to > >> pinp

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Petr Jelinek
On 04/04/16 22:00, Robert Haas wrote: On Mon, Apr 4, 2016 at 10:59 AM, Craig Ringer wrote: To allow logical rep and failover to be a reasonable substitute for physical rep and failover IMO *need*: * Robust sequence decoding and replication. If you were following the later parts of that discuss

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-04 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > At 2016-03-29 10:15:51 -0400, da...@pgmasters.net wrote: > > > > Either way it looks like you need to post a patch with more > > documentation - do you know when you'll have that ready? > > Here it is. > > (I was actually looking for other potential callers, but I could

Re: [HACKERS] [CommitFest App] Feature request -- review e-mail additions

2016-04-04 Thread Robert Haas
On Wed, Mar 30, 2016 at 1:47 PM, Alvaro Herrera wrote: > José Luis Tallón wrote: >> Just wanted to suggest two minor mods to the review e-mails >> auto-generated by the app: >> >> * Prepend a [review] tag to the e-mail subject >> ... so that e-mails sent to -hackers will read " [HACKERS]

Re: [HACKERS] So, can we stop supporting Windows native now?

2016-04-04 Thread Robert Haas
On Wed, Mar 30, 2016 at 7:49 PM, Josh berkus wrote: > http://www.zdnet.com/article/microsoft-and-canonical-partner-to-bring-ubuntu-to-windows-10/ > > ... could be good news for us ... I read a saying someplace that if you see a news headline that ends in a question mark, the answer is always "no"

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-04-04 Thread Tom Lane
Alex Shulgin writes: > On Mon, Apr 4, 2016 at 1:06 AM, Tom Lane wrote: >> I'm inclined to >> revert the aspect of 3d3bf62f3 that made us work from "d" (the observed >> number of distinct values in the sample) rather than stadistinct (the >> extrapolated estimate for the table). On reflection I t

Re: [HACKERS] WIP: Covering + unique indexes.

2016-04-04 Thread Peter Geoghegan
On Mon, Mar 21, 2016 at 9:53 AM, Anastasia Lubennikova wrote: > Thanks to David, > I've missed these letters at first. > I'll answer here. Sorry about using the wrong thread. > I agree that _bt_insertonpg() is not right for truncation. Cool. > It's a bit more complicated to add it into index c

[HACKERS] oversight in parallel aggregate

2016-04-04 Thread Robert Haas
One of my EDB colleagues, while in the process of refactoring some unrelated Advanced Server code, discovered that (1) there's no way to mark an aggregate as anything other than parallel-unsafe but (2) it doesn't matter because has_parallel_hazard ignores Aggrefs anyway. These mistakes cancel each

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-04 Thread Robbie Harwood
Hello friends, Here's v12, both here and on my github: https://github.com/frozencemetery/postgres/tree/feature/gssencrypt12 What changed: - The code is aware of memory contexts now. I actually really like the memory context stuff; just didn't see any indication of its existence in the code

Re: [HACKERS] show xl_prev in xlog.c errcontext

2016-04-04 Thread Michael Paquier
On Tue, Apr 5, 2016 at 6:14 AM, Alvaro Herrera wrote: > Michael Paquier wrote: >> And both? > > I couldn't see much point of doing this, so I didn't. If you have a > rationale for it, let's hear it. Now that I think on it, it does not actually matter to print both. -- Michael -- Sent via pgs

[HACKERS] PATCH: pg_restore parallel-execution-deadlock issue

2016-04-04 Thread Armin Schöffmann
worthy hackers, I propose the below patches to parallels.c and pg_backup_utils.c fixing deadlocks in pg_restore (windows only) if running more than 2 parallel jobs. This problem was reported by me earlier this year. http://www.postgresql.org/message-id/20160307161619.25731.78...@wrigleys.postgresq

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-04 Thread Michael Paquier
On Tue, Apr 5, 2016 at 1:03 AM, Aleksander Alekseev wrote: > There is weird peace of code in reorderbuffer.c: > > ``` > /* delete from list of known subxacts */ > if (txn->is_known_as_subxact) > { > /* NB: nsubxacts count of parent will be too high now */ > dlist_delete

Re: [HACKERS] oversight in parallel aggregate

2016-04-04 Thread David Rowley
On 5 April 2016 at 11:59, Robert Haas wrote: > One of my EDB colleagues, while in the process of refactoring some > unrelated Advanced Server code, discovered that (1) there's no way to > mark an aggregate as anything other than parallel-unsafe but (2) it > doesn't matter because has_parallel_haza

[HACKERS] Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.

2016-04-04 Thread Peter Eisentraut
On 01/22/2016 03:46 PM, Tom Lane wrote: Add trigonometric functions that work in degrees. The implementations go to some lengths to deliver exact results for values where an exact result can be expected, such as sind(30) = 0.5 exactly. I have a host here that is having regression test failures

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.

2016-04-04 Thread Michael Paquier
On Tue, Apr 5, 2016 at 10:16 AM, Peter Eisentraut wrote: > On 01/22/2016 03:46 PM, Tom Lane wrote: >> >> Add trigonometric functions that work in degrees. >> >> The implementations go to some lengths to deliver exact results for values >> where an exact result can be expected, such as sind(30) = 0

Re: [HACKERS] Correction for replication slot creation error message in 9.6

2016-04-04 Thread Peter Eisentraut
On 03/30/2016 09:15 PM, Ian Barwick wrote: Currently pg_create_physical_replication_slot() may refer to the deprecated wal_level setting "archive": I have fixed this in the most direct way, since there was some disagreement about rewording. -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] Correction for replication slot creation error message in 9.6

2016-04-04 Thread Peter Eisentraut
On 03/31/2016 10:18 AM, Alvaro Herrera wrote: I thought we had agreed that we weren't going to consider the wal_level values as a linear scale -- in other words, wordings such as "greater than FOO" are discouraged. That's always seemed a bit odd to me. I don't think there was any agreement abo

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-04 Thread Kyotaro HORIGUCHI
At Mon, 04 Apr 2016 11:23:34 -0400, Tom Lane wrote in <9798.1459783...@sss.pgh.pa.us> > Amit Langote writes: > > On Mon, Apr 4, 2016 at 11:24 PM, Tom Lane wrote: > >> A related issue, now that I've seen this example, is that altering > >> FDW-level or server-level options won't cause a replan e

Re: [HACKERS] snapshot too old, configured by time

2016-04-04 Thread Peter Geoghegan
On Wed, Mar 30, 2016 at 12:46 PM, Kevin Grittner wrote: > On Wed, Mar 30, 2016 at 2:29 PM, Peter Geoghegan wrote: > >> [Does the patch allow dangling page pointers?] > >> Again, I don't want to prejudice anyone against your patch, which I >> haven't read. > > I don't believe that the way the patc

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-04-04 Thread Abhijit Menon-Sen
At 2016-04-04 18:55:03 -0300, alvhe...@2ndquadrant.com wrote: > > At this point I think we're missing user-level docs for the additional > clause in each ALTER command. Thanks for having a look. Now that you're happy with the grammar, I'll write the remaining docs and resubmit the patch later toda

Re: [HACKERS] oversight in parallel aggregate

2016-04-04 Thread David Rowley
On 5 April 2016 at 13:09, David Rowley wrote: > On 5 April 2016 at 11:59, Robert Haas wrote: >> One of my EDB colleagues, while in the process of refactoring some >> unrelated Advanced Server code, discovered that (1) there's no way to >> mark an aggregate as anything other than parallel-unsafe b

Re: [HACKERS] Default Roles (was: Additional role attributes)

2016-04-04 Thread Noah Misch
On Sun, Apr 03, 2016 at 10:27:02PM -0400, Stephen Frost wrote: > * Fujii Masao (masao.fu...@gmail.com) wrote: > > Currently only superusers can call pgstattuple(). > > I started looking into this. > > If we were starting from a green field, the pg_dump dump catalog ACLs > patch would work just fi

Re: [HACKERS] oversight in parallel aggregate

2016-04-04 Thread Tom Lane
Robert Haas writes: > One of my EDB colleagues, while in the process of refactoring some > unrelated Advanced Server code, discovered that (1) there's no way to > mark an aggregate as anything other than parallel-unsafe but (2) it > doesn't matter because has_parallel_hazard ignores Aggrefs anyway

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.

2016-04-04 Thread Tom Lane
Michael Paquier writes: > On Tue, Apr 5, 2016 at 10:16 AM, Peter Eisentraut wrote: >> On 01/22/2016 03:46 PM, Tom Lane wrote: >>> Add trigonometric functions that work in degrees. >> I have a host here that is having regression test failures from this commit: > Likely an oversight not tracked b

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-04-04 Thread Amit Kapila
On Mon, Apr 4, 2016 at 8:55 PM, Jesper Pedersen wrote: > On 04/01/2016 04:39 PM, Andres Freund wrote: > >> On April 1, 2016 10:25:51 PM GMT+02:00, Jesper Pedersen < >> jesper.peder...@redhat.com> wrote: >> >>> Hi, >>> >>> On 03/31/2016 06:21 PM, Andres Freund wrote: >>> On March 31, 2016 11:

Re: [HACKERS] snapshot too old, configured by time

2016-04-04 Thread Peter Geoghegan
On Sun, Apr 3, 2016 at 2:09 PM, Jeff Janes wrote: > Also, HOT-cleanup should stop the bloat increase once the snapshot > crosses the old_snapshot_threshold without even needing to wait until > the next autovac runs. > > Does the code intentionally only work for manual vacuums? If so, that > seems

Re: [HACKERS] pgbench more operators & functions

2016-04-04 Thread Alvaro Herrera
Fabien COELHO wrote: > I try to review all patches in my (small) area of (limited) expertise, which > is currently pgbench & some part of the checkpointer. I did also minor bug > fixes (eg isbn). AFAICS none of the patches lacking a reviewer in 9.6 CF > fall in these area. > > Also note that whil

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Petr Jelinek
On 04/04/16 17:15, Andres Freund wrote: * Robust sequence decoding and replication. If you were following the later parts of that discussion you will've seen how fun that's going to be, but it's the simplest of all of the problems. Unconvinced. People used londiste and slony for years without

Re: [HACKERS] Choosing parallel_degree

2016-04-04 Thread Amit Kapila
On Mon, Apr 4, 2016 at 11:39 PM, Julien Rouhaud wrote: > > On 04/04/2016 17:03, Julien Rouhaud wrote: > > On 04/04/2016 08:55, Amit Kapila wrote: > > > > Thanks for the review! > > > >> Few comments: > >> 1. > >> + limited according to the > >> > >> A. typo. > >>/gux-max-parallel-degree/

Re: [HACKERS] Combining Aggregates

2016-04-04 Thread Robert Haas
On Wed, Mar 30, 2016 at 3:34 PM, David Rowley wrote: > I wrote 0002 - 0004, these were reviewed by Tomas. > 0005 is Haribabu's patch: Reviewed by Tomas and I. I think it might be a good idea if these patches made less use of bytea and exposed the numeric transition values as, say, a 2-element arr

Re: [HACKERS] oversight in parallel aggregate

2016-04-04 Thread Robert Haas
On Mon, Apr 4, 2016 at 10:35 PM, Tom Lane wrote: > Robert Haas writes: >> One of my EDB colleagues, while in the process of refactoring some >> unrelated Advanced Server code, discovered that (1) there's no way to >> mark an aggregate as anything other than parallel-unsafe but (2) it >> doesn't m

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-04 Thread Amit Langote
On 2016/04/05 0:23, Tom Lane wrote: > Amit Langote writes: >> On Mon, Apr 4, 2016 at 11:24 PM, Tom Lane wrote: >>> A related issue, now that I've seen this example, is that altering >>> FDW-level or server-level options won't cause a replan either. I'm >>> not sure there's any very good fix for

Re: [HACKERS] [PATCH v12] GSSAPI encryption support

2016-04-04 Thread Michael Paquier
On Tue, Apr 5, 2016 at 9:06 AM, Robbie Harwood wrote: > Here's v12, both here and on my github: > https://github.com/frozencemetery/postgres/tree/feature/gssencrypt12 > > What changed: > > - The code is aware of memory contexts now. I actually really like the > memory context stuff; just didn't

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-04-04 Thread Shulgin, Oleksandr
On Apr 5, 2016 00:31, "Tom Lane" wrote: > > Alex Shulgin writes: > > On Mon, Apr 4, 2016 at 1:06 AM, Tom Lane wrote: > >> I'm inclined to > >> revert the aspect of 3d3bf62f3 that made us work from "d" (the observed > >> number of distinct values in the sample) rather than stadistinct (the > >> e

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Andres Freund
On 2016-04-05 05:53:53 +0200, Petr Jelinek wrote: > On 04/04/16 17:15, Andres Freund wrote: > > > >>* Robust sequence decoding and replication. If you were following the later > >>parts of that discussion you will've seen how fun that's going to be, but > >>it's the simplest of all of the problems.

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Peter Geoghegan
On Mon, Apr 4, 2016 at 1:00 PM, Robert Haas wrote: > I don't necessarily disagree with your statement that we'd need all of > this stuff to make logical replication a substitute for physical > replication as far as failover is concerned. But I don't think that's > the most important goal, and eve

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

2016-04-04 Thread Etsuro Fujita
On 2016/04/04 20:35, Michael Paquier wrote: On Mon, Apr 4, 2016 at 7:49 PM, Etsuro Fujita wrote: Here is a patch to fix this issue. As proposed by Michael, I modified execute_dml_stmt so that it uses PQsendQueryParams, not PQexecParams. Any comments are welcome. + * This is based on pqSock

  1   2   >