Re: [HACKERS] show precise repos version for dev builds?

2017-10-13 Thread Fabien COELHO
Hello Robert, Mmph. I understand the desire to identify the exact commit used for a build somehow, but something whose output depends on whether or not I left a branch lying around locally doesn't seem that great. Indeed, the branch/tag search might have a little strange behavior. Probably

[HACKERS] SIGSEGV in BRIN autosummarize

2017-10-13 Thread Justin Pryzby
I upgraded one of our customers to PG10 Tuesday night, and Wednesday replaced an BTREE index with BRIN index (WITH autosummarize). Today I see: < 2017-10-13 17:22:47.839 -04 >LOG: server process (PID 32127) was terminated by signal 11: Segmentation fault < 2017-10-13 17:22:47.839 -04 >DETAIL:

[HACKERS] Re: heap/SLRU verification, relfrozenxid cut-off, and freeze-the-dead bug (Was: amcheck (B-Tree integrity checking tool))

2017-10-13 Thread Noah Misch
On Mon, Oct 09, 2017 at 05:19:11PM -0700, Peter Geoghegan wrote: > On Sun, Oct 16, 2016 at 6:46 PM, Noah Misch wrote: > > - Verify agreement between CLOG, MULTIXACT, and hint bits. > > This is where it gets complicated, I think. This is what I really want > to talk about. > >

Re: [HACKERS] pg_control_recovery() return value when not in recovery

2017-10-13 Thread Andres Freund
On 2017-10-13 16:31:37 -0700, Joe Conway wrote: > On 09/17/2017 11:29 PM, Andres Freund wrote: > > On 2017-09-18 07:24:43 +0100, Simon Riggs wrote: > >> On 18 September 2017 at 05:50, Andres Freund wrote: > >> > Hi, > >> > > >> > Just noticed that we're returning the

Re: [HACKERS] show precise repos version for dev builds?

2017-10-13 Thread Michael Paquier
On Sat, Oct 14, 2017 at 4:47 AM, Robert Haas wrote: > Mmph. I understand the desire to identify the exact commit used for a > build somehow, but something whose output depends on whether or not I > left a branch lying around locally doesn't seem that great. Similarly to

Re: [HACKERS] pg_control_recovery() return value when not in recovery

2017-10-13 Thread Joe Conway
On 09/17/2017 11:29 PM, Andres Freund wrote: > On 2017-09-18 07:24:43 +0100, Simon Riggs wrote: >> On 18 September 2017 at 05:50, Andres Freund wrote: >> > Hi, >> > >> > Just noticed that we're returning the underlying values for >> > pg_control_recovery() without any checks:

Re: [HACKERS] Continuous integration on Windows?

2017-10-13 Thread Thomas Munro
On Sat, Oct 14, 2017 at 11:27 AM, Thomas Munro wrote: > On Sat, Oct 14, 2017 at 7:47 AM, legrand legrand > wrote: >> Is it stored somewhere to permit to users like me >> that want to test pg 10 on windows >> without having to build it ?

Re: [HACKERS] Aggregate transition state merging vs. hypothetical set functions

2017-10-13 Thread Tom Lane
I wrote: > Moving on to the exact color of the bikeshed: it seems like the right > way to present this to users of CREATE AGGREGATE is in terms of "does > the final function modify the transition state?". So maybe the values > could be spelled > SMODIFY = READ_ONLY ffunc never touches state, ok

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
I want to get the join graph of a given query. Which has node for each relation and an edge between two nodes if they have a join predicate among them. On 14-Oct-2017 3:58 AM, "Andres Freund" wrote: > On 2017-10-14 03:49:57 +0530, Gourav Kumar wrote: > > But then is there

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Andres Freund
On 2017-10-14 03:49:57 +0530, Gourav Kumar wrote: > But then is there some way to tell Optimizer not to consider transitive > joins ? What are you actually trying to achieve here? - Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Continuous integration on Windows?

