Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-01-11 Thread Stephen Frost
Amul, * amul sul (sula...@gmail.com) wrote: > Agree, updated in the attached patch. Patch 0001 also includes your > previous review comment[1] and typo correction suggested by Alvaro[2]. Looks like this needs to be rebased (though the failures aren't too bad, from what I'm seeing), so going to

Re: [HACKERS] Early locking option to parallel backup

2018-01-11 Thread Stephen Frost
Lucas, Robert, all, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Nov 6, 2017 at 4:43 AM, Tom Lane wrote: > > I wonder if we couldn't somehow repurpose the work that was done for > > parallel workers' locks. Lots of security-type issues to be handled > > if we're to

Re: [HACKERS] Restricting maximum keep segments by repslots

2018-01-11 Thread Greg Stark
On 11 January 2018 at 09:55, Sergei Kornilov wrote: > if (active_pid != 0) > status = "streaming"; > else > status = "keeping"; Perhaps "idle" by analogy to a pg_stat_activity entry for a backend that's connected but not doing

Re: numeric regression test passes, but why?

2018-01-11 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > The behaviour seems to have changed in 9.6: Indeed, https://www.postgresql.org/docs/current/static/release-9-6.html has the following entry: * Improve the accuracy of the ln(), log(), exp(), and pow() functions for type numeric (Dean

Re: add queryEnv to ExplainOneQuery_hook

2018-01-11 Thread Michael Paquier
On Fri, Jan 12, 2018 at 12:43:22AM +1300, Thomas Munro wrote: > Yeah, I think you're right. That's an oversight in 18ce3a4a. +1. > I'm surprised we haven't heard any complaints sooner if there are > advisors using that hook[1] and expecting to be able to forward to > ExplainOnePlan(), but I

Re: numeric regression test passes, but why?

2018-01-11 Thread Sergei Kornilov
Hello I am surprised, but i can confirm error on versions prior 9.6: on 9.5, 9.4, 9.3 same error. On 9.6 and 10 query works correctly All checked postgresql are x86_64 from postgresql debian repository: http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main postgres=# select 0.5678::numeric

Re: WIP Patch: Pgbench Serialization and deadlock errors

2018-01-11 Thread Marina Polyakova
On 03-01-2018 19:28, Fabien COELHO wrote: Hello Marina, Hello! Some comment about WIP pgbench error handling v4. Many thanks! Patch applies, compiles, global & local "make check" are ok. doc compiles. I'm generally okay with having such a feature, but I'd like it to be *MUCH* simpler,

Re: numeric regression test passes, but why?

