Re: [HACKERS] Report the number of skipped frozen pages by manual VACUUM

2017-03-15 Thread Masahiko Sawada
On Wed, Mar 15, 2017 at 1:09 PM, Yugo Nagata wrote: > On Fri, 10 Mar 2017 20:08:42 +0900 > Masahiko Sawada wrote: > >> On Fri, Mar 10, 2017 at 3:58 PM, Jim Nasby wrote: >> > On 3/6/17 8:34 PM, Masahiko Sawada wrote: >> >> >> >>

Re: [HACKERS] Report the number of skipped frozen pages by manual VACUUM

2017-03-15 Thread Yugo Nagata
On Fri, 10 Mar 2017 20:08:42 +0900 Masahiko Sawada wrote: > On Fri, Mar 10, 2017 at 3:58 PM, Jim Nasby wrote: > > On 3/6/17 8:34 PM, Masahiko Sawada wrote: > >> > >> I don't think it can say "1 frozen pages" because the number of > >> skipped pages

Re: [HACKERS] Allow pg_dumpall to work without pg_authid

2017-03-15 Thread Sachin Kotwal
Thanks for nice patch related to AWS RDS. Can we have backpatch this patch to PostgreSQL 9.6 and earlier releases ? Regards, Sachin On Sun, Mar 5, 2017 at 12:30 PM, Simon Riggs wrote: > On 28 February 2017 at 17:49, Simon Riggs wrote: > > >

Re: [HACKERS] background sessions

2017-03-15 Thread Pavel Stehule
2017-03-15 0:44 GMT+01:00 Robert Haas : > On Tue, Mar 14, 2017 at 4:54 PM, Pavel Stehule > wrote: > >> I don't understand. The only way you'd need a server restart is if a > >> background process wasn't responding to SIGTERM, and that's a bug > >>

Re: [HACKERS] Backend crash on non-exclusive backup cancel

2017-03-15 Thread Anastasia Lubennikova
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed As I see, this bugfix works as expected and the patch is

Re: [HACKERS] GSOC - TOAST'ing in slices

2017-03-15 Thread Robert Haas
On Tue, Mar 14, 2017 at 10:03 PM, George Papadrosou wrote: > The project’s idea is implement different slicing approaches according to > the value’s datatype. For example a text field could be split upon character > boundaries while a JSON document would be split in a way

Re: [HACKERS] IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements

2017-03-15 Thread Arthur Zakirov
2017-03-14 15:55 GMT+03:00 Ashutosh Bapat : > > I noticed that the earlier error message was using "server" instead of > "foreign server", while the new message uses the later one. Usually, > when converting an error to notice, we don't expect such changes. But >

Re: [HACKERS] New CORRESPONDING clause design

2017-03-15 Thread Pavel Stehule
Hi 2017-03-14 16:33 GMT+01:00 Surafel Temesgen : > > hi > > Some errors are related to just CORRESPONDING without any columns. So >> using expr doesn't help here. So parse node CORRESPONDING can solve both >> issues. >> > In current implementation pointing to a node means

Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)

2017-03-15 Thread Kuntal Ghosh
On Tue, Mar 14, 2017 at 1:50 PM, Michael Paquier wrote: > "writer" would be better if defined as "background writer" instead? > You are forgetting in this list autovacuum workers and the startup > process, the latter is important for nodes in recovery. > Modified

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-15 Thread Aleksander Alekseev
Hi Hoah. Thanks a lot for a reply! > This is wrong on platforms that do have strlcpy() in libc. If it no too much trouble could you please explain what will happen on such platforms? On what platform did you check it? I'm sure it fixable. And I got a strong feeling that "wrong" could be a bit

Re: [HACKERS] GSOC - TOAST'ing in slices

2017-03-15 Thread Alexander Korotkov
On Wed, Mar 15, 2017 at 5:03 AM, George Papadrosou wrote: > *Deliverables * > > - Implement “semantic” slicing for datatypes that support slicing into > TOAST tables. These datatypes will be the Text, Array, JSON/JSONb and XML > data types. > That looks too much

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Stephen Frost
Amit, * Amit Kapila (amit.kapil...@gmail.com) wrote: > On Wed, Mar 15, 2017 at 12:53 AM, Stephen Frost wrote: > > If that's the case then > > this does seem to at least be less of an issue, though I hope we put in > > appropriate comments about it. > > I think we have

Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive

2017-03-15 Thread Tom Lane
Peter van Hardenberg writes: > It's quite clear to me that the current default behaviour costs the world > serious pain and heart-ache on a daily basis. This is a large claim for which you've provided little evidence. On the other hand, changing behavior like this from one version

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 9:18 AM, Stephen Frost wrote: >> I think we have sufficient comments in code especially on top of >> function _hash_alloc_buckets(). > > I don't see any comments regarding how we have to be sure to handle > an out-of-space case properly in the middle of

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-15 Thread Ashutosh Bapat
>> >> There are some differences in what geqo does and what partition-wise >> needs to do. geqo tries many joining orders each one in a separate >> temporary context. The way geqo slices the work, every slice produces >> a full plan. For partition-wise join I do not see a way to slice the >> work

Re: [HACKERS] GSOC - TOAST'ing in slices

2017-03-15 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 14, 2017 at 10:03 PM, George Papadrosou > wrote: >> The project’s idea is implement different slicing approaches according to >> the value’s datatype. For example a text field could be split upon character >>

Re: [HACKERS] Allow pg_dumpall to work without pg_authid

2017-03-15 Thread Sachin Kotwal
Hi Stephen, Thanks. I understand this is small but new feature and not bug fix. But we should be able to backpatch if there is no dependency. It will help users to get benefit of this feature for g96 and pg95 in RDS until they will have pg10 in RDS. If It is against community policy then it is

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Amit Kapila
On Wed, Mar 15, 2017 at 1:15 AM, Robert Haas wrote: > On Tue, Mar 14, 2017 at 8:02 AM, Ashutosh Sharma > wrote: >> Attached is the v6 patch for microvacuum in hash index rebased on top >> of 'v10 patch for WAL in hash index - [1]' and 'v1 patch for

Re: [HACKERS] Allow pg_dumpall to work without pg_authid

2017-03-15 Thread Stephen Frost
Greetings, * Sachin Kotwal (kotsac...@gmail.com) wrote: > Thanks. I understand this is small but new feature and not bug fix. > But we should be able to backpatch if there is no dependency. No, it's a new feature and won't be back-patched. > It will help users to get benefit of this feature for

Re: [HACKERS] Allow pg_dumpall to work without pg_authid

