pglife and devel branch content

2018-07-08 Thread Bruce Momjian
Previously, pglife (http://pglife.momjian.us/) showed all commits for the "devel" branch back back to the start of the git tree. It now shows only commits since the last major branch. For example, "12 devel" now shows only commits since we branched the git tree for PG 11. This should make it

Re: XLogSegNoOffsetToRecPtr fixup

2018-07-08 Thread Andres Freund
Hi, On 2018-07-08 14:23:45 -0400, Alvaro Herrera wrote: > Pursuant to closing comment in > https://postgr.es/m/20180306214239.ospkf6ie7aa5gm4j@alvherre.pgsql > here's a quick patch to change the order of arguments in > XLogSegNoOffsetToRecPtr. Commit fc49e24fa69a ("Make WAL segment size >

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-07-08 Thread Noah Misch
On Fri, Jul 06, 2018 at 04:32:56PM +0100, Simon Riggs wrote: > On 6 July 2018 at 03:30, Thomas Munro wrote: > > On Thu, Jul 5, 2018 at 8:27 AM, Noah Misch wrote: > >>> However, 49bff5300d527 also introduced a similar bug where > >>> subtransaction > >>> commit would fail to release an

Re: cost_sort() improvements

2018-07-08 Thread Tomas Vondra
On 06/29/2018 04:36 PM, Teodor Sigaev wrote: > > > Peter Geoghegan wrote: >> On Thu, Jun 28, 2018 at 9:47 AM, Teodor Sigaev wrote: >>> Current estimation of sort cost has following issues: >>>   - it doesn't differ one and many columns sort >>>   - it doesn't pay attention to comparison

Re: cost_sort() improvements

2018-07-08 Thread Tomas Vondra
Hi, I'll do more experiments/tests next week, but let me share at least some initial thoughts ... On 06/28/2018 06:47 PM, Teodor Sigaev wrote: > Hi! > > Current estimation of sort cost has following issues: >  - it doesn't differ one and many columns sort >  - it doesn't pay attention to

"Write amplification" is made worse by "getting tired" while inserting into nbtree secondary indexes (Was: Why B-Tree suffix truncation matters)

2018-07-08 Thread Peter Geoghegan
On Wed, Jul 4, 2018 at 9:43 AM, Peter Geoghegan wrote: > I'm starting this new thread to discuss the benefits of B-Tree suffix > truncation, and to demonstrate how effective it can be at increasing > fan-out and space utilization with a real-world example. I haven't > explained why suffix

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-07-08 Thread Jeff Davis
On Tue, 2018-03-06 at 20:09 +0900, Etsuro Fujita wrote: > Agreed.  I added a comment to that function.  I think that that > comment  > in combination with changes to the FDW docs in the patch would help > FDW  > authors understand why that is needed.  Please find attached an > updated  > version

Re: WAL prefetch

2018-07-08 Thread Sean Chittenden
> Without prefetching, it's ~70GB of WAL. With prefetching, it's only about > 30GB. Considering the 1-hour test generates about 90GB of WAL, this means the > replay speed grew from 20GB/h to almost 60GB/h. That's rather measurable > improvement ;-) Thank you everyone for this reasonably in-depth

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-08 Thread Masahiko Sawada
On Wed, Jul 4, 2018 at 11:24 PM, Masahiko Sawada wrote: > Hi, > > I got an assertion failure when I use GROUPS mode and specifies offset > without ORDER BY clause. The reproduction steps and the backtrace I > got are following. > > =# create table test as select 1 as c; > =# select sum(c) over

Re: [HACKERS] Secondary index access optimizations

2018-07-08 Thread David Rowley
On 22 March 2018 at 22:38, Konstantin Knizhnik wrote: > Attached please find rebased version of the patch. Hi, I started looking over this patch and have a few comments: I don't think this range type idea is a great one. I don't think it's going to ever perform very well. I also see you're

Re: [HACKERS] Crash on promotion when recovery.conf is renamed

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 09:09:27PM +0900, Michael Paquier wrote: > Sure. I think I can finish the set on Monday JST then. So, I have been able to back-patch things down to 9.5, but further down I am not really convinced that it is worth meddling with that, particularly in light of 7cbee7c which

Re: Copy function for logical replication slots

2018-07-08 Thread Michael Paquier
On Mon, Jul 09, 2018 at 10:06:00AM +0900, Masahiko Sawada wrote: > I think that this patch might be splitted but I will be able to send > an updated patch in the next week. As you suggestion this patch needs > more careful thoughts. I'll move this patch to the next commit fest if > I will not be

[GSoC] working status

2018-07-08 Thread Charles Cui
Hi mentors and hackers, The second review is coming. Here is my working status so far. 1. Complete the thrift compact protocol implementation using bytea interface. 2. Thrift type (binary protocol) is almost done, the only remaining part is struct encoding and decoding. With the thrift type,

Re: Let's remove DSM_IMPL_NONE.

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 11:08:02PM +0200, Peter Eisentraut wrote: > On 26.06.18 09:10, Kyotaro HORIGUCHI wrote: >> --- a/src/include/storage/dsm_impl.h >> +++ b/src/include/storage/dsm_impl.h >> @@ -14,11 +14,10 @@ >> #define DSM_IMPL_H >> >> /* Dynamic shared memory implementations. */ >>

Re: no partition pruning when partitioning using array type

2018-07-08 Thread Amit Langote
On 2018/07/07 0:13, Andrew Dunstan wrote: > > > On 05/08/2018 02:18 AM, Amit Langote wrote: >> On 2018/03/01 17:16, Amit Langote wrote: >>> Added this to CF (actually moved to the September one after first having >>> added it to the CF that is just getting started). >>> >>> It seems to me that

Re: Typo in Japanese translation of psql.

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 06:14:24PM +0900, Yugo Nagata wrote: > However, I think you have to submit the whole po file to Patch Tracker[1] > instead of a patch according to the wiki [2]. > > [1] https://redmine.postgresql.org/projects/pgtranslation > [2] https://wiki.postgresql.org/wiki/NLS My

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 05:10:18PM -0400, Alvaro Herrera wrote: > Ugh, it's true :-( > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=25fff40798fc4ac11a241bfd9ab0c45c085e2212#patch8 > > Dave, Simon, any comments? The offending line:

Re: no partition pruning when partitioning using array type

2018-07-08 Thread Amit Langote
Thanks for taking a look. On 2018/07/07 9:19, Alvaro Herrera wrote: > On 2018-May-08, Amit Langote wrote: > >> I would like to revisit this as a bug fix for get_partition_operator() to >> be applied to both PG 10 and HEAD. In the former case, it fixes the bug >> that constraint exclusion code

RE: Locking B-tree leafs immediately in exclusive mode

2018-07-08 Thread Imai, Yoshikazu
On Mon, June 11, 2018 at 4:31 PM, Alexander Korotkov wrote: > On Mon, Jun 11, 2018 at 1:06 PM Simon Riggs wrote: > > On 5 June 2018 at 14:45, Alexander Korotkov > > wrote: > > > Currently _bt_search() always locks leaf buffer in shared mode (aka > > > BT_READ), while caller can relock it later.

Re: Invisible Indexes

2018-07-08 Thread Jeff Janes
On Mon, Jun 18, 2018 at 5:57 PM, Tom Lane wrote: > > I'm not sure about the "enforce constraint only" argument --- that > sounds like a made-up use-case to me. It's pretty hard to imagine > a case where a unique index applies to a query and yet you don't want > to use it. > I've not seen it

XLogSegNoOffsetToRecPtr fixup

2018-07-08 Thread Alvaro Herrera
Pursuant to closing comment in https://postgr.es/m/20180306214239.ospkf6ie7aa5gm4j@alvherre.pgsql here's a quick patch to change the order of arguments in XLogSegNoOffsetToRecPtr. Commit fc49e24fa69a ("Make WAL segment size configurable at initdb time.") put the walsegsz as last argument,

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 10:52:14PM +0200, Peter Eisentraut wrote: > This patch looks sensible to me. We also use access() elsewhere in the > backend to test for file existence. Yes, the patch made sense when I looked at it, and it still does, so committed. -- Michael signature.asc Description:

Re: Desirability of client-side expressions in psql?

2018-07-08 Thread Fabien COELHO
Hello Stephen, [...] So, I tend to agree w/ Andrew that while this is a good topic to have on -hackers, it shouldn't be a CF entry. I wouldn't draw any conclusions from Andrew closing it out as "not appropriate for CF". Sure. As I had no committer feedback on the discussion for 3 months,

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-07-08 Thread Fabien COELHO
Hello Alvaro, For context: in the backend, elog() is only used for internal messages (i.e. "can't-happen" conditions), and ereport() is used for user-facing messages. There are many things ereport() has that elog() doesn't, such as additional message fields (HINT, DETAIL, etc) that I think

Re: [HACKERS] Restricting maximum keep segments by repslots

2018-07-08 Thread Kyotaro HORIGUCHI
Hello. Sawada-san. Thank you for the comments. At Thu, 5 Jul 2018 15:43:56 +0900, Masahiko Sawada wrote in > On Wed, Jul 4, 2018 at 5:28 PM, Kyotaro HORIGUCHI > wrote: > > Hello. > > > > At Tue, 26 Jun 2018 16:26:59 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI > > wrote in > >

Re: Postgres 11 release notes

2018-07-08 Thread Andres Freund
On 2018-07-09 14:18:14 +0900, Tatsuro Yamada wrote: > Hi Bruce, > > > I expect a torrent of feedback.;-) > > Could you add this fix to the release note because this change affects > an extension developer using the hook function. > It would be better to know the change by reading the release

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-07-08 Thread Haribabu Kommi
On Mon, Jul 9, 2018 at 3:39 PM Haribabu Kommi wrote: > > On Mon, Jul 9, 2018 at 12:24 PM Michael Paquier > wrote: > >> On Fri, Jul 06, 2018 at 05:10:18PM -0400, Alvaro Herrera wrote: >> > Ugh, it's true :-( >> > >>

