RE: [bug fix] Cascaded standby cannot start after a clean shutdown

2018-06-11 Thread Tsunakawa, Takayuki
> From: Michael Paquier [mailto:mich...@paquier.xyz] > As this is one of those small bug fixes for which we can do something, > attached > is an updated patch with a commit description, and tutti-quanti. At the > end, I have moved the size check within allocate_recordbuf(). Even if the > size ca

Re: [bug fix] Cascaded standby cannot start after a clean shutdown

2018-06-11 Thread Michael Paquier
On Sun, Mar 18, 2018 at 08:49:01AM +0900, Michael Paquier wrote: > On Fri, Mar 16, 2018 at 06:02:25AM +, Tsunakawa, Takayuki wrote: >> Ouch, you're right. If memory allocation fails, the startup process >> would emit a LOG message and continue to fetch new WAL records. Then, >> I'm completely

Re: SCRAM with channel binding downgrade attack

2018-06-11 Thread Michael Paquier
On Mon, Jun 11, 2018 at 04:54:45PM +0200, Magnus Hagander wrote: > I'm wondering if that means we should then also not do it specifically for > scram in this version. Otherwise we're likely to end up with a parameter > that only has a "lifetime" of one version, and that seems like a bad idea. > If

Re: Fix some error handling for read() and errno

2018-06-11 Thread Michael Paquier
On Mon, Jun 11, 2018 at 03:17:15PM -0700, Andres Freund wrote: > On 2018-06-11 18:11:05 -0400, Alvaro Herrera wrote: >> As for the messages, I propose to make them more regular, i.e. always >> use the wording "could not read from file "%s": read %d, expected %zu", >> avoiding variations such as >>

Re: Supporting tls-server-end-point as SCRAM channel binding for OpenSSL 1.0.0 and 1.0.1

2018-06-11 Thread Michael Paquier
On Mon, Jun 11, 2018 at 10:47:23AM -0400, Peter Eisentraut wrote: > I think we'll just have to wait for an updated RFC on channel bindings > for TLS 1.3. > > Perhaps we should change PostgreSQL 11 to not advertise channel binding > when TLS 1.3 is used? Yeah, that's what we should do and I would

Re: Checkpoint not retrying failed fsync?

2018-06-11 Thread Thomas Munro
On Sun, Apr 8, 2018 at 9:17 PM, Thomas Munro wrote: > New patch attached. For Linux users (read: almost all users) this patch on its own is a bit like rearranging the deck chairs on the Titanic. Because retrying on failure is useless, among other problems, Craig and Andres are working on convert

Re: Does logical replication supports cross platform servers?

2018-06-11 Thread Craig Ringer
On 12 June 2018 at 11:04, Haribabu Kommi wrote: > Hi All, > > I am not able to find any docs suggesting that PostgreSQL logical > replication supports > cross platform servers (windows --> Linux or vice-versa). > > It should. I don't think there's buildfarm coverage yet, though. -- Craig Ringe

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-06-11 Thread Kyotaro HORIGUCHI
Thanks for the discussion. At Thu, 7 Jun 2018 19:16:57 +0530, Ashutosh Bapat wrote in > On Tue, Jun 5, 2018 at 3:40 PM, Kyotaro HORIGUCHI > wrote: > > Hello. > > > > At Mon, 04 Jun 2018 20:58:28 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI > > wrote in > > <20180604.205828.208262556.hori

Does logical replication supports cross platform servers?

2018-06-11 Thread Haribabu Kommi
Hi All, I am not able to find any docs suggesting that PostgreSQL logical replication supports cross platform servers (windows --> Linux or vice-versa). When I tried with simple basic commands and it worked and also some of the other members are also suggesting to use logical replication for the

Re: Needless additional partition check in INSERT?

2018-06-11 Thread David Rowley
On 12 June 2018 at 09:13, Alvaro Herrera wrote: > Hearing no complaints I pushed it with the proposed shape. Thanks for working on it and pushing. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

RE: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows

2018-06-11 Thread Tsunakawa, Takayuki
> From: Thomas Munro [mailto:thomas.mu...@enterprisedb.com] > I would like to get this committed soon, but I'm not sure about backpatching > -- see below. Here's a new version with a couple of minor changes: Thank you for taking care of this patch. > 1. Small changes to the documentation. I a

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-06-11 Thread Andres Freund
Hi, On 2018-05-28 12:52:06 -0700, Andres Freund wrote: > Hi, > > On 2018-05-27 13:00:06 -0700, Andres Freund wrote: > > I've a patch that seems to work, that mostly needs some comment > > polishing. > > Attached is what I currently have. Still needs some more work, but I > think it's more than g

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-06-11 Thread Andres Freund
Hi, On 2018-05-29 19:14:51 -0400, Alvaro Herrera wrote: > I added an Assert(DatabasePath != NULL) to > RelationCacheInitFilePreInvalidate() and didn't see a single crash when > running the tests. I thought that adding a "VACUUM FREEZE pg_class" > in the recovery tests (where there is a standby) o

Re: [COMMITTERS] pgsql: Logical replication

2018-06-11 Thread Andres Freund
Hi, On 2017-01-20 14:06:18 +, Peter Eisentraut wrote: > Logical replication > > - Add PUBLICATION catalogs and DDL > - Add SUBSCRIPTION catalog and DDL > - Define logical replication protocol and output plugin > - Add logical replication workers I know I mentioned this before, but I just hit

Re: why partition pruning doesn't work?