2018-01-11 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Chapman Flack writes: >> I see there are some tests in src/test/regress: >> [ that don't work for me ] >> Is there some special GUC setting in effect during the make check >> that would be different in my ordinary session? What else

Re: CUBE seems a bit confused about ORDER BY

2018-01-11 Thread Alvaro Herrera
Teodor Sigaev wrote: > > > I think this is useful enough.  The fact remains that we can't check > > very well for functions; maybe suggest a LIKE clause to look for ~> > > anywhere in function source code? > Seems, it's overengineering. It could give a false positive results > and

Re: numeric regression test passes, but why?

2018-01-11 Thread Chapman Flack
On 01/11/18 02:07, Tom Lane wrote: > Hm, it won't help your sanity to know that those cases pass fine > for me, interactively, on a couple of different machines: > ... > You sure you're using a stock build of Postgres? No handmade > versions of operator ^ lying around? Interesting thought

Re: [HACKERS] Secondary index access optimizations

2018-01-11 Thread Konstantin Knizhnik
On 11.01.2018 12:34, Antonin Houska wrote: Konstantin Knizhnik wrote: On 09.01.2018 19:48, Antonin Houska wrote: Have you considered using the range types (internally in operator_predicate_proof()) instead of hard-coding operator OIDs? The range types do have

Re: CUBE seems a bit confused about ORDER BY

2018-01-11 Thread Teodor Sigaev
Thanks to all, pushed I think this is useful enough.  The fact remains that we can't check very well for functions; maybe suggest a LIKE clause to look for ~> anywhere in function source code?Seems, it's overengineering. It could give a false positive results and doesn't cover all

Re: add queryEnv to ExplainOneQuery_hook

2018-01-11 Thread Thomas Munro
On Fri, Jan 12, 2018 at 12:16 AM, Tatsuro Yamada wrote: > I found a variable (queryEnv) which should be added in > ExplainOneQuery_hook because if it is missing, hook function > can't call ExplainOnePlan. > Sorry if this wasn't correct. > > Please find attached a

add queryEnv to ExplainOneQuery_hook

2018-01-11 Thread Tatsuro Yamada
Hi, I found a variable (queryEnv) which should be added in ExplainOneQuery_hook because if it is missing, hook function can't call ExplainOnePlan. Sorry if this wasn't correct. Please find attached a patch. Tatsuro Yamada NTT Open Source Software Center diff --git

Re: CUBE seems a bit confused about ORDER BY

2018-01-11 Thread Alexander Korotkov
On Wed, Jan 10, 2018 at 8:02 PM, Alvaro Herrera wrote: > Teodor Sigaev wrote: > > > SQL-query seems too huge for release notes and isn't looking for > > materialized view (fixable) and functional indexes with function which > > contains this operator somewhere inside

Re: [HACKERS] Partition-wise aggregation/grouping

2018-01-11 Thread Jeevan Chalke
> On Thu, Dec 14, 2017 at 4:01 PM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > >> >> + >> +-- Partial aggregation as GROUP BY clause does not match with PARTITION >> KEY >> +EXPLAIN (COSTS OFF) >> +SELECT b, sum(a), count(*) FROM pagg_tab GROUP BY b ORDER BY 1, 2, 3; >> +

Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning

2018-01-11 Thread David Rowley
> On 11 January 2018 at 22:52, Amit Langote > wrote: >> Can you point me to the email where Beena reported the problem in question? > > https://www.postgresql.org/message-id/CAOG9ApERiop7P=grkqqka82aubkjxn3qvixie3wk4wqqpej...@mail.gmail.com To save you from having

Minor code improvement to estimate_path_cost_size in postgres_fdw

2018-01-11 Thread Tatsuro Yamada
Hi, The declaration of estimate_path_cost_size uses baserel, but the actual definition uses foreignrel. It would be better to sync. Please find attached a patch. Tatsuro Yamada NTT Open Source Software Center diff --git a/contrib/postgres_fdw/postgres_fdw.c

Re: [HACKERS] A design for amcheck heapam verification

2018-01-11 Thread Andrey Borodin
Hello! I like heapam verification functionality and use it right now. So, I'm planning to provide review for this patch, probably, this week. From my current use I have some thoughts on interface. Here's what I get. # select bt_index_check('messagefiltervalue_group_id_59490523e6ee451f',true);

Re: [HACKERS] Creating backup history files for backups taken from standbys

2018-01-11 Thread Masahiko Sawada
On Sun, Jan 7, 2018 at 1:35 AM, David Steele wrote: > On 1/6/18 3:48 AM, Michael Paquier wrote: >> >> On Fri, Jan 5, 2018 at 11:27 PM, Simon Riggs >> wrote: >> >>> Which also makes it a smaller and clearer patch >> >> >> Yes, this generates less diffs,

Re: [HACKERS] path toward faster partition pruning

2018-01-11 Thread Amit Langote
On 2018/01/04 23:29, Ashutosh Bapat wrote: > On Fri, Dec 29, 2017 at 6:32 PM, Alvaro Herrera > wrote: >> I happened to notice that Ashutosh's patch series at >> https://www.postgresql.org/message-id/CAFjFpReJhFSoy6DqH0ipFSHd=sLNEkSzAtz4VWCaS-w2jZL=u...@mail.gmail.com >>

Re: [HACKERS] Restricting maximum keep segments by repslots

2018-01-11 Thread Sergei Kornilov
Hello >> patch -p1 gives some "Stripping trailing CRs from patch" >> messages for me, but applied to current HEAD and builds. After > > Hmm. I wonder why I get that complaint so often. (It's rather > common? or caused by the MIME format of my mail?) I'd say with > confidence that it is because

Re: [HACKERS] Secondary index access optimizations

2018-01-11 Thread Antonin Houska
Konstantin Knizhnik wrote: > On 09.01.2018 19:48, Antonin Houska wrote: > >> Have you considered using the range types (internally in >> operator_predicate_proof()) instead of hard-coding operator OIDs? The range >> types do have the knowledge that k < 20001 and k <=

Re: [HACKERS] asynchronous execution

2018-01-11 Thread Kyotaro HORIGUCHI
At Mon, 11 Dec 2017 20:07:53 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20171211.200753.191768178.horiguchi.kyot...@lab.ntt.co.jp> > > The attached PoC patch theoretically has no impact on the normal > > code paths and just brings gain in async

Re: [HACKERS] WAL logging problem in 9.4.3?

2018-01-11 Thread Kyotaro HORIGUCHI
Hello, At Thu, 4 Jan 2018 23:10:40 -0500, Stephen Frost wrote in <20180105041040.gi2...@tamriel.snowman.net> > > The attached patch applies on the current HEAD and passes all > > recovery tests. > > This is currently marked as 'waiting on author' in the CF app, but it >

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2018-01-11 Thread Michael Paquier
On Wed, Jan 10, 2018 at 11:49:47PM +0100, Daniel Gustafsson wrote: >> On 08 Jan 2018, at 17:27, Robert Haas wrote: >> nor has anyone taken the trouble to list with precision all of the >> places where the behavior will change. I think the latter is >> absolutely

<    1   2