2017-10-13 Thread Thomas Munro
On Sat, Oct 14, 2017 at 7:47 AM, legrand legrand wrote: > This may seems obvious for you > > but where is the build result ? Each CI platform has a web page corresponding to your GitHub/BitBucket/... user account that lists builds results. You can also get

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
But then is there some way to tell Optimizer not to consider transitive joins ? Or to know if the join is transitive or not ? On 14-Oct-2017 3:43 AM, "Tom Lane" wrote: > Gourav Kumar writes: > > For e.g. I am checking for this query > > ... > > where

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Tom Lane
Gourav Kumar writes: > For e.g. I am checking for this query > ... > where > and ss1.ca_county = ss2.ca_county > and ss2.ca_county = ss3.ca_county > and ss1.ca_county = ws1.ca_county > and ws1.ca_county = ws2.ca_county > and ws1.ca_county = ws3.ca_county

Re: [HACKERS] Discussion on missing optimizations

2017-10-13 Thread Andres Freund
Hi, On 2017-10-14 10:38:13 +1300, David Rowley wrote: > On 12 October 2017 at 04:50, Robert Haas wrote: > > We haven't really done a very good job figuring out what to do about > > optimizations that some people (mostly you) think are marginal. It's > > obviously true

Re: [HACKERS] How does postgres store the join predicate for a relation in a given query

2017-10-13 Thread Gourav Kumar
Why does have_relevant_joinclause() and have_relevant_eclass_joinclause() return true for all possible joins for the query given below. Even when they have no join predicate between them. e.g. join between ss1 & ws3, ss2 & ws3 etc. The query is : TPC-DS query 50 -- query 50 in stream 0 using

Re: [HACKERS] Discussion on missing optimizations

2017-10-13 Thread David Rowley
On 12 October 2017 at 04:50, Robert Haas wrote: > We haven't really done a very good job figuring out what to do about > optimizations that some people (mostly you) think are marginal. It's > obviously true that we can't just burn infinite planner cycles on > things that

Re: [HACKERS] Improve catcache/syscache performance.

2017-10-13 Thread Andres Freund
Hi, On 2017-10-13 10:38:47 -0700, Andres Freund wrote: > On 2017-10-13 13:06:41 -0400, Robert Haas wrote: > > On Thu, Sep 14, 2017 at 2:12 AM, Andres Freund wrote: > > > This patch gives me roughly 8% speedup in a workload that consists out > > > of a fast query that returns

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
For e.g. I am checking for this query with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
I tried debugging the code, at no point in execution the function make_rels_by_clauseless_joins was called. Although optimizer did consider some of the joins which are cross products. On 14 October 2017 at 01:57, Gourav Kumar wrote: > Can I use something like joininfo,

Re: [HACKERS] Extended statistics is not working on Vars hidden under a RelabelType

2017-10-13 Thread David Rowley
On 14 October 2017 at 09:04, Robert Haas wrote: > On Mon, Oct 9, 2017 at 11:03 PM, David Rowley > wrote: >> -- Unpatched >> Planning time: 0.184 ms >> Execution time: 105.878 ms >> >> -- Patched >> Planning time: 2.175 ms >> Execution

Re: [HACKERS] Extended statistics is not working on Vars hidden under a RelabelType

2017-10-13 Thread Tomas Vondra
On 10/13/2017 10:04 PM, Robert Haas wrote: > On Mon, Oct 9, 2017 at 11:03 PM, David Rowley > wrote: >> -- Unpatched >> Planning time: 0.184 ms >> Execution time: 105.878 ms >> >> -- Patched >> Planning time: 2.175 ms >> Execution time: 106.326 ms > > This might

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-13 Thread Peter Geoghegan
On Fri, Oct 13, 2017 at 1:02 PM, Robert Haas wrote: >> I don't think it's our place to "interpret" the bits. Are we *also* >> going to show HEAP_XMIN_FROZEN when xmin is physically set to >> FrozenTransactionId? > > No, of course not. We're talking about how to display the

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
Can I use something like joininfo, which will store the join predicates and I can check if there is no join predicate among the two relations don't consider them. On 14 October 2017 at 01:48, Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > On Fri, Oct 13, 2017 at 5:08 PM, Robert

