Re: [HACKERS] Small improvement to compactify_tuples

2017-11-27 Thread Юрий Соколов
2017-11-08 23:44 GMT+03:00 Юрий Соколов : > > 2017-11-08 20:02 GMT+03:00 Tom Lane : > > > > Claudio Freire writes: > > > What's perhaps not clear is whether there are better ideas. Like > > > rebuilding the page as Tom proposes, which doesn't seem like a bad > > > idea. Bucket sort already is O(by

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Antonin Houska
Masahiko Sawada wrote: > On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: > > Masahiko Sawada wrote: > > > >> On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat > >> wrote: > >> > On Thu, Oct 26, 2017 at 7:41 PM, Masahiko Sawada > >> > wrote: > >> >> > >> >> Because I don't want to break

Re: ERROR: too many dynamic shared memory segments

2017-11-27 Thread Dilip Kumar
On Tue, Nov 28, 2017 at 4:18 AM, Thomas Munro wrote: > On Tue, Nov 28, 2017 at 10:05 AM, Jakub Glapa > wrote: > > As for the crash. I dug up the initial log and it looks like a > segmentation > > fault... > > > > 2017-11-23 07:26:53 CET:192.168.10.83(35238):user@db:[30003]: ERROR: > too > > many

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-27 Thread Amit Kapila
On Mon, Nov 27, 2017 at 11:26 PM, hubert depesz lubaczewski wrote: > On Mon, Nov 27, 2017 at 05:24:49PM +0530, Amit Kapila wrote: >> I think it is "actual_time * 1" for anything below Gather. > > Well, I think I found another problem. > > Please take a look at: > https://explain.depesz.com/s/Bs8c

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-27 Thread Rajkumar Raghuwanshi
On Thu, Nov 23, 2017 at 6:38 PM, Jeevan Chalke wrote: > Let me know if I missed any comment to be fixed. Hi, I have applied v8 patches on commit id 8735978e7aebfbc499843630131c18d1f7346c79, and getting below observation, please take a look. Observation: "when joining a foreign partition table w

Re: [HACKERS] new function for tsquery creartion

2017-11-27 Thread Victor Drobny
On 2017-11-19 04:30, Tomas Vondra wrote: Hello, Hi, On 09/13/2017 10:57 AM, Victor Drobny wrote: On 2017-09-09 06:03, Thomas Munro wrote: Please send a rebased version of the patch for people to review and test as that one has bit-rotted. Hello, Thank you for interest. In the attachment you c

Re: [HACKERS] [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM

2017-11-27 Thread Nikolay Shaplov
В письме от 28 ноября 2017 11:23:38 пользователь Michael Paquier написал: > On Tue, Nov 28, 2017 at 11:22 AM, Michael Paquier > > wrote: > > On Tue, Nov 14, 2017 at 4:44 PM, Michael Paquier > > > > wrote: > >> On Mon, Oct 30, 2017 at 9:49 AM, Nikolay Shaplov wrote: > >>> В письме от 3 сентябр

Re: [HACKERS] PATCH: pgbench - option to build using ppoll() for larger connection counts

2017-11-27 Thread Fabien COELHO
Hello Michaël, Could you rebase the v11 patch? This patch has been waiting for a rebase for more than three weeks as of today, I am marking it as returned with feedback. It would be a good idea to reply to Robert's input in https://www.postgresql.org/message-id/ca+tgmoyybnv-ddhvpmxlb2nx2sqenj

Re: [HACKERS] Useless code in ExecInitModifyTable

2017-11-27 Thread Etsuro Fujita
(2017/11/28 11:18), Michael Paquier wrote: On Tue, Sep 5, 2017 at 12:41 PM, Ryan Murphy wrote: The new status of this patch is: Waiting on Author This status is misleading, so I switched it back to "needs review" (please be careful about that!). I think I forgot to change that status. Sorr

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-27 Thread David Fetter
On Mon, Nov 27, 2017 at 04:55:17PM +, Oliver Ford wrote: > On Mon, Nov 27, 2017 at 4:40 PM, Erik Rijkers wrote: > > On 2017-11-27 17:34, Erik Rijkers wrote: > >> > >> On 2017-11-27 16:01, Oliver Ford wrote: > >>> > >>> Attached is it in bare diff form. > >> > >> > >> [0001-window-frame-v3.patc

Re: simplehash: tb->sizemask = 0

2017-11-27 Thread Tom Lane
Tomas Vondra writes: > I'm a bit puzzled by this code in SH_COMPUTE_PARAMETERS: > if (tb->size == SH_MAX_SIZE) > tb->sizemask = 0; > else > tb->sizemask = tb->size - 1; > Doesn't that mean that with SH_MAX_SIZE we end up with sizemask being 0 > (i.e. no bits set)? Yeah,

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Ashutosh Bapat
On Tue, Nov 28, 2017 at 3:04 AM, Masahiko Sawada wrote: > On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: >> Masahiko Sawada wrote: >> >>> On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat >>> wrote: >>> > On Thu, Oct 26, 2017 at 7:41 PM, Masahiko Sawada >>> > wrote: >>> >> >>> >> Becau

Re: Commit fest 2017-11

2017-11-27 Thread Michael Paquier
On Wed, Nov 1, 2017 at 11:30 PM, Michael Paquier wrote: > On Wed, Nov 1, 2017 at 9:04 AM, Michael Paquier > wrote: >> Anybody willing to take the hat of the commit fest manager? If nobody, >> I am fine to take the hat as default choice this time. > > And now it is open. Let's the fest begin. The

Re: [HACKERS] [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM

2017-11-27 Thread Michael Paquier
On Tue, Nov 28, 2017 at 11:22 AM, Michael Paquier wrote: > On Tue, Nov 14, 2017 at 4:44 PM, Michael Paquier > wrote: >> On Mon, Oct 30, 2017 at 9:49 AM, Nikolay Shaplov wrote: >>> В письме от 3 сентября 2017 11:45:43 пользователь Alvaro Herrera написал: >>> >>> Yet another git rebase. This patch

Re: [HACKERS] [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM

2017-11-27 Thread Michael Paquier
On Tue, Nov 14, 2017 at 4:44 PM, Michael Paquier wrote: > On Mon, Oct 30, 2017 at 9:49 AM, Nikolay Shaplov wrote: >> В письме от 3 сентября 2017 11:45:43 пользователь Alvaro Herrera написал: >> >> Yet another git rebase. This patch can be applied to master branch again. >> >> For this patch no re

Re: [HACKERS] GnuTLS support

2017-11-27 Thread Michael Paquier
On Mon, Nov 27, 2017 at 2:37 PM, Michael Paquier wrote: > On Mon, Nov 27, 2017 at 10:28 AM, Andreas Karlsson wrote: >> Hm, after reading more of our MSVC code it seems like building with MSVC >> does not really use switch, people rather have to create a config.pl. Is >> that correct? The MSVC scr

Re: [HACKERS] Useless code in ExecInitModifyTable

2017-11-27 Thread Michael Paquier
On Tue, Sep 5, 2017 at 12:41 PM, Ryan Murphy wrote: > The new status of this patch is: Waiting on Author This status is misleading, so I switched it back to "needs review" (please be careful about that!). I can still apply the patch correctly. Sorry I am not taking the time to have a meaningful o

Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

2017-11-27 Thread Michael Paquier
On Fri, Sep 29, 2017 at 10:06 PM, Peter Eisentraut wrote: > On 9/22/17 15:31, Peter Eisentraut wrote: >> I suggest you create a patch that focuses on the --create part. >> >> You can create a separate follow-on patch for the --start part if you >> wish, but I think that that patch would be rejecte

Re: [HACKERS] PATCH: pgbench - break out timing data for initialization phases

2017-11-27 Thread Michael Paquier
On Tue, Sep 26, 2017 at 3:07 AM, Fabien COELHO wrote: > > Hello Doug, > >> total time: 316.03 s (insert 161.60 s, commit 0.64 s, vacuum 60.77 s, >> index 93.01 s) > > > Definitely interesting. > > There is a "ready for committers" patch in the CF which extensively rework > the initialization: it b

Re: [HACKERS] proposal: Support Unicode host variable in ECPG

2017-11-27 Thread Michael Paquier
On Tue, Nov 21, 2017 at 4:02 PM, Michael Paquier wrote: > The patch does not apply anymore and needs a rebase. There are also a > bunch of whitespace errors, no documentation in the patch, and it > seems to me that this patch introduces many concepts so it could be > broken down into many individu

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-11-27 Thread Michael Paquier
On Mon, Nov 20, 2017 at 11:35 AM, Michael Paquier wrote: > The last set of patches available here does not apply: > https://www.postgresql.org/message-id/b5e2b87d-3e8a-4597-9a7f-8489b3b67...@yesql.se > The SSL test refactoring is one cause. I think as well that this is > crashing when attempting t

Re: [PATCH] Atomic pgrename on Windows

2017-11-27 Thread Craig Ringer
On 27 November 2017 at 14:28, Alexander Korotkov wrote: > Hi! > > It's assumed in PostgreSQL codebase that pgrename atomically replaces > target file with source file even if target file is open and being read by > another process. And this assumption is true on Linux, but it's false on > Window

Re: [HACKERS] [PATCH] A hook for session start

2017-11-27 Thread Michael Paquier
On Tue, Nov 21, 2017 at 4:09 AM, Fabrízio de Royes Mello wrote: > Due to some "Blackfriday" commitments I'll be able to work again with this > patch on next week. Okay, this has proved to require broader changes than thought first. I am marking the patch as returned with feedback. -- Michael

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

2017-11-27 Thread Michael Paquier
On Thu, Oct 5, 2017 at 9:58 AM, Vaishnavi Prabakaran wrote: > Thanks for the suggestion and, OK I will create a new patch in upcoming > commitfest with attached patch addressing above review comments. The patch still applies and there has been no updates for the last month, as well as no reviews.

Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.

2017-11-27 Thread Michael Paquier
On Mon, Oct 2, 2017 at 4:16 PM, Daniel Gustafsson wrote: > Based on the unaddressed questions raised in this thread, I’m marking this > patch Returned with Feedback. Please re-submit a new version of the patch to > a > future commitfest. For some reason this patch has been moved to CF 2017-11,

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Etsuro Fujita
(2017/11/28 7:58), Tom Lane wrote: Pushed with that and some cosmetic fiddling with comments and docs. Thank you. Best regards, Etsuro Fujita

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-11-27 Thread Michael Paquier
On Sun, Nov 19, 2017 at 6:40 AM, Tomas Vondra wrote: > Thanks for looking into this. I agree your patch is more consistent and > generally cleaner. This is classified as a bug fix, and is marked as waiting on author. I am moving it to next CF as work continues. -- Michael

Re: [HACKERS] subscription worker signalling wal writer too much

2017-11-27 Thread Michael Paquier
On Tue, Nov 21, 2017 at 3:44 PM, Michael Paquier wrote: > I have just gone through this thread, and reducing the amount of times > the WAL writer is woken up is something worth doing. The last version > if v3 that Robert has sent in > https://www.postgresql.org/message-id/CA+TgmoZhw_nyrxYUqSuDh-XE

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-11-27 Thread Michael Paquier
On Mon, Sep 18, 2017 at 10:33 PM, Daniel Gustafsson wrote: >> On 18 Sep 2017, at 15:31, Jan Michálek wrote: >> >> I have`t any new version recently, because i was waiting for new version. >> But I will have some time on this in next months. How many time I have to >> next freeze? > > The next c

Re: [HACKERS] PATCH: pgbench - option to build using ppoll() for larger connection counts

2017-11-27 Thread Michael Paquier
On Fri, Nov 3, 2017 at 2:29 PM, Fabien COELHO wrote: > Could you rebase the v11 patch? This patch has been waiting for a rebase for more than three weeks as of today, I am marking it as returned with feedback. It would be a good idea to reply to Robert's input in https://www.postgresql.org/messag

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-11-27 Thread Michael Paquier
On Thu, Sep 14, 2017 at 3:34 PM, Kyotaro HORIGUCHI wrote: > At Wed, 13 Sep 2017 17:42:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI > wrote in > <20170913.174239.25978735.horiguchi.kyot...@lab.ntt.co.jp> >> filterdiff seems to did something wrong.. > > # to did... > > The patch is broken by

Fix a typo in xact.c

2017-11-27 Thread Masahiko Sawada
Hi, Attached patch for $subject. s/recoreds/record/ Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_typo_in_xact_c.patch Description: Binary data

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

2017-11-27 Thread Michael Paquier
On Tue, Nov 28, 2017 at 12:11 AM, Daniel Gustafsson wrote: >> The patch needs a rebase, and there are a couple of places that need >> an extra lookup I think: >> $ git grep defname -- *.c | grep strcasecmp | wc -l >> 39 > > Rebased and handled a few more places which I had either missed in th

Re: [PATCH] Atomic pgrename on Windows

2017-11-27 Thread Andres Freund
On 2017-11-28 09:47:45 +0900, Michael Paquier wrote: > On Mon, Nov 27, 2017 at 3:28 PM, Alexander Korotkov > wrote: > > Attached patch atomic-pgrename-windows-1.patch fixes this problem. It > > appears to be possible to atomically replace file on Windows – ReplaceFile() > > does that. ReplaceFil

Re: [HACKERS] Timeline ID in backup_label file

2017-11-27 Thread Michael Paquier
On Tue, Nov 28, 2017 at 9:40 AM, David Steele wrote: > Perhaps I'm the one who is misunderstanding. If you propose a patch I'll be > happy to review it, though I doubt there is a lot to be gained even if it > would be a better implementation. OK. I'll keep that in mind. Thanks for the input. --

Re: [PATCH] Atomic pgrename on Windows

2017-11-27 Thread Michael Paquier
On Mon, Nov 27, 2017 at 3:28 PM, Alexander Korotkov wrote: > Attached patch atomic-pgrename-windows-1.patch fixes this problem. It > appears to be possible to atomically replace file on Windows – ReplaceFile() > does that. ReplaceFiles() requires target file to exist, this is why we > still need

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Robert Haas
On Mon, Nov 27, 2017 at 4:35 PM Masahiko Sawada wrote: > What I'd like to guarantee is that the subsequent read can see the > committed result of previous writes if the transaction involving > multiple foreign servers is committed without cancellation by user. In > other words, the backend should

Re: Isn't partition drop code seriously at risk of deadlock?

2017-11-27 Thread Amit Langote
On 2017/11/28 9:04, Tom Lane wrote: > The complaint in bug #14927 that heap_drop_with_catalog is not bothering > to check for SearchSysCache lookup failure (in code evidently newly added > for the partition feature) seems to me to be only scratching the surface > of what's wrong with that code. In

Re: [HACKERS] Timeline ID in backup_label file

2017-11-27 Thread David Steele
On 11/27/17 7:11 PM, Michael Paquier wrote: On Mon, Nov 27, 2017 at 11:06 PM, David Steele wrote: On 11/15/17 10:09 PM, Michael Paquier wrote: read_backup_label() is a static function in the backend code. With #2 I do not imply to change the order of the elements written in the backup_label f

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-11-27 Thread Masahiko Sawada
On Tue, Nov 28, 2017 at 4:56 AM, Robert Haas wrote: > On Fri, Nov 24, 2017 at 5:33 AM, Alexander Korotkov > wrote: >> pg_prune_xid makes sense only for heap pages. Once we introduce special >> area for heap pages, we can move pg_prune_xid there and save some bytes in >> index pages. However, th

Expression based aggregate transition / combine function invocation

2017-11-27 Thread Andres Freund
Hi, this is part of my work to make expression evaluation JITable. In a lot of analytics queries the major bottleneck is transition function invocation (makes sense, hardly anyone wants to see billions of rows). Therefore for JITing to be really valuable transition function stuff needs to be JITab

Re: [HACKERS] Timeline ID in backup_label file

2017-11-27 Thread Michael Paquier
On Mon, Nov 27, 2017 at 11:06 PM, David Steele wrote: > On 11/15/17 10:09 PM, Michael Paquier wrote: >> On Thu, Nov 16, 2017 at 9:20 AM, David Steele wrote: >>> For this patch at least, I think we should do #1. Getting rid of the order >>> dependency is attractive but there may be other programs

Isn't partition drop code seriously at risk of deadlock?

2017-11-27 Thread Tom Lane
The complaint in bug #14927 that heap_drop_with_catalog is not bothering to check for SearchSysCache lookup failure (in code evidently newly added for the partition feature) seems to me to be only scratching the surface of what's wrong with that code. In particular, I do not understand how it can

Re: [HACKERS] More stats about skipped vacuums

2017-11-27 Thread Tom Lane
Magnus Hagander writes: > What I've been thinking about for that one before is if we could just > invent a protocol (shmq based maybe) whereby autovacuum can ask the stats > collector for a single table or index stat. If autovacuum never needs to > see a consistent view between multiple tables, I

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Tom Lane
Dean Rasheed writes: > On 27 November 2017 at 16:35, Tom Lane wrote: >> On looking closer, the reason it's like that in Fujita-san's patch >> is to minimize the API churn seen by FDW AddForeignUpdateTargets >> functions, specifically whether they see a tlist that's before or >> after what expand_

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-11-27 Thread Alexander Korotkov
On Mon, Nov 27, 2017 at 10:56 PM, Robert Haas wrote: > On Fri, Nov 24, 2017 at 5:33 AM, Alexander Korotkov > wrote: > > pg_prune_xid makes sense only for heap pages. Once we introduce special > > area for heap pages, we can move pg_prune_xid there and save some bytes > in > > index pages. Howe

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-27 Thread Masahiko Sawada
On Fri, Nov 24, 2017 at 10:28 PM, Antonin Houska wrote: > Masahiko Sawada wrote: > >> On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat >> wrote: >> > On Thu, Oct 26, 2017 at 7:41 PM, Masahiko Sawada >> > wrote: >> >> >> >> Because I don't want to break the current user semantics. that is, >> >>

Re: [PATCH] Fix crash in int8_avg_combine().

2017-11-27 Thread Hadi Moshayedi
On Sat, Nov 25, 2017 at 10:47 PM, Andres Freund wrote: > diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h > > index 869c59dc85..2dc59e89cd 100644 > > --- a/src/include/utils/memutils.h > > +++ b/src/include/utils/memutils.h > > @@ -189,7 +189,7 @@ extern MemoryContext Slab

Re: [PATCH] Fix crash in int8_avg_combine().

2017-11-27 Thread Hadi Moshayedi
On Sat, Nov 25, 2017 at 10:55 PM, Tom Lane wrote: > I believe we already dealt with this: > > Author: Tom Lane > Branch: REL_10_STABLE [619a8c47d] 2017-11-14 17:49:49 -0500 > Branch: REL9_6_STABLE [4a15f87d2] 2017-11-14 17:49:49 -0500 > Branch: REL9_5_STABLE [d4e38489f] 2017-11-14 17:49:49 -0500

Re: [HACKERS] More stats about skipped vacuums

2017-11-27 Thread Magnus Hagander
On Mon, Nov 27, 2017 at 7:53 PM, Robert Haas wrote: > On Sun, Nov 26, 2017 at 3:19 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane wrote: > >>> Mumble. It's a property I'm pretty hesitant to give up, especially > >>> since the stats views have worke

Re: default range partition and constraint exclusion

2017-11-27 Thread Robert Haas
On Mon, Nov 27, 2017 at 4:04 AM, Kyotaro HORIGUCHI wrote: > This is the story in my understanding. Thanks, that's helpful. Sorry I didn't have time yet to study this in detail myself. If we're routing tuples to a partition for which the partition constraint is evaluating to null, that's OK, but

simplehash: tb->sizemask = 0

2017-11-27 Thread Tomas Vondra
Hi, I'm a bit puzzled by this code in SH_COMPUTE_PARAMETERS: if (tb->size == SH_MAX_SIZE) tb->sizemask = 0; else tb->sizemask = tb->size - 1; Doesn't that mean that with SH_MAX_SIZE we end up with sizemask being 0 (i.e. no bits set)? At least that's what I get from p

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-11-27 Thread Peter Geoghegan
On Mon, Nov 27, 2017 at 11:56 AM, Robert Haas wrote: > On Fri, Nov 24, 2017 at 5:33 AM, Alexander Korotkov > wrote: >> pg_prune_xid makes sense only for heap pages. Once we introduce special >> area for heap pages, we can move pg_prune_xid there and save some bytes in >> index pages. However, t

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-11-27 Thread Robert Haas
On Fri, Nov 24, 2017 at 5:33 AM, Alexander Korotkov wrote: > pg_prune_xid makes sense only for heap pages. Once we introduce special > area for heap pages, we can move pg_prune_xid there and save some bytes in > index pages. However, this is an optimization not directly related to > 64-bit xids.

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-11-27 Thread Pavel Stehule
2017-11-27 8:58 GMT+01:00 Alexander Korotkov : > On Tue, Nov 14, 2017 at 3:26 PM, Magnus Hagander > wrote: > >> On Mon, Nov 13, 2017 at 3:17 PM, Dean Rasheed >> wrote: >> >>> On 28 October 2017 at 13:46, Pavel Stehule >>> wrote: >>> > I though about Alexander proposal, and I am thinking so it c

Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA

2017-11-27 Thread Jesper Pedersen
Hi Yura, On 11/27/2017 07:41 AM, Юрий Соколов wrote: I looked at assembly, and remembered, that last commit simplifies `init_local_spin_delay` to just two-three writes of zeroes (looks like compiler combines 2*4byte write into 1*8 write). Compared to code around (especially in LWLockAcquire itse

Re: [HACKERS] More stats about skipped vacuums

2017-11-27 Thread Robert Haas
On Sun, Nov 26, 2017 at 3:19 PM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane wrote: >>> Mumble. It's a property I'm pretty hesitant to give up, especially >>> since the stats views have worked like that since day one. It's >>> inevitable that weakening t

Re: [HACKERS] More stats about skipped vacuums

2017-11-27 Thread Robert Haas
On Mon, Nov 27, 2017 at 1:49 AM, Kyotaro HORIGUCHI wrote: > Hmmm. Okay, we must make stats collector more effeicient if we > want to have additional counters with smaller significance in the > table stats. Currently sizeof(PgStat_StatTabEntry) is 168 > bytes. The whole of the patchset increases it

Re: [HACKERS] path toward faster partition pruning

2017-11-27 Thread Jesper Pedersen
Hi Amit, On 11/24/2017 12:00 AM, Amit Langote wrote: On 2017/11/23 3:56, Jesper Pedersen wrote: EXPLAIN (ANALYZE) SELECT t1.a, t1.b, t2.c, t2.d FROM t1 INNER JOIN t2 ON t2.c = t1.b WHERE t2.d = 1; I just wanted to highlight that the "JOIN ON" partition isn't pruned - the "WHERE" one is. Did y

Re: Do we accept doc changes to back branches?

2017-11-27 Thread Stephen Frost
Greetings, * Joshua D. Drake (j...@commandprompt.com) wrote: > I don't recall, do we allow non-bug fix (or what constitutes a bug) > for back branches with docs? I have been reviewing the logical > replication docs and they could use some love but I need to know > which branch I should start work

Do we accept doc changes to back branches?

2017-11-27 Thread Joshua D. Drake
-hackers, I don't recall, do we allow non-bug fix (or what constitutes a bug) for back branches with docs? I have been reviewing the logical replication docs and they could use some love but I need to know which branch I should start work on. Thanks, JD -- Command Prompt, Inc. || http:/

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-27 Thread hubert depesz lubaczewski
On Mon, Nov 27, 2017 at 05:24:49PM +0530, Amit Kapila wrote: > I think it is "actual_time * 1" for anything below Gather. Well, I think I found another problem. Please take a look at: https://explain.depesz.com/s/Bs8c Node 15 is Gather with loops = 2974 (because it was ran by nested loop). Ther

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Dean Rasheed
On 27 November 2017 at 16:35, Tom Lane wrote: > I wrote: >> Dean Rasheed writes: >>> A separate point -- it might be marginally more efficient to have the >>> work of rewriteTargetListUD() done after expand_targetlist() to avoid >>> the possible renumbering of the resjunk entries. > >> Hm. It wo

Re: [HACKERS] Custom compression methods

2017-11-27 Thread Tomas Vondra
Hi, On 11/27/2017 04:52 PM, Ildus Kurbangaliev wrote: > ... > > Hi. This looks like a serious bug, but I couldn't reproduce it yet. > Did you upgrade some old database or this bug happened after > insertion of all data to new database? I tried using your 'archie' > tool to download mailing lists

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-27 Thread Oliver Ford
On Mon, Nov 27, 2017 at 4:40 PM, Erik Rijkers wrote: > On 2017-11-27 17:34, Erik Rijkers wrote: >> >> On 2017-11-27 16:01, Oliver Ford wrote: >>> >>> Attached is it in bare diff form. >> >> >> [0001-window-frame-v3.patch] >> >> Thanks, that did indeed fix it: >> >> make && make check now ok. >>

Re: [HACKERS] Parallel Append implementation

2017-11-27 Thread amul sul
Thanks a lot Rajkumar for this test. I am able to reproduce this crash by enabling partition wise join. The reason for this crash is the same as ​ the​ previous[1] i.e node->as_whichplan value. This time append->first_partial_plan value looks suspicious. With the following change to the v21 patc

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2017-11-27 Thread Tomas Vondra
Hi, Attached is an updated version of the patch series, fixing the issues reported by Mark Dilger: 1) Fix fabs() issue in histogram.c. 2) Do not rely on extra_data being StdAnalyzeData, and instead lookup the LT operator explicitly. This also adds a simple regression tests to make sure ANALYZE o

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-27 Thread Erik Rijkers
On 2017-11-27 17:34, Erik Rijkers wrote: On 2017-11-27 16:01, Oliver Ford wrote: Attached is it in bare diff form. [0001-window-frame-v3.patch] Thanks, that did indeed fix it: make && make check now ok. There were errors in the doc build (unmatched tags); I fixed them in the attached doc-

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Tom Lane
I wrote: > Dean Rasheed writes: >> A separate point -- it might be marginally more efficient to have the >> work of rewriteTargetListUD() done after expand_targetlist() to avoid >> the possible renumbering of the resjunk entries. > Hm. It wouldn't save a lot, but yeah, doing it in this order see

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-27 Thread Erik Rijkers
On 2017-11-27 16:01, Oliver Ford wrote: Attached is it in bare diff form. [0001-window-frame-v3.patch] Thanks, that did indeed fix it: make && make check now ok. There were errors in the doc build (unmatched tags); I fixed them in the attached doc-patch (which should go on top of yours).

Re: [HACKERS] Custom compression methods

2017-11-27 Thread Ildus Kurbangaliev
On Sat, 25 Nov 2017 06:40:00 +0100 Tomas Vondra wrote: > Hi, > > I ran into another issue - after inserting some data into a table > with a tsvector column (without any compression defined), I can no > longer read the data. > > This is what I get in the console: > > db=# select max(md5(body_ts

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Tom Lane
Dean Rasheed writes: > I wonder if, years from now, it might look a bit odd that > rewriteTargetListUD() is doing part of work of preptlist.c, is only > called from there, and yet is located in the rewriter. Yeah, I probably wouldn't have done it like this in a green field, but maintaining tracea

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

2017-11-27 Thread Daniel Gustafsson
> On 17 Nov 2017, at 03:31, Michael Paquier wrote: > > On Tue, Sep 5, 2017 at 5:34 PM, Daniel Gustafsson wrote: >>> On 17 Aug 2017, at 11:08, Daniel Gustafsson wrote: On 16 Aug 2017, at 17:51, Tom Lane wrote: My thought is that if we are looking at words that have been through the >>

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-27 Thread Oliver Ford
On Mon, Nov 27, 2017 at 12:06 PM, Oliver Ford wrote: > On Fri, Nov 24, 2017 at 3:08 PM, Erikjan Rijkers wrote: >> SELECT pg_get_viewdef('v_window'); >> ! pg_get_viewdef >> ! -- >> ! SELECT i.i,+ >> !

Re: [HACKERS] Timeline ID in backup_label file

2017-11-27 Thread David Steele
Hi Michael, On 11/15/17 10:09 PM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 9:20 AM, David Steele wrote: >> For this patch at least, I think we should do #1. Getting rid of the order >> dependency is attractive but there may be other programs that are depending >> on the order. I know yo

Re: PG10.1 autovac killed building extended stats

2017-11-27 Thread Justin Pryzby
On Fri, Nov 17, 2017 at 03:43:52PM -0600, Justin Pryzby wrote: > On Fri, Nov 17, 2017 at 01:36:00PM -0300, Alvaro Herrera wrote: > > Justin Pryzby wrote: > > > > > Core was generated by `postgres: autovacuum worker process gtt > > >'. > > > Program terminated with signal 11, Segmen

Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA

2017-11-27 Thread Юрий Соколов
2017-11-26 19:51 GMT+03:00 Юрий Соколов : > > 2017-11-06 18:07 GMT+03:00 Sokolov Yura : > > > > On 2017-10-20 11:54, Sokolov Yura wrote: > >> > >> Hello, > >> > >> On 2017-10-19 19:46, Andres Freund wrote: > >>> > >>> On 2017-10-19 14:36:56 +0300, Sokolov Yura wrote: > > > > + init_loca

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-27 Thread Oliver Ford
On Fri, Nov 24, 2017 at 3:08 PM, Erikjan Rijkers wrote: > SELECT pg_get_viewdef('v_window'); > ! pg_get_viewdef > ! -- > ! SELECT i.i,+ > ! sum(i.i) OVER (ORDER BY i.i) AS sum_rows+ > FROM ge

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-27 Thread Amit Kapila
On Mon, Nov 27, 2017 at 2:45 PM, hubert depesz lubaczewski wrote: > On Sat, Nov 25, 2017 at 07:08:03AM +0530, Amit Kapila wrote: >> > For example, check step 13 in https://explain.depesz.com/s/gNBd >> > >> > It shows time of 3ms, but loops of 1873, so the actual time is ~ 5600ms. >> > >> > But wit

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Dean Rasheed
On 26 November 2017 at 22:56, Tom Lane wrote: > Etsuro Fujita writes: >> [ fix-rewrite-tlist-v4.patch ] > > I started reviewing this patch. I did not much like the fact that it > effectively moved rewriteTargetListUD to a different file and renamed it. > That seems like unnecessary code churn, p

Re: Transform for pl/perl

2017-11-27 Thread Anthony Bykov
On Wed, 15 Nov 2017 08:58:54 + Aleksander Alekseev wrote: > The following review has been posted through the commitfest > application: make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:tes

Re: [HACKERS] Parallel Hash take II

2017-11-27 Thread Thomas Munro
On Thu, Nov 23, 2017 at 12:36 AM, Thomas Munro wrote: > Here's a new patch set with responses to the last batch of review comments. Rebased on top of the recent SGML->XML change. Also: 1. The final patch in the v26 patchset extended EXPLAIN ANALYZE output to show per-worker information. I'm wi

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-27 Thread hubert depesz lubaczewski
On Sat, Nov 25, 2017 at 07:08:03AM +0530, Amit Kapila wrote: > > For example, check step 13 in https://explain.depesz.com/s/gNBd > > > > It shows time of 3ms, but loops of 1873, so the actual time is ~ 5600ms. > > > > But with parallel execution it seems to be no longer the case. > > > > For exampl

RE: How is the PostgreSQL debuginfo file generated

2017-11-27 Thread Rui Hai Jiang
Thank you for your help. I have tried many ways you suggested. I was not familiar with this area, so I did spend lots of time trying. At last, I found the easiest way to do this is to build a new SRPM package, then build other RPMs from the new SRPM. Thanks a lot, Ruihai ___

Re: default range partition and constraint exclusion

2017-11-27 Thread Kyotaro HORIGUCHI
At Fri, 24 Nov 2017 10:49:07 -0500, Robert Haas wrote in > On Wed, Nov 22, 2017 at 4:21 AM, Amit Langote > wrote: > >>> If all predicate_refuted_by() receives is the expression tree (AND/OR) > >>> with individual nodes being strict clauses involving partition keys (and > >>> nothing about the n

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-11-27 Thread Amit Kapila
On Fri, Nov 24, 2017 at 4:03 PM, Alexander Korotkov wrote: >> > 0002-heap-page-special-1.patch >> > Putting xid and multixact bases into PageHeaderData would take extra 16 >> > bytes on index pages too. That would be waste of space for indexes. >> > This >> > is why I decided to put bases into sp

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-27 Thread Ashutosh Bapat
On Sat, Nov 25, 2017 at 7:08 AM, Amit Kapila wrote: >> >> It looks that the actual time is really actual time, and loops is >> "worker nodes + 1". >> >> Is that really the case? >> > > I think so. > To add to what Amit has explained. The + 1 is for the leader (the backend running the whole query)

Re: Typo in config_default.pl comment

2017-11-27 Thread Magnus Hagander
On Mon, Nov 27, 2017 at 2:21 AM, Andreas Karlsson wrote: > Hi, > > There is a --with-tls in the comments in config_default.pl which should > be --with-tcl. > Oops. Applied, thanks. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.c

Re: [HACKERS] UPDATE of partition key

2017-11-27 Thread Amit Khandekar
On 24 November 2017 at 10:52, Amit Langote wrote: > On 2017/11/23 21:57, Amit Khandekar wrote: >> If we collect the partition keys in expand_partitioned_rtentry(), we >> need to pass the root relation also, so that we can convert the >> partition key attributes to root rel descriptor. And the othe

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-11-27 Thread Alexander Korotkov
On Tue, Nov 14, 2017 at 3:26 PM, Magnus Hagander wrote: > On Mon, Nov 13, 2017 at 3:17 PM, Dean Rasheed > wrote: > >> On 28 October 2017 at 13:46, Pavel Stehule >> wrote: >> > I though about Alexander proposal, and I am thinking so it can be >> probably >> > best if we respect psql design. I im