2017-03-15 Thread Stephen Frost
Greetings, * Sachin Kotwal (kotsac...@gmail.com) wrote: > Can we have backpatch this patch to PostgreSQL 9.6 and earlier releases ? No. This is a new feature and new features are not back-patched. Thanks! Stephen signature.asc Description: Digital signature

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-03-15 Thread Amit Kapila
On Thu, Mar 9, 2017 at 10:21 PM, Masahiko Sawada wrote: > On Wed, Mar 8, 2017 at 1:43 AM, Peter Geoghegan wrote: >> On Sat, Mar 4, 2017 at 1:30 AM, Amit Kapila wrote: While I can't see this explained anywhere, I'm pretty

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-03-15 Thread Vinayak Pokale
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed I have tested the latest patch and it looks good to me, so I

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Amit Kapila
On Wed, Mar 15, 2017 at 9:23 PM, Ashutosh Sharma wrote: > >> >> Few other comments: >> 1. >> + if (ndeletable > 0) >> + { >> + /* No ereport(ERROR) until changes are logged */ >> + START_CRIT_SECTION(); >> + >> + PageIndexMultiDelete(page, deletable, ndeletable); >> + >> +

[HACKERS] logical replication launcher crash on buildfarm

2017-03-15 Thread Andres Freund
Hi, I just unstuck a bunch of my buildfarm animals. That triggered some spurious failures (on piculet, calliphoridae, mylodon), but also one that doesn't really look like that: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=culicidae=2017-03-16%2002%3A40%3A03 with the pertinent point

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-15 Thread Andres Freund
On 2017-03-15 20:28:33 -0700, Andres Freund wrote: > Hi, > > I just unstuck a bunch of my buildfarm animals. That triggered some > spurious failures (on piculet, calliphoridae, mylodon), but also one > that doesn't really look like that: >

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Amit Kapila
On Wed, Mar 15, 2017 at 7:50 PM, Robert Haas wrote: > On Wed, Mar 15, 2017 at 9:18 AM, Stephen Frost wrote: >>> I think we have sufficient comments in code especially on top of >>> function _hash_alloc_buckets(). >> >> I don't see any comments regarding

Re: [HACKERS] identity columns

2017-03-15 Thread Vitaly Burovoy
On 3/15/17, Peter Eisentraut wrote: > Vitaly, will you be able to review this again? > > -- > Peter Eisentraut http://www.2ndQuadrant.com/ I apologize for a delay. Yes, I'm going to do it by Sunday. -- Best regards, Vitaly Burovoy -- Sent via

Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags

2017-03-15 Thread Haribabu Kommi
On Fri, Feb 24, 2017 at 3:17 PM, Seki, Eiji wrote: > > Thank you for your comments. > > I reflected these comments to the attached patch. And I renamed IGNORE_XXX > flags to PROCARRAY_XXX flags. I checked the latest patch and I have some comments. +static int

[HACKERS] Split conditions on relations

2017-03-15 Thread Jim Nasby
I've got a customer that is running a pretty expensive function as part of a WHERE clause. With or without the function, the table the function references is the inner-most of a series of nested loops. Without the function things are very fast, but adding the function increases the cost of the

Re: [HACKERS] [COMMITTERS] pgsql: Remove objname/objargs split for referring to objects

2017-03-15 Thread Michael Paquier
On Thu, Mar 16, 2017 at 12:18 AM, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> Remove objname/objargs split for referring to objects > > I don't know if this is the guilty commit, but I'm now getting these > compiler warnings: > > >

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Ashutosh Sharma
On Mar 16, 2017 7:49 AM, "Robert Haas" wrote: On Wed, Mar 15, 2017 at 4:31 PM, Robert Haas wrote: > On Wed, Mar 15, 2017 at 3:54 PM, Ashutosh Sharma wrote: >> Changed as per suggestions. Attached v9 patch. Thanks. > > Wow,

Re: [HACKERS] multivariate statistics (v25)

2017-03-15 Thread Alvaro Herrera
David Rowley wrote: > + k = -1; > + while ((k = bms_next_member(attnums, k)) >= 0) > + { > + bool attr_found = false; > + for (i = 0; i < info->stakeys->dim1; i++) > + { > + if (info->stakeys->values[i] == k) > + { > + attr_found = true; > + break; > + } > + } > + > + /* found attribute not

Re: [HACKERS] pg_stat_wal_write statistics view

2017-03-15 Thread Haribabu Kommi
On Thu, Mar 16, 2017 at 4:15 PM, vinayak wrote: > > On 2017/03/16 10:34, Haribabu Kommi wrote: > > > Updated patch attached. > > The patch looks good to me. > Thanks for the review. How about rename the view as "pg_stat_walwriter"? > With the use of name

Re: [HACKERS] pg_stat_wal_write statistics view

2017-03-15 Thread vinayak
On 2017/03/16 14:46, Haribabu Kommi wrote: On Thu, Mar 16, 2017 at 4:15 PM, vinayak > wrote: On 2017/03/16 10:34, Haribabu Kommi wrote: Updated patch attached. The patch looks good to me. Thanks for

Re: [HACKERS] Changing references of password encryption to hashing

2017-03-15 Thread Bruce Momjian
On Mon, Mar 13, 2017 at 04:48:21PM +0800, Craig Ringer wrote: > On 12 March 2017 at 06:51, Joe Conway wrote: > > > My opinion is that the user visible aspects of this should be deprecated > > and correct syntax provided. But perhaps that is overkill. > > FWIW, in my

Re: [HACKERS][REVIEW] macaddr 64 bit (EUI-64) datatype support

2017-03-15 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > I see a new warning due to, presumably, this: > /home/andres/src/postgresql/src/backend/utils/adt/mac8.c: In function > ‘hex2_to_uchar’: > /home/andres/src/postgresql/src/backend/utils/adt/mac8.c:71:23: warning: > comparison is always false

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Andreas Karlsson
Hi, I got a test failure with this version of the patch in the postges_fdw. It looks to me like it was caused by a typo in the source code which is fixed in the attached patch. After applying this patch check-world passes. Andreas diff --git a/src/backend/executor/nodeTidscan.c

Re: [HACKERS] pg_stat_wal_write statistics view

2017-03-15 Thread vinayak
On 2017/03/16 10:34, Haribabu Kommi wrote: Updated patch attached. The patch looks good to me. How about rename the view as "pg_stat_walwriter"? The columns of view : backend_writes -> backend_wal_writes writes-> background_wal_writes write_blocks-> wal_write_blocks

Re: [HACKERS] Remove obsolete text from hash/README

2017-03-15 Thread Robert Haas
On Tue, Mar 14, 2017 at 10:22 PM, Amit Kapila wrote: > As pointed out by Tom [1], attached is a patch to remove obsolete text > from src/backend/access/hash/README Heh, thanks. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Tom Lane
Stephen Frost writes: > I do see that mdwrite() should handle an out-of-disk-space case, though > that just makes me wonder what's different here compared to normal > relations that we don't have an issue with a sparse WAL'd hash index but > we can't handle it if a normal

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Robert Haas
On Tue, Mar 14, 2017 at 10:30 PM, Amit Kapila wrote: > On Tue, Mar 14, 2017 at 10:59 PM, Robert Haas wrote: >> On Mon, Mar 13, 2017 at 11:48 PM, Amit Kapila >> wrote: >>> We didn't found any issue with the above testing.

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > That theory seems inconsistent with how mdextend() works. My > > understanding is that we zero-fill the new blocks before populating > > them with actual data precisely to avoid running out of disk

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-15 Thread Rafia Sabih
On Wed, Mar 15, 2017 at 10:52 AM, Dilip Kumar wrote: > I have reviewed the patch, I have some questions. > > @@ -3031,7 +3031,7 @@ exec_stmt_return_query(PLpgSQL_execstate *estate, > Assert(stmt->dynquery != NULL); > portal = exec_dynquery_with_params(estate,

Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 2:29 AM, Peter van Hardenberg wrote: > Ads and I were talking over breakfast about usability issues and he > mentioned transaction cancellation during interactive sessions as a serious > pain point. > > I suggest we update the default of ON_ERROR_ROLLBACK to

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Ashutosh Sharma
> Generally, this patch looks like a pretty straightforward adaptation > of the similar btree mechanism to hash indexes, so if it works for > btree it ought to work here, too. But I noticed a few things while > reading through it. > > +/* Get RelfileNode from relation OID */ > +

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 11:02 AM, Tom Lane wrote: > Robert Haas writes: >> That theory seems inconsistent with how mdextend() works. My >> understanding is that we zero-fill the new blocks before populating >> them with actual data precisely to avoid

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-15 Thread Robert Haas
On Fri, Mar 10, 2017 at 7:08 AM, Rafia Sabih wrote: > I wanted to clarify a few things here, I noticed that call of ExecutorRun in > postquel_getnext() uses !es->lazyEval as execute_once, this is confusing, as > it is true even in cases when a simple query like

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Ashutosh Sharma
> > I think one possibility is to get it using > indexrel->rd_index->indrelid in _hash_doinsert(). > Thanks. I have tried the same in the v7 patch shared upthread. > >> >> But they're not called delete records in a hash index. The function >> is called hash_xlog_vacuum_one_page. The

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Emre Hasegeli
> I don't know if this is the only problem > I'll be in this general area today, so will mention if I stumble over > anything that looks broken. I was testing the same patch with a large dataset and got a different segfault: > hasegeli=# explain select * from only mp_notification_20170225 where

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 10:34 AM, Tom Lane wrote: > FWIW, I'm not certain that Stephen is correct to claim that we have > some concrete problem with sparse files. We certainly don't *depend* > on sparse storage anyplace else, nor write data in a way that would be > likely to

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Tom Lane
Robert Haas writes: > That theory seems inconsistent with how mdextend() works. My > understanding is that we zero-fill the new blocks before populating > them with actual data precisely to avoid running out of disk space due > to deferred allocation at the OS level. If

Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive

2017-03-15 Thread Pavel Stehule
2017-03-15 16:38 GMT+01:00 Robert Haas : > On Wed, Mar 15, 2017 at 2:29 AM, Peter van Hardenberg wrote: > > Ads and I were talking over breakfast about usability issues and he > > mentioned transaction cancellation during interactive sessions as a > serious >

Re: [HACKERS] Backend crash on non-exclusive backup cancel

2017-03-15 Thread Andres Freund
Hi, On 2017-03-15 15:28:03 +0900, Michael Paquier wrote: > diff --git a/src/backend/access/transam/xlog.c > b/src/backend/access/transam/xlog.c > index 64335f909e..eaf8e32fe1 100644 > --- a/src/backend/access/transam/xlog.c > +++ b/src/backend/access/transam/xlog.c > ---

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > FWIW, I'm not certain that Stephen is correct to claim that we have > some concrete problem with sparse files. We certainly don't *depend* > on sparse storage anyplace else, nor write data in a way that would be > likely to trigger it; but I'm not

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-15 Thread Tom Lane
Noah Misch writes: > On Mon, Mar 13, 2017 at 06:35:53PM +0300, Aleksander Alekseev wrote: >> + * Unfortunately in case of strlcat and strlcpy we can't trust tests >> + * executed by Autotools if Clang > 3.6 is used. > This is wrong on platforms that do have strlcpy() in libc.

Re: [HACKERS] scram and \password

2017-03-15 Thread Robert Haas
On Tue, Mar 14, 2017 at 5:14 PM, Tom Lane wrote: >> Without md5-only, a user who uses \password to change their password from a >> newer client would lock themselves out of connecting again from older >> clients. As a conscious decision (either of the DBA or the user) that >>

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Dilip Kumar
On Wed, Mar 15, 2017 at 8:11 PM, Emre Hasegeli wrote: > > I can try to provide a test case, if that wouldn't be enough to spot > the problem. Thanks for reporting, I am looking into this. Meanwhile, if you can provide the reproducible test case then locating the issue will be

Re: [HACKERS] scram and \password

2017-03-15 Thread Michael Paquier
On Wed, Mar 15, 2017 at 6:14 AM, Tom Lane wrote: > Jeff Janes writes: >> On Tue, Mar 14, 2017 at 8:40 AM, Tom Lane wrote: >>> Why exactly would anyone want "md5 only"? I should think that "scram >>> only" is a sensible pg_hba

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-15 Thread David Steele
On 3/7/17 11:05 PM, David Steele wrote: > On 3/7/17 11:38 AM, Andres Freund wrote: > > <...> > >>> We have a plenty of time and we dedicate one full-time developer for >>> this project. >> >> How about having that, and perhaps others, developer participate in >> reviewing patches and getting to

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Dilip Kumar
On Thu, Mar 16, 2017 at 5:02 AM, Dilip Kumar wrote: > After above fix, I am not able to reproduce. Can you give me the > backtrace of the crash location or the dump? > > I am trying on the below commit > > commit c5832346625af4193b1242e57e7d13e66a220b38 > Author: Stephen

Re: [HACKERS][REVIEW] macaddr 64 bit (EUI-64) datatype support

2017-03-15 Thread Andres Freund
On 2017-03-15 11:20:53 -0400, Stephen Frost wrote: > Greetings Hari Babu, > > * Haribabu Kommi (kommi.harib...@gmail.com) wrote: > > On Mon, Mar 13, 2017 at 6:52 AM, Stephen Frost wrote: > > > And, naturally, re-reading the email as it hit the list made me realize > > > that

Re: [HACKERS] pg_stat_wal_write statistics view

2017-03-15 Thread Haribabu Kommi
On Thu, Mar 16, 2017 at 9:55 AM, Julien Rouhaud wrote: > On Wed, Feb 15, 2017 at 02:53:44PM +1100, Haribabu Kommi wrote: > > Here I attached patch that implements the view. > > I will add this patch to next commitfest. > > Hello, > > I just reviewed the patch. >

Re: [HACKERS] logical replication access control patches

2017-03-15 Thread Peter Eisentraut
New patch set based on the discussions. I have dropped the PUBLICATION privilege patch. The patches are also reordered a bit in approximate decreasing priority order. 0001 Refine rules for altering publication owner kind of a bug fix 0002 Change logical replication pg_hba.conf use This was

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-15 Thread Vaishnavi Prabakaran
On Tue, Mar 14, 2017 at 5:50 PM, Vaishnavi Prabakaran < vaishnaviprabaka...@gmail.com> wrote: > > > On Tue, Mar 14, 2017 at 4:19 AM, Daniel Verite > wrote: > >> >> I mean the next iteration of the above while statement. Referring >> to the doc, that would be the "next

Re: [HACKERS] Measuring replay lag

2017-03-15 Thread Simon Riggs
On 14 March 2017 at 07:39, Thomas Munro wrote: > Hi, > > Please see separate replies to Simon and Craig below. > > On Sun, Mar 5, 2017 at 8:38 PM, Simon Riggs wrote: >> On 1 March 2017 at 10:47, Thomas Munro

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Tom Lane
Andres Freund writes: > [ new patches ] I've started to look at 0004, and the first conclusion I've come to is that it's *direly* short of documentation. To the point that I'd vote against committing it if something isn't done about that. As an example, it's quite unclear

Re: [HACKERS][REVIEW] macaddr 64 bit (EUI-64) datatype support

2017-03-15 Thread Haribabu Kommi
On Thu, Mar 16, 2017 at 2:20 AM, Stephen Frost wrote: > Greetings Hari Babu, > > * Haribabu Kommi (kommi.harib...@gmail.com) wrote: > > On Mon, Mar 13, 2017 at 6:52 AM, Stephen Frost > wrote: > > > And, naturally, re-reading the email as it hit the list

Re: [HACKERS] Upgrading postmaster's log messages about bind/listen errors

2017-03-15 Thread Bruce Momjian
On Tue, Mar 14, 2017 at 12:50:09PM -0400, Tom Lane wrote: > I wrote: > >> I think that what would actually be of some use nowadays is a LOG-level > >> message emitted if the wraparound *isn't* activated immediately at start. > >> But otherwise, we should follow the rule that silence is golden. >

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Andres Freund
On 2017-03-15 16:31:11 -0400, Robert Haas wrote: > On Wed, Mar 15, 2017 at 3:54 PM, Ashutosh Sharma > wrote: > > Changed as per suggestions. Attached v9 patch. Thanks. > > Wow, when do you sleep? I think that applies to a bunch of people, including yourself ;) -- Sent

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Andres Freund
On 2017-03-15 17:33:46 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-03-15 16:07:14 -0400, Tom Lane wrote: > >> As for ExecHashGetHashValue, it's most likely going to be working from > >> virtual tuples passed up to the join, which won't benefit from > >>

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Andres Freund
Hi, On 2017-03-15 20:09:03 -0400, Tom Lane wrote: > Andres Freund writes: > > [ new patches ] > > I've started to look at 0004, and the first conclusion I've come to > is that it's *direly* short of documentation. To the point that I'd > vote against committing it if

Re: [HACKERS][REVIEW] macaddr 64 bit (EUI-64) datatype support

2017-03-15 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > I see a new warning due to, presumably, this: > /home/andres/src/postgresql/src/backend/utils/adt/mac8.c: In function > ‘hex2_to_uchar’: > /home/andres/src/postgresql/src/backend/utils/adt/mac8.c:71:23: warning: > comparison is always false

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Andres Freund
On 2017-03-15 18:16:57 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-03-15 17:33:46 -0400, Tom Lane wrote: > >> We could make the planner mark each table scan node with the highest > >> column number that the plan will access, and use that to drive a > >>

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Dilip Kumar
On Thu, Mar 16, 2017 at 12:56 AM, Emre Hasegeli wrote: >> Please verify the fix. > > The same test with both of the patches applied still crashes for me. After above fix, I am not able to reproduce. Can you give me the backtrace of the crash location or the dump? I am trying

Re: [HACKERS] Patch to improve performance of replay of AccessExclusiveLock

2017-03-15 Thread Simon Riggs
On 8 March 2017 at 10:02, David Rowley wrote: > On 8 March 2017 at 01:13, Simon Riggs wrote: >> Don't understand this. I'm talking about setting a flag on >> commit/abort WAL records, like the attached. > > There's nothing setting a flag in

Re: [HACKERS] Backend crash on non-exclusive backup cancel

2017-03-15 Thread Michael Paquier
On Thu, Mar 16, 2017 at 12:46 AM, Andres Freund wrote: > Hi, > > On 2017-03-15 15:28:03 +0900, Michael Paquier wrote: >> diff --git a/src/backend/access/transam/xlog.c >> b/src/backend/access/transam/xlog.c >> index 64335f909e..eaf8e32fe1 100644 >> ---

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 4:31 PM, Robert Haas wrote: > On Wed, Mar 15, 2017 at 3:54 PM, Ashutosh Sharma > wrote: >> Changed as per suggestions. Attached v9 patch. Thanks. > > Wow, when do you sleep? Will have a look. Committed with a few

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Tom Lane
Andres Freund writes: > On 2017-03-15 17:33:46 -0400, Tom Lane wrote: >> We could make the planner mark each table scan node with the highest >> column number that the plan will access, and use that to drive a >> slot_getsomeattrs call in advance of any access to tuple

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Tom Lane
Andres Freund writes: > On 2017-03-15 18:16:57 -0400, Tom Lane wrote: >> [ scratches head... ] What deforming logic do you think I'm proposing >> removing? > I thought you were suggesting that we don't do the get_last_attnums (and > inlined version in the isSimpleVar case)

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Andres Freund
On 2017-03-15 18:48:28 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-03-15 18:16:57 -0400, Tom Lane wrote: > >> [ scratches head... ] What deforming logic do you think I'm proposing > >> removing? > > > I thought you were suggesting that we don't do the

Re: [HACKERS] \h tab-completion

2017-03-15 Thread Andreas Karlsson
On 03/01/2017 02:47 PM, Peter Eisentraut wrote: Instead of creating another copy of list_ALTER, let's use the words_after_create list and write a version of create_command_generator/drop_command_generator. Good idea. Here is a patch with that. Andreas commit

[HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-03-15 Thread Stephen Frost
Pavel, I started looking through this to see if it might be ready to commit and I don't believe it is. Below are my comments about the first patch, I didn't get to the point of looking at the others yet since this one had issues. * Pavel Stehule (pavel.steh...@gmail.com) wrote: > 2017-01-09

Re: [HACKERS] [POC] hash partitioning

2017-03-15 Thread Robert Haas
On Tue, Mar 14, 2017 at 10:08 AM, David Steele wrote: > This patch is marked as POC and after a read-through I agree that's > exactly what it is. Just out of curiosity, were you looking at Nagata-san's patch, or Amul's? > As such, I'm not sure it belongs in the last >

Re: [HACKERS] [POC] hash partitioning

2017-03-15 Thread David Steele
On 3/15/17 12:25 PM, Robert Haas wrote: > On Tue, Mar 14, 2017 at 10:08 AM, David Steele wrote: >> This patch is marked as POC and after a read-through I agree that's >> exactly what it is. > > Just out of curiosity, were you looking at Nagata-san's patch, or Amul's? Both -

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-15 Thread Peter Eisentraut
make check-world -O -j6 PROVE_FLAGS=-j6 2 min 34 seconds Nice! -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-15 Thread Noah Misch
On Wed, Mar 15, 2017 at 10:57:15AM -0400, Tom Lane wrote: > Noah Misch writes: > > On Mon, Mar 13, 2017 at 06:35:53PM +0300, Aleksander Alekseev wrote: > >> + * Unfortunately in case of strlcat and strlcpy we can't trust tests > >> + * executed by Autotools if Clang > 3.6 is

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Dilip Kumar
On Wed, Mar 15, 2017 at 10:02 PM, Emre Hasegeli wrote: > I was testing with the brin correlation patch [1] applied. I cannot > crash it without the patch either. I am sorry for not testing it > before. The patch make BRIN selectivity estimation function access > more

Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver

2017-03-15 Thread Tom Lane
Andrew Dunstan writes: > On 03/03/2017 11:11 PM, Tom Lane wrote: >> Yeah, I was wondering if this is just exposing a pre-existing bug. >> However, the "normal" path operates by repeatedly invoking PQconnectPoll >> (cf. connectDBComplete) so it's not immediately

Re: [HACKERS] Re: [GSOC 17] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-03-15 Thread Mengxing Liu
> -Original Messages- > From: "Kevin Grittner" > Sent Time: 2017-03-15 23:20:07 (Wednesday) > To: DEV_OPS > Cc: "Mengxing Liu" , > "pgsql-hackers@postgresql.org" > Subject: Re:

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Emre Hasegeli
> With my test case, I could not crash even with this patch applied. > Can you provide your test case? Yes: > hasegeli=# create table r2 as select (random() * 3)::int as i from > generate_series(1, 100); > SELECT 100 > hasegeli=# create index on r2 using brin (i); > CREATE INDEX >

Re: [HACKERS] [POC] hash partitioning

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 12:39 PM, David Steele wrote: > Agreed. Perhaps both types of syntax should be supported, one that is > friendly to users and one that is precise for dump tools and those who > care get in the weeds. Eventually, sure. For the first version, I want

Re: [HACKERS] logical replication access control patches

2017-03-15 Thread Peter Eisentraut
On 3/14/17 15:05, Stephen Frost wrote: > Another approach to solving my concern would be to only allow the > publishing of tables by non-owner users who have table-level SELECT > rights An early version of the logical replication patch set did that. But the problem is that this way someone with

Re: [HACKERS] logical replication access control patches

2017-03-15 Thread Peter Eisentraut
On 3/14/17 15:37, Petr Jelinek wrote: > Yeah that's rather hard to say in front. Maybe safest action would be to > give the permission to owners in 10 and revisit special privilege in 11 > based on feedback? I'm fine with that. -- Peter Eisentraut http://www.2ndQuadrant.com/

Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir()

2017-03-15 Thread Robert Haas
On Mon, Feb 20, 2017 at 6:21 AM, Dave Page wrote: > Patch includes the code and doc updates. Review: +strftime(mtime, 25, "%Y-%m-%d %H:%M:%S %Z", localtime(&(attrib.st_ctime))); +const int n = snprintf(NULL, 0, "%lld", attrib.st_size); +char size[n+1];

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Dilip Kumar
On Wed, Mar 15, 2017 at 8:51 PM, Dilip Kumar wrote: >> I can try to provide a test case, if that wouldn't be enough to spot >> the problem. > > Thanks for reporting, I am looking into this. Meanwhile, if you can > provide the reproducible test case then locating the issue

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Dilip Kumar
On Wed, Mar 15, 2017 at 8:11 PM, Emre Hasegeli wrote: >> * thread #1: tid = 0x5045a8f, 0x00010ae44558 >> postgres`brin_deform_tuple(brdesc=0x7fea3c86a3a8, >> tuple=0x7fea3c891040) + 40 at brin_tuple.c:414, queue = >> 'com.apple.main-thread', stop reason = signal

Re: [HACKERS] Parallel Bitmap scans a bit broken

2017-03-15 Thread Emre Hasegeli
> This can crash at line:414, if either tuple is invalid memory(but I > think it's not because we have already accessed this memory in above > if check) or dtup is invalid (this is also not possible because > brin_new_memtuple has already accessed this). I was testing with the brin correlation

Re: [HACKERS] identity columns

2017-03-15 Thread Peter Eisentraut
Vitaly, will you be able to review this again? On 2/28/17 21:23, Peter Eisentraut wrote: > New patch that fixes everything. ;-) Besides hopefully addressing all > your issues, this version also no longer requires separate privileges on > the internal sequence, which was the last outstanding

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-15 Thread Tom Lane
Noah Misch writes: > On Wed, Mar 15, 2017 at 10:57:15AM -0400, Tom Lane wrote: >> Seems like the correct solution is to >> absorb that fix, either by updating to a newer autoconf release or by >> carrying our own version of AC_CHECK_DECLS until they come out with one. > As you

Re: [HACKERS] background sessions

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 6:43 AM, Pavel Stehule wrote: > I don't understand - CHECK_FOR_INTERRUPTS called from executor implicitly. True. So there shouldn't be any problem here. I'm confused as can be about what you want changed. Some review of the patch itself: +

  1   2   >