Re: [HACKERS] Parallel safety for extern params

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 1:19 AM, Amit Kapila wrote: > After fixing this problem, when I ran the regression tests with > force_parallel_mode = regress, I saw multiple other failures. All the > failures boil down to two kinds of cases: > > 1. There was an assumption while

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Fabrízio de Royes Mello
On Fri, Oct 13, 2017 at 5:08 PM, Robert Haas wrote: > > On Fri, Oct 13, 2017 at 4:06 PM, Gourav Kumar wrote: > > Can you guide me where to look for it? > > Search for make_rels_by_clauseless_joins. > I wonder if it's possible implement it as an

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 4:06 PM, Gourav Kumar wrote: > Can you guide me where to look for it? Search for make_rels_by_clauseless_joins. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
Can you guide me where to look for it? On 14 October 2017 at 01:35, Robert Haas wrote: > On Fri, Oct 13, 2017 at 3:41 PM, Gourav Kumar > wrote: > > is there some way through which I can disable cross products in > postgresql? > > > > This will make

Re: [HACKERS] Disable cross products in postgres

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 3:41 PM, Gourav Kumar wrote: > is there some way through which I can disable cross products in postgresql? > > This will make the DP join to not to consider join between two relations if > they don't have a join predicate among them. I mean, it would

Re: [HACKERS] Extended statistics is not working on Vars hidden under a RelabelType

2017-10-13 Thread Robert Haas
On Mon, Oct 9, 2017 at 11:03 PM, David Rowley wrote: > -- Unpatched > Planning time: 0.184 ms > Execution time: 105.878 ms > > -- Patched > Planning time: 2.175 ms > Execution time: 106.326 ms This might not be the best example to show the advantages of the

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-13 Thread Robert Haas
On Thu, Oct 12, 2017 at 7:35 PM, Peter Geoghegan wrote: > On Tue, Aug 15, 2017 at 10:54 AM, Robert Haas wrote: >>> Or at least make the filtering optional. >> >> I don't think "filtering" is the right way to think about it. It's >> just labeling each

Re: [HACKERS] show precise repos version for dev builds?

2017-10-13 Thread Robert Haas
On Thu, Oct 12, 2017 at 4:50 PM, Fabien COELHO wrote: > "svnversion" adds a "M" for modified on the status. There is an option with > "git describe" to get something similar: > > git describe --long --always --all --dirty I tried this out a bit: [rhaas pgsql]$ git

[HACKERS] Disable cross products in postgres

2017-10-13 Thread Gourav Kumar
Hi all, is there some way through which I can disable cross products in postgresql? This will make the DP join to not to consider join between two relations if they don't have a join predicate among them. Thanks, Gourav Kumar Computer Science and Automation Indian Institute of Science

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Alexander Korotkov
On Fri, Oct 13, 2017 at 9:41 PM, Robert Haas wrote: > On Fri, Oct 13, 2017 at 1:59 PM, Peter Geoghegan wrote: > >> Fully agreed. > > > > If we implement that interface, where does that leave EvalPlanQual()? > >From the first glance, it seems that pluggable

Re: [HACKERS] relkind check in DefineIndex

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 12:38 PM, Alvaro Herrera wrote: > The relkind check in DefineIndex has grown into an ugly rats nest of > 'if' statements. I propose to change it into a switch, as per the > attached. wfm -- Robert Haas EnterpriseDB: http://www.enterprisedb.com

Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 12:34 PM, Alvaro Herrera wrote: > Robert Haas wrote: >> Implement table partitioning. > >> Currently, tables can be range-partitioned or list-partitioned. List >> partitioning is limited to a single column, but range partitioning can >> involve

