Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-04-04 Thread Kyotaro HORIGUCHI
Thank you for testing. That is a silly mistake, sorry. The attached is the fixed version. # Can I add a suffix to format-patche's output files? At Sat, 2 Apr 2016 07:18:32 +0200, Pavel Stehule wrote in

Re: [HACKERS] pgbench more operators & functions

2016-04-04 Thread David G. Johnston
On Sun, Apr 3, 2016 at 10:18 PM, Simon Riggs wrote: > On 4 April 2016 at 01:14, Michael Paquier > wrote: > > >> I'd say why not. >> > > I'd say "why not wait?". Minor, non-urgent patches will definitely go > nowhere for a long time, so it gains

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

2016-04-04 Thread Rajkumar Raghuwanshi
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. CREATE EXTENSION postgres_fdw; CREATE SCHEMA s1; create table s1.lt (c1 integer, c2 varchar); insert into s1.lt values (1,

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Craig Ringer
On 1 April 2016 at 14:46, Andres Freund wrote: > > > You're thinking from the perspective of someone who knows this code > > intimately. > > Maybe. But that's not addressed by adding half-true comments to places > they only belong to peripherally. And not to all the relevant

Re: [HACKERS] pgbench more operators & functions

2016-04-04 Thread Andres Freund
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 discouraged for many years, so > asking a long term contributor to

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-04-04 Thread Michael Paquier
On Mon, Apr 4, 2016 at 6:41 AM, Simon Riggs wrote: > I'm not very excited about this patch. Too much code for so little benefit > and fragile too. > > I'm not even sure what definition of "meaningful progress" is useful. If we > commit this, a similar bug could be filed for

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Craig Ringer
On 1 April 2016 at 14:52, Andres Freund wrote: > Hi, > > On 2016-04-01 08:46:01 +0200, Andres Freund wrote: > > That's a fundamental misunderstanding on your part (perhaps created by > > imprecise docs). > > > > Speaking of which, did you see the proposed README I sent for >

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Andres Freund
On 2016-04-04 14:24:52 +0800, Craig Ringer wrote: > I don't feel like I've grasped this properly yet. I think it's referring to > the pg_logical/snapshots/ serialization, the use of which allows us to > avoid doing extra work in SnapBuildFindSnapshot(...), but doesn't seem to > be crucial for

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Craig Ringer
On 4 April 2016 at 14:30, Andres Freund wrote: > On 2016-04-04 14:24:52 +0800, Craig Ringer wrote: > > I don't feel like I've grasped this properly yet. I think it's referring > to > > the pg_logical/snapshots/ serialization, the use of which allows us to > > avoid doing

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Andres Freund
On 2016-04-04 14:18:53 +0800, Craig Ringer wrote: > I want to go over the rest of your reply in more detail, but regarding this > and the original comment, I'm going by: > > if (start_lsn == InvalidXLogRecPtr) > { > /* continue from last position */ > start_lsn =

Re: [HACKERS] Timeline following for logical slots

2016-04-04 Thread Andres Freund
On 2016-04-04 14:36:29 +0800, Craig Ringer wrote: > On 4 April 2016 at 14:30, Andres Freund wrote: > > > On 2016-04-04 14:24:52 +0800, Craig Ringer wrote: > > > I don't feel like I've grasped this properly yet. I think it's referring > > to > > > the pg_logical/snapshots/

Re: [HACKERS] Choosing parallel_degree

2016-04-04 Thread Amit Kapila
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. > >>> > >>> Can we remove the minimum size limit when

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

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

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

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

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

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,

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

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

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,

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

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

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?

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:

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

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

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

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

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

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

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

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

[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

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

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

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:

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 >

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

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

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

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

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

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

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

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

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

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

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

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

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

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:

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

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

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

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,

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

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

[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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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(>node); } /* delete from LSN ordered list of

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,

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

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

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

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

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?

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

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

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

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

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

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.

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

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

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

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

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

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

  1   2   >