2018-06-11 Thread Tom Lane
Andrew Dunstan writes: > On 06/11/2018 06:24 PM, Tom Lane wrote: >> If we had any buildfarm critters running valgrind on >> RELCACHE_FORCE_RELEASE or CLOBBER_CACHE_ALWAYS builds, they'd have >> detected use of uninitialized memory here ... but I don't think we have >> any. (The combination of val

Re: [PATCH v18] GSSAPI encryption support

2018-06-11 Thread Nico Williams
On Mon, Jun 11, 2018 at 04:11:10PM -0400, Robbie Harwood wrote: > Nico was kind enough to provide me with some code review. This should > those concerns (clarify short-read behavior and fixing error checking on > GSS functions). Besides the bug you fixed and which I told you about off-list (on IR

Re: why partition pruning doesn't work?

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 06:24 PM, Tom Lane wrote: If we had any buildfarm critters running valgrind on RELCACHE_FORCE_RELEASE or CLOBBER_CACHE_ALWAYS builds, they'd have detected use of uninitialized memory here ... but I don't think we have any. (The combination of valgrind and CCA would probably be

Re: automating perl compile time checking

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 03:38 PM, Andrew Dunstan wrote: On 06/11/2018 02:33 PM, Alvaro Herrera wrote: On 2018-Jun-05, Daniel Gustafsson wrote: On 5 Jun 2018, at 16:31, Andrew Dunstan wrote: The patch contains a simple script to run the checks. The code that finds perl files is put in a function i

Re: why partition pruning doesn't work?

2018-06-11 Thread Tom Lane
I wrote: > * I'm fairly suspicious of the fmgr_info and fmgr_info_copy calls in > perform_pruning_base_step. Those seem likely to leak memory, and > for sure they destroy any opportunity for the called comparison > function to cache info in fn_extra --- something that's critical > for performance

Re: Fix some error handling for read() and errno

2018-06-11 Thread Andres Freund
On 2018-06-11 18:11:05 -0400, Alvaro Herrera wrote: > As for the messages, I propose to make them more regular, i.e. always > use the wording "could not read from file "%s": read %d, expected %zu", > avoiding variations such as > not enough data in file \"%s\": %d read, %d expected" >

Re: Fix some error handling for read() and errno

2018-06-11 Thread Alvaro Herrera
On 2018-Jun-11, Robbie Harwood wrote: > It might be less confusing to just set errno if it's not set already > (e.g., to EIO, or something). Up to you though - this is a bit of a > niche case. I think that would be very confusing, if we receive a report that really is a short read but looks like

Re: pgsql: Fix and document lock handling for in-memory replication slot da

2018-06-11 Thread Michael Paquier
On Mon, Jun 11, 2018 at 09:49:52AM -0700, Andres Freund wrote: > Same is true for the codepaths calling GetRedoRecPtr(). You are right. I'll fix in a minute. A first commit's stress make things really harder to get right... > I don't object to the general idea of adding locking - although the >

Re: Fix some error handling for read() and errno

2018-06-11 Thread Robbie Harwood
Michael Paquier writes: > diff --git a/src/backend/access/transam/slru.c > b/src/backend/access/transam/slru.c > index 87942b4cca..d487347cc6 100644 > --- a/src/backend/access/transam/slru.c > +++ b/src/backend/access/transam/slru.c > @@ -683,6 +683,11 @@ SlruPhysicalReadPage(SlruCtl ctl, int pa

Re: Needless additional partition check in INSERT?

2018-06-11 Thread Alvaro Herrera
Hearing no complaints I pushed it with the proposed shape. Thanks everyone, -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [PATCH v16] GSSAPI encryption support

2018-06-11 Thread Nico Williams
On Mon, Jun 11, 2018 at 01:31:12PM -0400, Andrew Dunstan wrote: > On 06/11/2018 01:13 PM, Nico Williams wrote: > >Well, all the free CIs like Travis and Appveyor do it this way. You > >don't have to *use* it just because the .yml files are in the source > >tree. But you have to have the .yml file

Re: adding tab completions

2018-06-11 Thread Arthur Zakirov
On Sat, Jun 09, 2018 at 06:42:12PM -0500, Justin Pryzby wrote: > > Moreover there is no such completion for example for the command (it shows > > only first column): > > > > CREATE INDEX ON test ( > > Noted (I misunderstood at first: you just mean there's precedent that column > names aren't comp

Re: automating perl compile time checking

2018-06-11 Thread Tom Lane
Andrew Dunstan writes: > On 06/11/2018 04:01 PM, Peter Eisentraut wrote: >> Why is this being committed after feature freeze? > This affects pretty much nothing. In fact some of the other changes I've > recently committed were arguably more dangerous. Do you want me to > revert the whole lot?

Re: [PATCH v18] GSSAPI encryption support

2018-06-11 Thread Robbie Harwood
Hi, Nico was kind enough to provide me with some code review. This should those concerns (clarify short-read behavior and fixing error checking on GSS functions). Thanks, --Robbie signature.asc Description: PGP signature >From 20b9f7d5cd9a35e7210ccc309bada789411b6cdb Mon Sep 17 00:00:00 2001 F

Re: automating perl compile time checking

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 04:01 PM, Peter Eisentraut wrote: On 6/11/18 15:38, Andrew Dunstan wrote: On 5 Jun 2018, at 16:31, Andrew Dunstan wrote: The patch contains a simple script to run the checks. The code that finds perl files is put in a function in a single file that is sourced by the three loc

Re: automating perl compile time checking

2018-06-11 Thread Peter Eisentraut
On 6/11/18 15:38, Andrew Dunstan wrote: On 5 Jun 2018, at 16:31, Andrew Dunstan wrote: The patch contains a simple script to run the checks. The code that finds perl files is put in a function in a single file that is sourced by the three locations that need it. >>> +1

Re: automating perl compile time checking

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 02:33 PM, Alvaro Herrera wrote: On 2018-Jun-05, Daniel Gustafsson wrote: On 5 Jun 2018, at 16:31, Andrew Dunstan wrote: The patch contains a simple script to run the checks. The code that finds perl files is put in a function in a single file that is sourced by the three loc

Re: PostgreSQL vs SQL Standard

2018-06-11 Thread Tom Lane
Alvaro Herrera writes: > On 2018-Jun-10, Tom Lane wrote: >> (wanders away wondering exactly what parsing technology the SQL committee >> thinks implementations use...) > Umm, doesn't this come from our decision to make the AS optional there? No, it was THEIR decision to make AS optional. I'd li

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Tomas Vondra
On 06/11/2018 08:13 PM, Jeff Davis wrote: > On Mon, 2018-06-11 at 19:33 +0200, Tomas Vondra wrote: >> For example we hit the work_mem limit after processing 10% tuples, >> switching to sort would mean spill+sort of 900GB of data. Or we >> might say - hmm, we're 10% through, so we expect hitting t

Re: Proposal: Partitioning Advisor for PostgreSQL

2018-06-11 Thread Julien Rouhaud
Hi Ashutosh, Thanks for answering! And I'm very sorry for the time I needed to reply On Wed, May 30, 2018 at 5:44 PM, Ashutosh Bapat wrote: > On Thu, May 24, 2018 at 4:16 PM, Yuzuko Hosoya >> >> However, PostgreSQL isn't designed to have hypothetical tables, > > I agree. But there are light-wei

Re: PostgreSQL vs SQL Standard

2018-06-11 Thread Alvaro Herrera
On 2018-Jun-10, Tom Lane wrote: > (wanders away wondering exactly what parsing technology the SQL committee > thinks implementations use...) Umm, doesn't this come from our decision to make the AS optional there? -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Developme

Re: automating perl compile time checking

2018-06-11 Thread Alvaro Herrera
On 2018-Jun-05, Daniel Gustafsson wrote: > > On 5 Jun 2018, at 16:31, Andrew Dunstan > > wrote: > > > The patch contains a simple script to run the checks. The code that finds > > perl files is put in a function in a single file that is sourced by the > > three locations that need it. > > +1

Re: CF bug fix items

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 01:11 PM, Andres Freund wrote: On 2018-06-11 13:30:27 +0900, Michael Paquier wrote: "Fix the optimization to skip WAL-logging on table created in same transaction" has been in 10 (!) commitfests. It's seen no substantive action since November. It has a bunch of authors and revie

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Jeff Davis
On Mon, 2018-06-11 at 19:33 +0200, Tomas Vondra wrote: > For example we hit the work_mem limit after processing 10% tuples,  > switching to sort would mean spill+sort of 900GB of data. Or we > might  > say - hmm, we're 10% through, so we expect hitting the limit 10x, so  > let's spill the hash tabl

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Tom Lane
Jeff Davis writes: > Also, I am not sure we should really be designing around data types > where it makes sense to group and then don't supply a btree opclass. > Seems like they are likely to hit a problem soon anyway. It's not that unreasonable to have a hash opclass and no btree opclass; the da

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Jeff Davis
On Mon, 2018-06-11 at 11:55 -0400, Robert Haas wrote: > performance degradation is not necessarily much better than OOM.  I > suspect that part of the reason why both Andres and David proposed > algorithms that combined hashing and sorting is out of a desire to > cater somewhat to both few-tuples-p

Re: commitfest 2018-07

2018-06-11 Thread Andres Freund
Hi, On 2018-06-11 11:50:55 +0900, Michael Paquier wrote: > On Wed, Jun 06, 2018 at 12:38:56AM +0200, Magnus Hagander wrote: > > Thus, if we don't want to have to risk doing surgery on the system (or > > guarantee we won't bounce any patches from the 07 CF, but that seems like > > the wrong thing t

Re: JIT versus standalone-headers checks

2018-06-11 Thread Andres Freund
Hi, On 2018-06-10 15:59:04 -0400, Tom Lane wrote: > I find that the JIT stuff has broken cpluspluscheck for me, along > with a related script that I use to verify that each header builds > cleanly standalone (ie with no prerequisites except postgres.h). > There are two problems: > > (1) Doesn't w

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Tomas Vondra
On 06/11/2018 07:14 PM, Andres Freund wrote: Hi, On 2018-06-11 17:29:52 +0200, Tomas Vondra wrote: It would be great to get something that performs better than just falling back to sort (and I was advocating for that), but I'm worried we might be moving the goalposts way too far. I'm uncle

Re: [PATCH v16] GSSAPI encryption support

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 01:13 PM, Nico Williams wrote: Well, all the free CIs like Travis and Appveyor do it this way. You don't have to *use* it just because the .yml files are in the source tree. But you have to have the .yml files in the source tree in order to use these CIs. It'd be nice to be a

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Andres Freund
Hi, On 2018-06-11 17:29:52 +0200, Tomas Vondra wrote: > It would be great to get something that performs better than just falling > back to sort (and I was advocating for that), but I'm worried we might be > moving the goalposts way too far. I'm unclear on why that'd have that bad performance in

Re: [PATCH v16] GSSAPI encryption support

2018-06-11 Thread Nico Williams
On Mon, Jun 11, 2018 at 09:27:17AM -0400, Robert Haas wrote: > On Thu, Jun 7, 2018 at 6:11 PM, Thomas Munro > wrote: > >> Cool! Is there any reason that your patch for Travis and AppVeyor > >> integration is not just committed to master? > > > > I think that's a good idea and I know that some oth

Re: CF bug fix items

2018-06-11 Thread Andres Freund
On 2018-06-11 13:30:27 +0900, Michael Paquier wrote: > > "Fix the optimization to skip WAL-logging on table created in same > > transaction" has been in 10 (!) commitfests. It's seen no substantive action > > since November. It has a bunch of authors and reviewers listed, Surely > > somebody can mo

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-06-11 Thread Andres Freund
Hi, On 2018-06-11 10:15:39 +0100, Simon Riggs wrote: > diff --git a/src/backend/storage/ipc/procarray.c > b/src/backend/storage/ipc/procarray.c > index 9db184f8fe..c280744fdd 100644 > --- a/src/backend/storage/ipc/procarray.c > +++ b/src/backend/storage/ipc/procarray.c > @@ -1995,10 +1995,6 @@ Ge

Re: pgsql: Fix and document lock handling for in-memory replication slot da

2018-06-11 Thread Andres Freund
Hi, On 2018-06-10 10:45:04 +, Michael Paquier wrote: > Fix and document lock handling for in-memory replication slot data > > While debugging issues on HEAD for the new slot forwarding feature of > Postgres 11, some monitoring of the code surrounding in-memory slot data > has proved that the l

Re: [PATCH] Clear up perlcritic 'missing return' warning

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 12:34 PM, Alvaro Herrera wrote: On 2018-May-26, Andrew Dunstan wrote: Not quite trivial but it's done - see . crake is now set up to run this - see

Re: [PATCH] Clear up perlcritic 'missing return' warning

2018-06-11 Thread Alvaro Herrera
On 2018-May-26, Andrew Dunstan wrote: > Not quite trivial but it's done - see > . > > crake is now set up to run this - see >

Re: Locking B-tree leafs immediately in exclusive mode

2018-06-11 Thread Alexander Korotkov
On Mon, Jun 11, 2018 at 1:06 PM Simon Riggs wrote: > On 5 June 2018 at 14:45, Alexander Korotkov wrote: > > Currently _bt_search() always locks leaf buffer in shared mode (aka > > BT_READ), > > while caller can relock it later. However, I don't see what prevents > > _bt_search() > > from lockin

Re: cursors with prepared statements

2018-06-11 Thread Peter Eisentraut
On 6/11/18 09:57, Amit Kapila wrote: > Sounds like a reasonable approach. Have you not considered using a > special OPEN syntax because there are some other forms of problems > with it? There is no OPEN command in direct SQL. Do you mean whether I have considered introducing an OPEN command? Ye

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Robert Haas
On Mon, Jun 11, 2018 at 11:29 AM, Tomas Vondra wrote: > I think the underlying question is whether we want to treat this as an > emergency safety against OOM (which should be a rare thing in most cases) or > something allowing us to pick hash aggregate more often. > > It would be great to get some

Re: CF bug fix items

2018-06-11 Thread Alvaro Herrera
On 2018-Jun-11, Etsuro Fujita wrote: > (2018/06/11 20:34), Andrew Dunstan wrote: > > On 06/11/2018 07:08 AM, Etsuro Fujita wrote: > > > > In one of those cases, "ConvertRowtypeExpr reference errors from > > > > partition-wise join", the patch has been marked Ready for Committer and > > > > then Et

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Tomas Vondra
On 06/11/2018 04:25 PM, Robert Haas wrote: > ... Maybe that's not exactly what Tomas (or you) meant by eviction strategy, though. Not sure. But it does seem to me that we need to pick the algorithm we're going to use, more or less, in order to decide what infrastructure we need, and at leas

Re: file cloning in pg_upgrade and CREATE DATABASE

2018-06-11 Thread Peter Eisentraut
On 6/8/18 14:06, Robert Haas wrote: > Is it supposed to be relinks or reflinks? The two lines above don't agree. It's supposed to be "reflinks". I'll fix that. I have also used the more general term "cloning" in the documentation. We can discuss which term we should use more. -- Peter Eisentr

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Tomas Vondra
On 06/11/2018 05:16 PM, Robert Haas wrote: On Wed, Jun 6, 2018 at 8:16 PM, Tomas Vondra wrote: ... and this is pretty much what Jeff Davis suggested, I think. The trouble is, each of those cases behaves nicely/terribly in different corner cases. That's a really good point. If the number o

Re: config.{guess,sub} updates

2018-06-11 Thread Peter Eisentraut
On 6/7/18 23:54, Tom Lane wrote: > Peter Eisentraut writes: >> We didn't update those for beta1, as we usually do. Should we do it for >> beta2? > > Yes, if there are updates to be made. Better late than never. done -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Deve

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Robert Haas
On Wed, Jun 6, 2018 at 8:16 PM, Tomas Vondra wrote: > ... and this is pretty much what Jeff Davis suggested, I think. The > trouble is, each of those cases behaves nicely/terribly in different > corner cases. That's a really good point. If the number of groups is pretty small compared to the num

Re: why partition pruning doesn't work?

2018-06-11 Thread Tom Lane
David Rowley writes: > On 12 June 2018 at 02:26, Tom Lane wrote: >>> ... I'd previously tried having NULL subnodes in >>> the Append and I thought it required too much hacking work in >>> explain.c, >> No, that was pretty much exactly what I was envisioning. > What you're proposing exchanges lo

Re: SCRAM with channel binding downgrade attack

2018-06-11 Thread Magnus Hagander
On Mon, Jun 11, 2018 at 4:49 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 6/6/18 18:04, Michael Paquier wrote: > > On Wed, Jun 06, 2018 at 11:53:06PM +0300, Heikki Linnakangas wrote: > >> That would certainly be good. We've always had that problem, even with > md5 > >> -> p

Re: SCRAM with channel binding downgrade attack

2018-06-11 Thread Peter Eisentraut
On 6/6/18 18:04, Michael Paquier wrote: > On Wed, Jun 06, 2018 at 11:53:06PM +0300, Heikki Linnakangas wrote: >> That would certainly be good. We've always had that problem, even with md5 >> -> plaintext password downgrade, and it would be nice to fix it. It's quite >> late in the release cycle alr

Re: Supporting tls-server-end-point as SCRAM channel binding for OpenSSL 1.0.0 and 1.0.1

2018-06-11 Thread Peter Eisentraut
On 6/6/18 16:16, Steven Fackler wrote: > TLS 1.3, (which is currently in a draft state, but is theoretically > being finalized soon) does not support the TLS channel binding > algorithms [1]. From talking with one of the people working on the TLS > 1.3 standard, tls-unique is seen as particularly p

Re: why partition pruning doesn't work?

2018-06-11 Thread David Rowley
On 12 June 2018 at 02:26, Tom Lane wrote: >> However, if you didn't mean removing the executor >> initialise pruning, and just not remapping the arrays, then I'm not >> sure how we'd do that. I'd previously tried having NULL subnodes in >> the Append and I thought it required too much hacking wor

PostgreSQL 11 Beta 2 Release: 2018-06-28

2018-06-11 Thread Jonathan S. Katz
Hi, The Release Management Team is pleased to announce that the release date for PostgreSQL 11 Beta 2 is set to be 2018-06-28, which is roughly a month after Beta 1 released. We appreciate everyone’s diligent effort fixing open issues[1] and we hope to get even more closed before the Beta 2 relea

Re: why partition pruning doesn't work?

2018-06-11 Thread Tom Lane
David Rowley writes: > On 11 June 2018 at 10:49, Tom Lane wrote: >> * The business with ExecFindInitialMatchingSubPlans remapping the >> subplan indexes seems very dubious to me. Surely, that is adding >> way more complexity and fragility than it's worth. > I think having the ability to prune d

Re: Spilling hashed SetOps and aggregates to disk

2018-06-11 Thread Robert Haas
On Tue, Jun 5, 2018 at 1:46 AM, Jeff Davis wrote: > On Tue, 2018-06-05 at 07:04 +0200, Tomas Vondra wrote: >> I expect the eviction strategy to be the primary design challenge of >> this patch. The other bits will be mostly determined by this one >> piece. > > Not sure I agree that this is the pri

Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows

2018-06-11 Thread Tom Lane
Thomas Munro writes: > One question I have is whether it is against project policy to > backport a new file and a new user-facing function. Given that this has been broken since forever, and there've been no complaints before now, I do not think the case for back-patching is strong enough to just

Re: cursors with prepared statements

2018-06-11 Thread Amit Kapila
On Fri, Jun 8, 2018 at 1:12 AM, Peter Eisentraut wrote: > I have developed a patch that allows declaring cursors over prepared > statements: > > DECLARE cursor_name CURSOR FOR prepared_statement_name >[ USING param, param, ... ] > > This is an SQL standard f

Re: Performance regression with PostgreSQL 11 and partitioning

2018-06-11 Thread Robert Haas
On Fri, Jun 8, 2018 at 3:08 PM, Tom Lane wrote: > Robert Haas writes: >> That being said, I don't mind a bit if you want to look for further >> speedups here, but if you do, keep in mind that a lot of queries won't >> even use partition-wise join, so all of the arrays will be of length >> 1. Eve

Re: [PATCH v16] GSSAPI encryption support

2018-06-11 Thread Robert Haas
On Thu, Jun 7, 2018 at 6:11 PM, Thomas Munro wrote: >> Cool! Is there any reason that your patch for Travis and AppVeyor >> integration is not just committed to master? > > I think that's a good idea and I know that some others are in favour. One problem is that was discussed at PGCon it commits

Re: Performance regression with PostgreSQL 11 and partitioning

2018-06-11 Thread David Rowley
On 9 June 2018 at 07:08, Tom Lane wrote: > If we can > replace those with something along the line of root->index_array[varno] > we'll be better off across the board. Are you talking about the loop over the appinfos in functions such as adjust_appendrel_attrs_mutator? If so, please note that it'

Re: CF bug fix items

2018-06-11 Thread Etsuro Fujita
(2018/06/11 20:34), Andrew Dunstan wrote: On 06/11/2018 07:08 AM, Etsuro Fujita wrote: In one of those cases, "ConvertRowtypeExpr reference errors from partition-wise join", the patch has been marked Ready for Committer and then Etsuro seems to have changeed his mind. If it's not ready it should

Re: CF bug fix items

2018-06-11 Thread Andrew Dunstan
On 06/11/2018 07:08 AM, Etsuro Fujita wrote: In one of those cases, "ConvertRowtypeExpr reference errors from partition-wise join", the patch has been marked Ready for Committer and then Etsuro seems to have changeed his mind. If it's not ready it should be set back to "needs review" or "wa

Re: CF bug fix items

2018-06-11 Thread Etsuro Fujita
(2018/06/10 23:41), Andrew Dunstan wrote: I've been looking over the older items in the CF, specifically those in the "bug fix" category. Six of them are marked "ready for committer" and all of those have a committer named as either author or reviewer. It would be good to get those committed as

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-06-11 Thread Etsuro Fujita
(2018/06/07 19:42), Ashutosh Bapat wrote: On Wed, Jun 6, 2018 at 5:00 PM, Etsuro Fujita wrote: Since I'm not 100% sure that that is the right way to go, I've been rethinking how to fix this issue. Yet another idea I came up with to fix this is to redesign the handling of the tlists for childr

Re: Locking B-tree leafs immediately in exclusive mode

2018-06-11 Thread Simon Riggs
On 5 June 2018 at 14:45, Alexander Korotkov wrote: > Currently _bt_search() always locks leaf buffer in shared mode (aka BT_READ), > while caller can relock it later. However, I don't see what prevents > _bt_search() > from locking leaf immediately in exclusive mode (aka BT_WRITE) when required.

Re: Concurrency bug in UPDATE of partition-key

2018-06-11 Thread Amit Kapila
On Mon, Jun 11, 2018 at 3:02 PM, Amit Kapila wrote: > On Thu, Jun 7, 2018 at 1:53 PM, Amit Khandekar wrote: >> On 7 June 2018 at 11:44, Amit Kapila wrote: >>> On Tue, Jun 5, 2018 at 8:03 PM, Amit Khandekar >>> wrote: >>> >>> I think this will allow before row delete triggers to be fired more th

Re: Concurrency bug in UPDATE of partition-key

2018-06-11 Thread Amit Kapila
On Thu, Jun 7, 2018 at 1:53 PM, Amit Khandekar wrote: > On 7 June 2018 at 11:44, Amit Kapila wrote: >> On Tue, Jun 5, 2018 at 8:03 PM, Amit Khandekar >> wrote: >> >> I think this will allow before row delete triggers to be fired more than >> once. Normally, if the EvalPlanQual testing generates

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2018-06-11 Thread Masahiko Sawada
On Fri, May 25, 2018 at 8:41 PM, Moon, Insung wrote: > Hello Hackers, > > This propose a way to develop "Table-level" Transparent Data Encryption (TDE) > and Key Management Service (KMS) support in > PostgreSQL. > > > Issues on data encryption of PostgreSQL > == > Currently, in PostgreSQL

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-06-11 Thread Simon Riggs
On 9 June 2018 at 15:41, Amit Kapila wrote: > On Fri, Jun 8, 2018 at 5:27 PM, Simon Riggs wrote: >> On 8 June 2018 at 11:33, Amit Kapila wrote: >>> On Fri, Jun 8, 2018 at 1:53 PM, Simon Riggs wrote: So the attached patch fixes both the bug in the recent commit and the one I just

Re: Locking B-tree leafs immediately in exclusive mode

2018-06-11 Thread Rafia Sabih
On Tue, Jun 5, 2018 at 7:15 PM, Alexander Korotkov wrote: > Hi! > > Currently _bt_search() always locks leaf buffer in shared mode (aka BT_READ), > while caller can relock it later. However, I don't see what prevents > _bt_search() > from locking leaf immediately in exclusive mode (aka BT_WRITE)

Re: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian

2018-06-11 Thread David Rowley
On 11 June 2018 at 12:19, Tom Lane wrote: > David Rowley writes: >> On 10 June 2018 at 04:48, Tom Lane wrote: >>> So, IIUC, the issue is that for partitioning cases Append expects *all* >>> its children to be partitions of the *same* partitioned table? That >>> is, you could also break it with

Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows

2018-06-11 Thread Thomas Munro
On Mon, Mar 26, 2018 at 6:07 PM, Kyotaro HORIGUCHI wrote: > At Sun, 25 Mar 2018 22:15:52 +0900, "MauMau" wrote in > >> And thank you for your review. All modifications are done. > > Thank you for the new version. I marked this as "Ready for > Committer" with one change. Hi Tsunakawa-san and H

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-11 Thread Antonin Houska
Arseny Sher wrote: > Please see detailed description of the issues, tests which reproduce > them and fixes in the attached patch. I've played with your tests and gdb for a while, both w/o and with your patch. I think I can understand both problems. I could not invent simpler way to fix them. One