Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-06 Thread Amit Kapila
On Sat, May 6, 2017 at 10:41 PM, Robert Haas wrote: > On Sat, May 6, 2017 at 12:55 PM, Robert Haas wrote: >> Oh! Good catch. Given that the behavior in question is intentional >> there and intended to provide backward compatibility, changing it in

Re: [HACKERS] PG 10 release notes

2017-05-06 Thread Bruce Momjian
On Thu, May 4, 2017 at 07:01:17PM -0300, Alvaro Herrera wrote: > Thanks for doing this, looks great. A few notes: > > > > >Add the ability to compute a correlation ratio and the number of >distinct values on several columns (Tomas Vondra, David Rowley) >

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-05-06 Thread Stephen Frost
Rod, * Rod Taylor (rod.tay...@gmail.com) wrote: > UPDATE seems to work as described (unable to create records you cannot > select); both the single rule version and multi-rule version seem to work > the same. Thanks for reporting this and helping to test the fix. I've now pushed the fix and

Re: [HACKERS] MSVC odd TAP test problem

2017-05-06 Thread Andrew Dunstan
On 05/06/2017 07:41 PM, Craig Ringer wrote: > > > On 7 May 2017 4:24 am, "Andrew Dunstan" > > wrote: > > > I have been working on enabling the remaining TAP tests on MSVC > build in > the buildfarm client, but I

Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument

2017-05-06 Thread Andres Freund
On 2017-04-06 14:57:56 -0700, Peter Geoghegan wrote: > On Thu, Apr 6, 2017 at 2:50 PM, Andres Freund wrote: > > Pushed with very minor wording changes. > > This had a typo: > > + * If copy is true, the slot receives a copied tuple that'll that will stay Belatedly fixed.

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-06 Thread Andres Freund
Hi, On 2017-05-04 18:24:47 -0700, Andres Freund wrote: > Hi, > > On 2016-12-22 19:33:30 +, Andres Freund wrote: > > Skip checkpoints, archiving on idle systems. > > As part of an independent bugfix I noticed that Michael & I appear to > have introduced an off-by-one here. A few locations do

[HACKERS] Google Summer Of Code 2017 & PostgreSQL

2017-05-06 Thread Stephen Frost
Greetings! I am very pleased to be able to announce that the PostgreSQL project has been approved for 4 GSoC projects this year! The four projects are: - Add errors handling and parallel execution to COPY Student: Alexey Kondratov Mentors: Anastasia Lubennikova, Alexander Korotkov, Alvaro

Re: [HACKERS] MSVC odd TAP test problem

2017-05-06 Thread Craig Ringer
On 7 May 2017 4:24 am, "Andrew Dunstan" wrote: I have been working on enabling the remaining TAP tests on MSVC build in the buildfarm client, but I have come across an odd problem. The bin tests all run fine, but the recover tests crash and in such a way as to

Re: [HACKERS] CTE inlining

2017-05-06 Thread Vik Fearing
On 05/03/2017 07:33 PM, Alvaro Herrera wrote: > 1) we switch unmarked CTEs as inlineable by default in pg11. What seems > likely to happen for a user that upgrades to pg11 is that 5 out of 10 > CTE-using queries are going to become faster than with pg10, and they > are going to be happy; 4 out of

[HACKERS] MSVC odd TAP test problem