[HACKERS] relkind check in DefineIndex

2017-10-13 Thread Alvaro Herrera
The relkind check in DefineIndex has grown into an ugly rats nest of 'if' statements. I propose to change it into a switch, as per the attached. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >From

Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.

2017-10-13 Thread Alvaro Herrera
Robert Haas wrote: > Implement table partitioning. > Currently, tables can be range-partitioned or list-partitioned. List > partitioning is limited to a single column, but range partitioning can > involve multiple columns. A partitioning "column" can be an > expression. I find the "partition

Re: [HACKERS] Parallel Bitmap Heap Scans segfaults due to (tbm->dsa==NULL) on PostgreSQL 10

2017-10-13 Thread Robert Haas
On Thu, Oct 12, 2017 at 9:14 AM, Dilip Kumar wrote: >> Yep, this fixes the failures for me. >> > Thanks for confirming. Committed and back-patched to v10. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Alexander Korotkov
On Fri, Oct 13, 2017 at 9:37 PM, Robert Haas wrote: > On Fri, Oct 13, 2017 at 5:25 AM, Kuntal Ghosh > wrote: > > For some other > > storage engine, if we maintain the older version in different storage, > > undo for example, and don't require a

Re: [HACKERS] Continuous integration on Windows?

2017-10-13 Thread legrand legrand
This may seems obvious for you but where is the build result ? Is it stored somewhere to permit to users like me that want to test pg 10 on windows without having to build it ? Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html -- Sent via

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 1:59 PM, Peter Geoghegan wrote: >> Fully agreed. > > If we implement that interface, where does that leave EvalPlanQual()? > Do those semantics have to be preserved? For a general-purpose heap storage format, I would say yes. I mean, we don't really have

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 5:25 AM, Kuntal Ghosh wrote: > For some other > storage engine, if we maintain the older version in different storage, > undo for example, and don't require a new index entry, should we still > call it HOT-chain? I would say, emphatically, no.

Re: [HACKERS] Improve catcache/syscache performance.

2017-10-13 Thread Tom Lane
Andres Freund writes: > On 2017-10-13 14:07:54 -0400, Tom Lane wrote: >> One idea might be to see if we can precalculate all the control data >> needed for the caches and set it up as compile-time constants, >> a la Gen_fmgrtab.pl, rather than reading it from the catalogs

Re: [HACKERS] Improve catcache/syscache performance.

2017-10-13 Thread Andres Freund
On 2017-10-13 14:07:54 -0400, Tom Lane wrote: > One idea might be to see if we can precalculate all the control data > needed for the caches and set it up as compile-time constants, > a la Gen_fmgrtab.pl, rather than reading it from the catalogs during > startup. That would make the code less

Re: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)

2017-10-13 Thread Robert Haas
On Fri, Oct 6, 2017 at 5:07 PM, Badrul Chowdhury wrote: > I added a mechanism to fall back to v3.0 if the BE fails to start when FE > initiates a connection with v3.1 (with optional startup parameters). This > completely eliminates the need to backpatch older servers, ie

Re: [HACKERS] Improve catcache/syscache performance.

2017-10-13 Thread Tom Lane
Andres Freund writes: > On 2017-10-13 13:06:41 -0400, Robert Haas wrote: >> I don't think it's this patch's job to do it, but it seems like we >> ought to just invent some early-initialization step where things like >> this can happen, so that we don't have to branch here at

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Peter Geoghegan
On Thu, Oct 12, 2017 at 2:23 PM, Robert Haas wrote: > On Thu, Oct 12, 2017 at 4:38 PM, Alexander Korotkov >> However I imply that alternative storage would share our "MVCC model". So, >> it >> should share our transactional model including transactions, >> subtransactions,

Re: [HACKERS] Improve catcache/syscache performance.

