Re: [HACKERS] Microvacuum support for Hash Index

2017-03-15 Thread Robert Haas
On Wed, Mar 15, 2017 at 11:37 AM, Ashutosh Sharma wrote: >> +/* Get RelfileNode from relation OID */ >> +rel = relation_open(htup->t_tableOid, NoLock); >> +rnode = rel->rd_node; >> +relation_close(rel, NoLock); >> itup->t_tid =

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] 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] 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] 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] 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 David Steele
On 3/15/17 2:28 AM, Michael Paquier wrote: > On Wed, Mar 15, 2017 at 12:27 AM, Anastasia Lubennikova > wrote: >> As far as I understand, in this thread were discussed two bugs of >> pg_stop_backup(). >> Thanks to the clear descriptions above, I easily reproduced both of

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][REVIEW] macaddr 64 bit (EUI-64) datatype support

2017-03-15 Thread Stephen Frost
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 the documentation/error-message incorrectly said "3rd and 4th"

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] 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] Re: [GSOC 17] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-03-15 Thread Kevin Grittner
On Tue, Mar 14, 2017 at 3:45 PM, Kevin Grittner wrote: >> On 3/14/17 17:34, Mengxing Liu wrote: >>> There are several alternative benchmarks. Tony suggested that we >>> should use TPC-E and TPC-DS. > > More benchmarks is better, all other things being equal. Keep in > mind

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] 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] 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] 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] [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] Write Ahead Logging for Hash Indexes

2017-03-15 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > 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

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 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 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] 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] 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 Tom Lane
Robert Haas writes: > Now, that having been said, I'm not sure it's a good idea to tinker > with the behavior for v10. We could change the new-splitpoint code so > that it loops over all the pages in the new splitpoint and zeroes them > all, instead of just the last one.

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] 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] 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 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] [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] Speedup twophase transactions

2017-03-15 Thread Nikhil Sontakke
> Thanks for the new version. Let's head toward a final patch. > > :-) > > > > Have added a new function to do this now. It reads either from disk or > > shared memory and produces error/log messages accordingly as well now. > > And that's ProcessTwoPhaseBufferAndReturn in the patch. >

Re: [HACKERS] New procedural language

2017-03-15 Thread Amit Langote
Hi, On 2017/03/15 16:20, Massimo Fidanza wrote: > Il 15 mar 2017 3:52 AM, "Amit Langote" ha > scritto: >> On 2017/03/15 11:08, Massimo Fidanza wrote: >>> Hello, >>> >>> what it means to add a new procedural language such as Go or Rust? >> >> I think you're looking

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-15 Thread Petr Jelinek
On 02/03/17 17:34, Petr Jelinek wrote: > On 02/03/17 13:23, Craig Ringer wrote: >> On 2 March 2017 at 16:20, Stas Kelvich wrote: >>> On 2 Mar 2017, at 11:00, Craig Ringer wrote: We already have it, because we just decoded the

Re: [HACKERS] wait events for disk I/O

2017-03-15 Thread Rushabh Lathia
Thanks Rahila for reviewing this patch. On Tue, Mar 14, 2017 at 8:13 PM, Rahila Syed wrote: > Hello, > > I applied and tested this patch on latest sources and it works fine. > > Following are some comments, > > >+ /* Wait event for SNRU */ > >+

Re: [HACKERS] New procedural language

2017-03-15 Thread Massimo Fidanza
But there is a difference between python and Go or Rust that the first is interpreted and the seconds are compiled like C. All PL instead of C and Java (also byte code interpreted) are interpreted Il 15 mar 2017 3:52 AM, "Amit Langote" ha scritto: > Hi, > > On

Re: [HACKERS] Measuring replay lag

2017-03-15 Thread Ian Barwick
Hi Just adding a couple of thoughts on this. On 03/14/2017 08:39 AM, 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] Defaulting psql to ON_ERROR_ROLLBACK=interactive

2017-03-15 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Peter van > Hardenberg > I suggest we update the default of ON_ERROR_ROLLBACK to interactive for > 10.0. +1 Regards Takayuki Tsunakawa -- Sent via pgsql-hackers mailing list

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-15 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of David Steele > > But it might be worth thinking about whether we want to encourage > > people to do manual chmod's at all; that's fairly easy to get wrong, > > particularly given the difference in X

Re: [HACKERS] [COMMITTERS] pgsql: Fix cardinality estimates for parallel joins.

2017-03-15 Thread Amit Kapila
On Tue, Mar 14, 2017 at 9:59 PM, Robert Haas wrote: > On Tue, Jan 17, 2017 at 11:49 AM, Robert Haas wrote: >> On Mon, Jan 16, 2017 at 7:23 AM, Amit Kapila wrote: >>> >>> >>> Isn't it better to call clamp_row_est in join

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-15 Thread Amit Langote
On 2017/03/15 13:38, Ashutosh Bapat wrote: > On Wed, Mar 15, 2017 at 3:39 AM, Robert Haas wrote: >> On Mon, Mar 13, 2017 at 6:24 AM, Amit Langote >> wrote: >>> The previous proposal was for expand_inherited_rtentry to not create RT >>>

[HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive

2017-03-15 Thread Peter van Hardenberg
All, 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 interactive for 10.0. The last discussion I could find about this subject was

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

2017-03-15 Thread Michael Paquier
On Wed, Mar 15, 2017 at 12:27 AM, Anastasia Lubennikova wrote: > As far as I understand, in this thread were discussed two bugs of > pg_stop_backup(). > Thanks to the clear descriptions above, I easily reproduced both of them. > > BUG#1: > Server crashes on assertion on

<    1   2