2017-05-06 Thread Andrew Dunstan
I have been working on enabling the remaining TAP tests on MSVC build in the buildfarm client, but I have come across an odd problem. The bin tests all run fine, but the recover tests crash and in such a way as to crash the buildfarm client itself and require some manual cleanup. This happens at

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Fabien COELHO
functions with the attribute SECURITY DEFINER. In Unix parlance, the session user is the real user and the current user is the effective user. + current_role and user are + synonyms for current_user. (The SQL standard draws + a distinction between current_role +

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-06 Thread Noah Misch
On Wed, May 03, 2017 at 11:29:29PM -0400, Peter Eisentraut wrote: > On 4/30/17 04:05, Noah Misch wrote: > > The above-described topic is currently a PostgreSQL 10 open item. Peter, > > since you committed the patch believed to have created it, you own this open > > item. If some other commit is

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-06 Thread Noah Misch
On Tue, May 02, 2017 at 06:06:47PM -0500, Kevin Grittner wrote: > On Fri, Apr 28, 2017 at 10:56 PM, Tom Lane wrote: > > > They will fire if you have an INSTEAD OF row-level trigger; the existence > > of that trigger is what determines whether we implement DML on a view > >

[HACKERS] Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-06 Thread Noah Misch
On Mon, May 01, 2017 at 11:10:52AM -0500, Kevin Grittner wrote: > On Mon, May 1, 2017 at 10:01 AM, Robert Haas wrote: > > > It seems pretty clear to me that this is busted. > > I don't think you actually tested anything that is dependent on any > of my patches there. > >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-06 Thread Noah Misch
On Fri, May 05, 2017 at 11:01:57AM -0400, Peter Eisentraut wrote: > On 5/2/17 21:44, Noah Misch wrote: > >> I wonder if we should have an --no-subscriptions option, now that they > >> are dumped by default, just like we have --no-blobs, --no-owner, > >> --no-password, --no-privileges, --no-acl,

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Tom Lane
Fabien COELHO writes: >> I agree we ought to document this, but we likely need to mention >> the discrepancy from the spec, too. > Yep. A little subtle, though. Maybe it is enough to just say that for pg a > user is a role, which is not the case in the standard? I did it

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Fabien COELHO
psql> SELECT CURRENT_ROLE; current_user -- not a typo, it really says "current_user" Not as of HEAD ;-) Good:-) I was connecting to a 9.6.2 server from a pg10dev client. Is there a special reason why it does not appear in the documentation? Oversight, evidently. Ok. Also,

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Tom Lane
Petr Jelinek writes: > On 06/05/17 19:15, Tom Lane wrote: >> (Or, wait a minute. That documentation only applies to v10, but we >> need to be writing this relnote for 9.6 users. What terminology should >> we be using anyway?) > Yeah we need to somehow mention that

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Petr Jelinek
On 06/05/17 19:15, Tom Lane wrote: > Petr Jelinek writes: >> On 06/05/17 18:16, Tom Lane wrote: >>> Hmm, I'm hoping for something more user-oriented. Is the corruption >>> time-limited? What's an "exported snapshot" anyway, is it the same >>> thing as

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Tom Lane
Petr Jelinek writes: > On 06/05/17 18:16, Tom Lane wrote: >> Hmm, I'm hoping for something more user-oriented. Is the corruption >> time-limited? What's an "exported snapshot" anyway, is it the same >> thing as pg_export_snapshot(), and if so what's that got to do

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-06 Thread Robert Haas
On Sat, May 6, 2017 at 12:55 PM, Robert Haas wrote: > Oh! Good catch. Given that the behavior in question is intentional > there and intended to provide backward compatibility, changing it in > back-branches doesn't seem like a good plan. I'll adjust the patch so > that

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Tom Lane
Fabien COELHO writes: > While trying to understand whether there was any difference, I noticed > that CURRENT_ROLE is an undocumented synonymous for CURRENT_USER: > psql> SELECT CURRENT_ROLE; > current_user -- not a typo, it really says "current_user" Not as of HEAD

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Petr Jelinek
On 06/05/17 18:16, Tom Lane wrote: > Petr Jelinek writes: >> On 06/05/17 17:25, Tom Lane wrote: >>> OK, can you suggest better wording? > >> Something like the attached (it requires some polishing of English >> probably). > > Hmm, I'm hoping for something more

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-06 Thread Robert Haas
On Fri, May 5, 2017 at 7:11 PM, Amit Kapila wrote: > There is a comment in the code which explains why currently we ignore > errors from DEALLOCATE ALL. > > * DEALLOCATE ALL only exists in 8.3 and later, so this > * constrains how old a server postgres_fdw can > *

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Tom Lane
Petr Jelinek writes: > On 06/05/17 17:25, Tom Lane wrote: >> OK, can you suggest better wording? > Something like the attached (it requires some polishing of English > probably). Hmm, I'm hoping for something more user-oriented. Is the corruption time-limited?

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Petr Jelinek
On 06/05/17 17:25, Tom Lane wrote: > Petr Jelinek writes: >> Hmm, the 2bef06d51 and 56e19d938 are fixes for different bugs, we can >> keep them together since result of both is corrupted snapshot, but the >> description can't just mangle pieces of text from different

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Tom Lane
Petr Jelinek writes: > Hmm, the 2bef06d51 and 56e19d938 are fixes for different bugs, we can > keep them together since result of both is corrupted snapshot, but the > description can't just mangle pieces of text from different commits > together like this as that's