Incorrect error handling for two-phase state files resulting in data loss

2018-07-08 Thread Michael Paquier
Hi all, This is a follow-up of the following thread where I have touched the topic of corrupted 2PC files being completely ignored by recovery: https://www.postgresql.org/message-id/20180709012955.GD1467%40paquier.xyz I have posted a patch on this thread, but after more reviews I have noticed

Re: Non-reserved replication slots and slot advancing

2018-07-08 Thread Michael Paquier
On Fri, Jul 06, 2018 at 03:37:57PM +0900, Kyotaro HORIGUCHI wrote: > I'm not so in favor of the word "reserve" in first place since it > doesn't seem intuitive for me, but "active" is already used for > the state where the connection with the peer is made. (The word > "reserve" may be misused

Re: Postgres 11 release notes

2018-07-08 Thread Tatsuro Yamada
Hi Bruce, > I expect a torrent of feedback.;-) Could you add this fix to the release note because this change affects an extension developer using the hook function. It would be better to know the change by reading the release note, not compilation error. Add QueryEnvironment

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-07-08 Thread Haribabu Kommi
On Mon, Jul 9, 2018 at 12:24 PM Michael Paquier wrote: > On Fri, Jul 06, 2018 at 05:10:18PM -0400, Alvaro Herrera wrote: > > Ugh, it's true :-( > > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=25fff40798fc4ac11a241bfd9ab0c45c085e2212#patch8 > > > > Dave, Simon, any

Re: How can we submit code patches that implement our (pending) patents?

2018-07-08 Thread Alvaro Herrera
On 2018-Jul-07, David Fetter wrote: > If they have no plans to exercise any proprietary rights, our usual > process where people submit things and agree to have us label them > with the PGDG copyright and publish them under TPL would be the > simplest way to accomplish it. Eh, but if the

Re: How can we submit code patches that implement our (pending) patents?

2018-07-08 Thread Andres Freund
Hi, On 2018-07-08 11:46:51 -0400, Alvaro Herrera wrote: > On 2018-Jul-07, David Fetter wrote: > > > If they have no plans to exercise any proprietary rights, our usual > > process where people submit things and agree to have us label them > > with the PGDG copyright and publish them under TPL