2017-10-13 Thread Andres Freund
Hi, On 2017-10-13 13:06:41 -0400, Robert Haas wrote: > On Thu, Sep 14, 2017 at 2:12 AM, Andres Freund wrote: > > This patch gives me roughly 8% speedup in a workload that consists out > > of a fast query that returns a lot of columns. If I apply a few > > other performance

Re: [HACKERS] Determine state of cluster (HA)

2017-10-13 Thread Joshua D. Drake
On 10/12/2017 05:50 PM, Joshua D. Drake wrote: -Hackers, Bumping this. I had a long call with a firm developing front end proxy/cache/HA for Postgres today. Essentially the software is a replacement for PGPool in entirety but also supports analytics etc... When I was asking them about

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 12:56 PM, Tom Lane wrote: > It's better ... but after reading the patched code, a lot of my remaining > beef is with the lack of clarity of the comments. You need ESP to > understand what the function is trying to accomplish and what the > constraints

Re: [HACKERS] Improve catcache/syscache performance.

2017-10-13 Thread Robert Haas
On Thu, Sep 14, 2017 at 2:12 AM, Andres Freund wrote: > This patch gives me roughly 8% speedup in a workload that consists out > of a fast query that returns a lot of columns. If I apply a few > other performance patches, this patch itself starts to make a bigger >

Re: [HACKERS] Discussion on missing optimizations

2017-10-13 Thread Adam Brusselback
So from following this discussion and others focused on making the planner "smarter", there is always an argument to be had over wasting planner cycles, and it's always a hard fought battle to get any changes made. Now, i'm speaking without any knowledge of the Postgres internals, so please bear

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Tom Lane
Robert Haas writes: > On Fri, Oct 13, 2017 at 5:57 AM, Amit Khandekar > wrote: >> One thing we can do is : instead of calling >> map_variable_attnos_mutator(), convert the var inside the if block for >> "if (IsA(node, ConvertRowtypeExpr))". Please