[HACKERS] Atomics for heap_parallelscan_nextpage()

2017-05-06 Thread David Rowley
Hi, A while back I did some benchmarking on a big 4 socket machine to explore a bit around the outer limits of parallel aggregates. I discovered along the way that, given enough workers, and a simple enough task, that seq-scan workers were held up waiting for the lock to be released in

Re: [HACKERS] Draft release notes for next week's back-branch releases

2017-05-06 Thread Petr Jelinek
On 06/05/17 01:37, Tom Lane wrote: > I've written $SUBJECT ... you can find them at > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=54dbd4dc78b045ffcc046b9a43681770c3992dd4 > Hmm, the 2bef06d51 and 56e19d938 are fixes for different bugs, we can keep them together since

Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.

2017-05-06 Thread Petr Jelinek
On 05/05/17 19:51, Petr Jelinek wrote: > On 05/05/17 14:40, tushar wrote: >> Hi, >> >> While testing 'logical replication' against v10 , i encountered one >> issue where data stop migrating after ALTER PUBLICATION. >> >> X Server >> \\ Make sure wal_level is set to logical in postgresql.conf file

Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range

2017-05-06 Thread Amit Kapila
On Fri, May 5, 2017 at 1:28 PM, Dmitriy Sarafannikov wrote: > Amit, thanks for comments! > >> 1. >> +#define InitNonVacuumableSnapshot(snapshotdata) \ >> + do { \ >> + (snapshotdata).satisfies = HeapTupleSatisfiesNonVacuumable; \ >> + (snapshotdata).xmin =

Re: [HACKERS] password_encryption, default and 'plain' support

2017-05-06 Thread Gavin Flower
On 06/05/17 22:44, Vik Fearing wrote: On 05/05/2017 02:42 PM, Michael Paquier wrote: +This option is obsolete but still accepted for backwards +compatibility. Isn't that incorrect English? No. It seems to me that this be non-plural, as "for backward compatibility".

Re: [HACKERS] password_encryption, default and 'plain' support

2017-05-06 Thread Vik Fearing
On 05/05/2017 02:42 PM, Michael Paquier wrote: > +This option is obsolete but still accepted for backwards > +compatibility. > Isn't that incorrect English? No. > It seems to me that this be non-plural, > as "for backward compatibility". "Backwards" is not plural, it's a

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-06 Thread Michael Paquier
On Fri, May 5, 2017 at 11:50 PM, Peter Eisentraut wrote: > On 5/5/17 01:26, Michael Paquier wrote: >> The only code path doing HOT-pruning and generating WAL is >> heap_page_prune(). Do you think that we need to worry about FPWs as >> well? >> >> Attached is an

[HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Fabien COELHO
While trying to understand whether there was any difference, I noticed that CURRENT_ROLE is an undocumented synonymous for CURRENT_USER: psql> SELECT CURRENT_ROLE; current_user -- not a typo, it really says "current_user" calvin sh> grep -i CURRENT_ROLE doc/src/sgml/*/*.sgml

Re: [HACKERS] Should pg_current_wal_location() become pg_current_wal_lsn()

2017-05-06 Thread Tom Lane
Noah Misch writes: > On Fri, May 05, 2017 at 03:36:39AM +1200, David Rowley wrote: >> Do any of the committers who voted for this change feel inclined to >> pick this patch up? > I'll echo that question. This open item lacks a clear owner. One might argue > that 806091c