Re: [HACKERS] [COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-13 Thread Peter Geoghegan
On Fri, Oct 13, 2017 at 4:54 AM, Robert Haas wrote: > I haven't really followed this thread in depth, but I'm very nervous > about the idea that we should ever be examining the raw-xmin of a > tuple that has been marked HEAP_XMIN_FROZEN for anything other than > forensic

Re: [HACKERS] Aggregate transition state merging vs. hypothetical set functions

2017-10-13 Thread Tom Lane
Heikki Linnakangas writes: > We've been doing that window agg thing for a long time, so I think > "works as window agg" should be the default for regular aggregates. For > ordered-set aggregates, "no merging, no more transfn() calls after > finalfn()" seems safest. > It's a

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Robert Haas
On Fri, Oct 13, 2017 at 5:57 AM, Amit Khandekar wrote: > One thing we can do is : instead of calling > map_variable_attnos_mutator(), convert the var inside the if block for > "if (IsA(node, ConvertRowtypeExpr))". Please check the attached patch. > There, I have avoided

Re: [HACKERS] Predicate Locks for writes?

2017-10-13 Thread Alexander Korotkov
On Wed, Oct 11, 2017 at 7:27 PM, Robert Haas wrote: > On Wed, Oct 11, 2017 at 11:51 AM, Simon Riggs > wrote: > > I'm inclined to believe Robert's hypothesis that there is some race > > condition there. > > > > The question is whether that still

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Tom Lane
Noah Misch writes: > I hacked psql to call PQtrace() and ran "psql -Xc 'select true'" in the > defective configuration and in a working x64 GNU/Linux configuration. I've > attached both PQtrace() products. Thanks. It looks to me like the xlc build simply forgets to send some

Re: [HACKERS] Continuous integration on Windows?

2017-10-13 Thread Andrew Dunstan
On 10/13/2017 08:09 AM, Thomas Munro wrote: > On Fri, Oct 13, 2017 at 1:42 PM, Andrew Dunstan > wrote: >> Well, as you can see here the appveyor.yml file can live outside the >> tree that's being built. > Here's a Wiki page where I hope we can collect how-to

Re: [HACKERS] Aggregate transition state merging vs. hypothetical set functions

2017-10-13 Thread Tom Lane
Heikki Linnakangas writes: > On 10/13/2017 02:08 AM, Tom Lane wrote: >> I started to look into fixing orderedsetaggs.c so that we could revert >> 52328727b, and soon found a rather nasty problem. Although the plain >> OSAs seem amenable to supporting multiple finalfn calls on

Re: [HACKERS] v10 bottom-listed

2017-10-13 Thread Magnus Hagander
On Fri, Oct 6, 2017 at 3:59 AM, Amit Langote wrote: > On 2017/10/05 22:28, Erik Rijkers wrote: > > In the 'ftp' listing, v10 appears at the bottom: > > https://www.postgresql.org/ftp/source/ > > > > With all the other v10* directories at the top, we could get a

Re: [HACKERS] new function for tsquery creartion

2017-10-13 Thread Victor Drobny
On 2017-10-13 16:37, Alexey Chernyshov wrote: Hi all, I am extending phrase operator is such way that it will have syntax that means from n to m words, so I will use such syntax () further. I found that a AROUND(N) b is exactly the same as a <-N,N> b and it can be replaced while

Re: [HACKERS] new function for tsquery creartion

2017-10-13 Thread Alexey Chernyshov
Hi all, I am extending phrase operator is such way that it will have syntax that means from n to m words, so I will use such syntax () further. I found that a AROUND(N) b is exactly the same as a <-N,N> b and it can be replaced while parsing. So, what do you think of such idea? In this

Re: [HACKERS] Still another race condition in recovery TAP tests

2017-10-13 Thread Andrew Dunstan
On 10/13/2017 01:04 AM, Noah Misch wrote: > On Fri, Oct 06, 2017 at 05:57:24PM +0800, Craig Ringer wrote: >> On 6 October 2017 at 14:03, Noah Misch wrote: >>> On Fri, Sep 08, 2017 at 10:32:03PM -0400, Tom Lane wrote: (I do kinda wonder why we rolled our own

Re: [HACKERS] Continuous integration on Windows?

2017-10-13 Thread Thomas Munro
On Fri, Oct 13, 2017 at 1:42 PM, Andrew Dunstan wrote: > Well, as you can see here the appveyor.yml file can live outside the > tree that's being built. Here's a Wiki page where I hope we can collect how-to information on this general topic:

Re: [HACKERS] [COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-13 Thread Robert Haas
On Thu, Oct 12, 2017 at 7:31 PM, Alvaro Herrera wrote: >> Wouldn't this last "if" test, to cover the pg_upgrade case, be better >> targeted by comparing *raw* xmin to FrozenTransactionId? You're using >> the potentially distinct xmin value returned by >>

Re: [HACKERS] Fix a typo in execReplication.c

2017-10-13 Thread Simon Riggs
On 13 October 2017 at 09:13, Masahiko Sawada wrote: > On Thu, Oct 12, 2017 at 11:30 PM, Robert Haas wrote: >> On Thu, Oct 12, 2017 at 6:55 AM, Petr Jelinek >> wrote: >>> Thanks for the patch, looks correct to me. >> >>

Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced

2017-10-13 Thread Amit Khandekar
Bringing here the mail thread from pgsql-committers regarding this commit : commit 1c497fa72df7593d8976653538da3d0ab033207f Author: Robert Haas Date: Thu Oct 12 17:10:48 2017 -0400 Avoid coercing a whole-row variable that is already coerced. Marginal efficiency

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Kuntal Ghosh
On Fri, Oct 13, 2017 at 1:58 PM, Haribabu Kommi wrote: > > > On Fri, Oct 13, 2017 at 11:55 AM, Robert Haas wrote: >> >> On Thu, Oct 12, 2017 at 8:00 PM, Haribabu Kommi >> wrote: >> >> That seems like a strange choice of

Re: [HACKERS] Aggregate transition state merging vs. hypothetical set functions

2017-10-13 Thread Heikki Linnakangas
On 10/13/2017 02:41 AM, Tom Lane wrote: David Rowley writes: On 13 October 2017 at 12:08, Tom Lane wrote: Therefore, I think we need to bite the bullet and provide an aggregate property (CREATE AGGREGATE argument / pg_aggregate column) that

Re: [HACKERS] [PATCH] Lockable views

2017-10-13 Thread Yugo Nagata
On Thu, 12 Oct 2017 13:11:45 +0900 (JST) Tatsuo Ishii wrote: > >> test=# CREATE VIEW v3 AS SELECT count(*) FROM v1; > >> CREATE VIEW > >> test=# BEGIN; > >> BEGIN > >> test=# LOCK TABLE v3; > >> ERROR: cannot lock view "v3" > >> DETAIL: Views that return aggregate functions

Re: [HACKERS] Fix a typo in execReplication.c

2017-10-13 Thread Masahiko Sawada
On Thu, Oct 12, 2017 at 11:30 PM, Robert Haas wrote: > On Thu, Oct 12, 2017 at 6:55 AM, Petr Jelinek > wrote: >> Thanks for the patch, looks correct to me. > > Committed and back-patched to v10. > Thank you! Regards, -- Masahiko Sawada

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Haribabu Kommi
On Fri, Oct 13, 2017 at 11:55 AM, Robert Haas wrote: > On Thu, Oct 12, 2017 at 8:00 PM, Haribabu Kommi > wrote: > > Currently I added a snapshot_satisfies API to find out whether the tuple > > satisfies the visibility or not with different types

Re: [HACKERS] Discussion on missing optimizations

2017-10-13 Thread Laurenz Albe
Stephen Frost wrote: > * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > > Robert Haas wrote: > > > One trick that some system use is avoid replanning as much as we do > > > by, for example, saving plans in a shared cache and reusing them even > > > in other sessions. That's hard to do in our

Re: [HACKERS] Aggregate transition state merging vs. hypothetical set functions

2017-10-13 Thread Heikki Linnakangas
On 10/13/2017 02:08 AM, Tom Lane wrote: I started to look into fixing orderedsetaggs.c so that we could revert 52328727b, and soon found a rather nasty problem. Although the plain OSAs seem amenable to supporting multiple finalfn calls on the same transition state, the "hypothetical set"

Re: [HACKERS] Partition-wise aggregation/grouping

2017-10-13 Thread David Rowley
On 13 October 2017 at 19:36, Jeevan Chalke wrote: > I have tried exactly same tests to get to this factor on my local developer > machine. And with parallelism enabled I got this number as 7.9. However, if > I disable the parallelism (and I believe David too

Re: [HACKERS] Partition-wise aggregation/grouping

2017-10-13 Thread Jeevan Chalke
On Tue, Oct 10, 2017 at 1:31 PM, David Rowley wrote: > On 10 October 2017 at 17:57, Ashutosh Bapat > wrote: > > Append node just returns the result of ExecProcNode(). Charging > > cpu_tuple_cost may make it too expensive. In other

Re: [HACKERS] BLK_DONE state in XLogReadBufferForRedoExtended

2017-10-13 Thread Amit Kapila
On Fri, Oct 13, 2017 at 10:32 AM, Michael Paquier wrote: > On Thu, Oct 12, 2017 at 10:47 PM, Amit Kapila wrote: >> Today, I was trying to think about cases when we can return BLK_DONE >> in XLogReadBufferForRedoExtended. One thing that

Re: [HACKERS] oversight in EphemeralNamedRelation support

2017-10-13 Thread Julien Rouhaud
On Fri, Oct 13, 2017 at 5:22 AM, Tom Lane wrote: > Thomas Munro writes: >> On Fri, Oct 13, 2017 at 12:46 PM, Tom Lane wrote: >>> Yeah, I agree --- personally I'd never write a query like that. But >>> the fact that somebody