Re: [PATCH] Keeps tracking the uniqueness with UniqueKey

2020-12-07 Thread Jesper Pedersen
Hi, On 12/5/20 10:38 PM, Andy Fan wrote: Currently the UniqueKey is defined as a List of Expr, rather than EquivalenceClasses. A complete discussion until now can be found at [1] (The messages I replied to also care a lot and the information is completed). This patch has stopped at this place fo

Re: [PATCH] Keeps tracking the uniqueness with UniqueKey

2020-11-30 Thread Jesper Pedersen
Hi, On 11/30/20 5:04 AM, Heikki Linnakangas wrote: On 26/11/2020 16:58, Andy Fan wrote: This patch has stopped moving for a while,  any suggestion about how to move on is appreciated. The question on whether UniqueKey.exprs should be a list of EquivalenceClasses or PathKeys is unresolved. I

Re: [GSoC] Metrics and Monitoring for pgagroal

2021-04-09 Thread Jesper Pedersen
Hi Junduo, On 4/9/21 11:53 AM, Junduo Dong wrote: I'm Junduo Dong, a 22-year-old studying at China University of Geosciences. I would like to participate in the project "pgagroal: Metrics and monitoring" on page "https://wiki.postgresql.org/wiki/GSoC_2021"; for GSoC 2021. Attachment is the pro

Re: MDAM techniques and Index Skip Scan patch

2021-10-25 Thread Jesper Pedersen
Hi Peter, On 10/21/21 22:16, Peter Geoghegan wrote: I returned to the 1995 paper "Efficient Search of Multidimensional B-Trees" [1] as part of the process of reviewing v39 of the skip scan patch, which was posted back in May. It's a great paper, and anybody involved in the skip scan effort shoul

Re: Portability report: ninja

2021-11-01 Thread Jesper Pedersen
Hi, On 11/1/21 15:25, Tom Lane wrote: So it's pretty clear that if we go this way, it'll be the end of the line for support for some very old OS versions. I can't, however, argue with the idea that it's reasonable to require POSIX 2001 support now. Based on these results, I doubt that ninja wi

Re: [HACKERS] path toward faster partition pruning

2018-03-27 Thread Jesper Pedersen
Hi Amit, On 03/27/2018 06:42 AM, Amit Langote wrote: I have managed to make the recursion go away in the attached updated version. I guess that's the result of employing the idea of a "output register" for individual pruning steps as mentioned in Robert's email upthread where he detailed the "p

Re: [HACKERS] path toward faster partition pruning

2018-03-27 Thread Jesper Pedersen
Hi, On 03/27/2018 01:46 PM, Jesper Pedersen wrote: Running v41 with "partition_prune" under valgrind gives the attached report. The reports mostly involve interaction with catcache.c and dynahash.c, so something for a separate thread. Best regards,  Jesper

Re: [HACKERS] path toward faster partition pruning

2018-03-28 Thread Jesper Pedersen
Hi, On 03/28/2018 06:30 AM, Amit Langote wrote: On 2018/03/28 18:29, Amit Langote wrote: Attached is the updated set of patches, which contains other miscellaneous changes such as updated comments, beside the main changes described above. Sorry, one of those miscellaneous changes was a typo t

Re: JIT compiling with LLVM v12

2018-03-29 Thread Jesper Pedersen
Hi Andres, On 03/28/2018 05:27 PM, Andres Freund wrote: On 2018-03-27 10:34:26 -0700, Andres Freund wrote: On 2018-03-27 10:05:47 -0400, Peter Eisentraut wrote: On 3/13/18 19:40, Andres Freund wrote: I've pushed a revised and rebased version of my JIT patchset. What is the status of this it

Re: JIT compiling with LLVM v12

2018-03-29 Thread Jesper Pedersen
Hi, On 03/29/2018 11:03 AM, Pierre Ducroquet wrote: Clang is needed to emit the LLVM bitcode required for inlining. The "-emit- llvm" flag is used for that. A dual compilation is required for inlining to work, one compilation with gcc/clang/msvc/… to build the postgresql binary, one with clang t

Re: [HACKERS] Runtime Partition Pruning

2018-04-03 Thread Jesper Pedersen
Hi David, On 03/31/2018 09:52 AM, David Rowley wrote: I've attached a new version of the patch. I'm now at v18 after having some versions of the patch that I didn't release which were based on various versions of Amit's faster partition pruning patch. Thank you for the updated patch set ! I

Re: [HACKERS] MERGE SQL Statement for PG11

2018-04-04 Thread Jesper Pedersen
Hi Simon, On 03/30/2018 07:10 AM, Simon Riggs wrote: No problems found, but moving proposed commit to 2 April pm There is a warning for this, as attached. Best regards, Jesper diff --git a/src/backend/executor/nodeMerge.c b/src/backend/executor/nodeMerge.c index 0e0d0795d4..9aee073a94 10064

Re: [HACKERS] path toward faster partition pruning

2018-04-04 Thread Jesper Pedersen
Hi, On 04/04/2018 09:29 AM, David Rowley wrote: Thanks for updating. I've made a pass over v49 and I didn't find very much wrong with it. The only real bug I found was a missing IsA(rinfo->clause, Const) in the pseudoconstant check inside generate_partition_pruning_steps_internal. Most of the

Re: [HACKERS] Runtime Partition Pruning

2018-04-04 Thread Jesper Pedersen
Hi David, On 04/03/2018 10:10 PM, David Rowley wrote: The attached case doesn't trigger a generic plan, so basically all time is spent in GetCachedPlan. Yeah, there's still no resolution to the fact that a generic plan + runtime pruning might be cheaper than a custom plan. The problem is the

Re: [HACKERS] MERGE SQL Statement for PG11

2018-04-05 Thread Jesper Pedersen
Hi Simon and Paven, On 04/04/2018 08:46 AM, Jesper Pedersen wrote: On 03/30/2018 07:10 AM, Simon Riggs wrote: No problems found, but moving proposed commit to 2 April pm There is a warning for this, as attached. Updated version due to latest refactoring. Best regards,  Jesper diff

Re: [HACKERS] MERGE SQL Statement for PG11

2018-04-05 Thread Jesper Pedersen
Hi, On 04/05/2018 07:48 AM, Simon Riggs wrote: Updated version due to latest refactoring. Thanks for your input. Removing that seems to prevent compilation. Did something change in between? Updated for non-assert build. Best regards, Jesper diff --git a/src/backend/executor/execMerge.c b

Re: [HACKERS] MERGE SQL Statement for PG11

2018-04-05 Thread Jesper Pedersen
Hi, On 04/05/2018 08:04 AM, Simon Riggs wrote: On 5 April 2018 at 12:56, Jesper Pedersen wrote: Updated for non-assert build. Thanks, pushed. Sorry to have you wait til v3 That patch was a but rushed, and cut off too much. As attached. Best regards, Jesper diff --git a/src/backend

Re: [HACKERS] Runtime Partition Pruning

2018-04-05 Thread Jesper Pedersen
Hi David, First of all: Solid patch set with good documentation. On 04/05/2018 09:41 AM, David Rowley wrote: Seems mostly fair. I'm not a fan of using the term "unpruned" though. I'll have a think. The "all" is meant in terms of what exists as subnodes. 'included_parts' / 'excluded_parts' p

Re: [HACKERS] path toward faster partition pruning

2018-04-06 Thread Jesper Pedersen
Hi Alvaro, On 04/06/2018 12:41 PM, Alvaro Herrera wrote: Here's my proposed patch. Idle thought: how about renaming the "constfalse" argument and variables to "contradictory" or maybe just "contradict"? Passes check-world. New directories, and variable rename seems like a good idea; either

Re: [HACKERS] Runtime Partition Pruning

2018-04-07 Thread Jesper Pedersen
Hi, On 04/07/2018 04:45 AM, David Rowley wrote: Ok, so I've gone and done this. PartitionPruning has become PartitionPruneState PartitionRelPruning has become PartitionPruningData I've changed pointers to PartitionPruneStates to be named prunestate, sometimes having the node prefix; as_, ma_,

Re: partitioned tables referenced by FKs

2019-03-01 Thread Jesper Pedersen
Hi Alvaro, On 2/28/19 1:28 PM, Alvaro Herrera wrote: Rebased to current master. I'll reply later to handle the other issues you point out. Applying with hunks. With 0003 using export CFLAGS="-DCOPY_PARSE_PLAN_TREES -O0 -fno-omit-frame-pointer" && CC="ccache gcc" ./configure --prefix /usr/

Re: speeding up planning with partitions

2019-03-04 Thread Jesper Pedersen
Hi Amit, Passes check-world. On 3/4/19 5:38 AM, Amit Langote wrote: See patch 0001. +* members of any appendrels we find here are added built later when s/built// See patch 0002. + grouping_planner(root, false, 0.0 /* retrieve all tuples */); Move comment out of function

Re: speeding up planning with partitions

2019-03-05 Thread Jesper Pedersen
On 3/5/19 5:24 AM, Amit Langote wrote: Attached an updated version. This incorporates fixes for both Jesper's and Imai-san's review. I haven't been able to pin down the bug (or whatever) that makes throughput go down as the partition count increases, when tested with a --enable-cassert build.

Re: speeding up planning with partitions

2019-03-07 Thread Jesper Pedersen
Hi, On 3/5/19 5:24 AM, Amit Langote wrote: Attached an updated version. Need a rebase due to 898e5e3290. Best regards, Jesper

Re: speeding up planning with partitions

2019-03-12 Thread Jesper Pedersen
Hi Amit, On 3/12/19 4:22 AM, Amit Langote wrote: I wrestled with this idea a bit and concluded that we don't have to postpone *all* of preprocess_targetlist() processing to query_planner, only the part that adds row mark "junk" Vars, because only those matter for the problem being solved. To re

Re: pg_upgrade: Pass -j down to vacuumdb

2019-03-12 Thread Jesper Pedersen
2aa3ed51aff3cbe75c Mon Sep 17 00:00:00 2001 From: jesperpedersen Date: Tue, 12 Mar 2019 16:02:27 -0400 Subject: [PATCH] Highlight that the --jobs option isn't passed down to vacuumdb. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: Jesper Pe

Re: speeding up planning with partitions

2019-03-20 Thread Jesper Pedersen
Hi, On 3/19/19 11:15 PM, Imai, Yoshikazu wrote: Here the details. [creating partitioned tables (with 1024 partitions)] drop table if exists rt; create table rt (a int, b int, c int) partition by range (a); \o /dev/null select 'create table rt' || x::text || ' partition of rt for values from ('

Re: speeding up planning with partitions

2019-03-21 Thread Jesper Pedersen
Hi Amit, On 3/19/19 8:41 PM, Amit Langote wrote: I have fixed all. Attached updated patches. The comments in the thread has been addressed, so I have put the CF entry into Ready for Committer. Best regards, Jesper

Re: partitioned tables referenced by FKs

2019-03-21 Thread Jesper Pedersen
Hi Alvaro, On 3/18/19 6:02 PM, Alvaro Herrera wrote: I spent a few hours studying this and my conclusion is the opposite of yours: we should make addFkRecurseReferencing the recursive one, and CloneFkReferencing a non-recursive caller of that. So we end up with both addFkRecurseReferenced and a

Re: speeding up planning with partitions

2019-03-22 Thread Jesper Pedersen
Hi Amit, On 3/22/19 3:39 AM, Amit Langote wrote: I took a stab at this. I think rearranging the code in make_partitionedrel_pruneinfo() slightly will take care of this. The problem is that make_partitionedrel_pruneinfo() does some work which involves allocating arrays containing nparts element

Re: partitioned tables referenced by FKs

2019-03-22 Thread Jesper Pedersen
Hi Alvaro, On 3/21/19 4:49 PM, Alvaro Herrera wrote: I think the attached is a better solution, which I'll go push shortly. I see you pushed this, plus 0002 as well. Thanks ! Best regards, Jesper

Re: partitioned tables referenced by FKs

2019-03-22 Thread Jesper Pedersen
Hi Alvaro, On 3/21/19 6:18 PM, Alvaro Herrera wrote: On 2019-Mar-21, Jesper Pedersen wrote: pgbench -M prepared -f select.sql I'm seeing 82.64% spent in GetCachedPlan(). plan_cache_mode is auto. Hmm, I can't reproduce this at all ... I don't even see GetCachedPlan in t

Re: partitioned tables referenced by FKs

2019-03-26 Thread Jesper Pedersen
Hi Amit, On 3/26/19 2:06 AM, Amit Langote wrote: Wouldn't you get the same numbers on HEAD too? IOW, I'm not sure how the patch here, which seems mostly about getting DDL in order to support foreign keys on partitioned tables, would have affected the result of this benchmark. Can you clarify y

Re: partitioned tables referenced by FKs

2019-03-27 Thread Jesper Pedersen
Hi, On 3/26/19 5:39 PM, Alvaro Herrera wrote: As I said before, I'm thinking of getting rid of the whole business of checking partitions on the referenced side of an FK at DROP time, and instead jut forbid the DROP completely if any FKs reference an ancestor of that partition. Will that allow

Re: partitioned tables referenced by FKs

2019-03-29 Thread Jesper Pedersen
Hi Alvaro, On 3/28/19 2:59 PM, Alvaro Herrera wrote: I ended up revising the dependencies that we give to the constraint in the partition -- instead of giving it partition-type dependencies, we give it an INTERNAL dependency. Now when you request to drop the partition, it says this: create tab

Re: partitioned tables referenced by FKs

2019-03-29 Thread Jesper Pedersen
Hi, On 3/29/19 11:22 AM, Alvaro Herrera wrote: On 2019-Mar-29, Jesper Pedersen wrote: Could expand a bit on the change to DEPENDENCY_INTERNAL instead of DEPENDENCY_PARTITION_PRI / DEPENDENCY_PARTITION_SEC ? The PARTITION dependencies work in a way that doesn't do what we want. Admit

Re: partitioned tables referenced by FKs

2019-03-29 Thread Jesper Pedersen
Hi, On 3/29/19 12:29 PM, Alvaro Herrera wrote: On 2019-Mar-29, Jesper Pedersen wrote: Maybe the "(" / ")" in the CASCADE description should be removed from ref/drop_table.sgml as part of this patch. I'm not sure what text you propose to remove? Just the attached.

Re: partitioned tables referenced by FKs

2019-03-29 Thread Jesper Pedersen
Hi Alvaro, On 3/28/19 2:59 PM, Alvaro Herrera wrote: I ended up revising the dependencies that we give to the constraint in the partition -- instead of giving it partition-type dependencies, we give it an INTERNAL dependency. Now when you request to drop the partition, it says this: create tab

Re: Index Skip Scan

2019-07-22 Thread Jesper Pedersen
Hi, On 7/22/19 1:44 AM, David Rowley wrote: Here are the comments I noted down during the review: cost_index: I know you've not finished here, but I think it'll need to adjust tuples_fetched somehow to account for estimate_num_groups() on the Path's unique keys. Any Eclass with an ec_has_const

Re: pg_receivewal documentation

2019-07-22 Thread Jesper Pedersen
rera, Laurenz Albe and Jesper Pedersen --- doc/src/sgml/ref/pg_receivewal.sgml | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml index e96d753955..beab6f0391 100644 --- a/doc

Re: pg_receivewal documentation

2019-07-23 Thread Jesper Pedersen
Author: Robert Haas Review-by: Michael Paquier, Álvaro Herrera, Laurenz Albe and Jesper Pedersen --- doc/src/sgml/ref/pg_receivewal.sgml | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml index 05

Re: pg_receivewal documentation

2019-07-24 Thread Jesper Pedersen
Hi, On 7/23/19 10:29 PM, Michael Paquier wrote: Thanks. Applied down to 9.6 where remote_apply has been introduced, with tweaks for 9.6 as the tool is named pg_receivexlog there. Thanks to everybody involved ! Best regards, Jesper

Re: Index Skip Scan

2019-08-02 Thread Jesper Pedersen
Author: Jesper Pedersen --- src/backend/nodes/outfuncs.c | 14 +++ src/backend/nodes/print.c | 39 +++ src/backend/optimizer/path/Makefile| 2 +- src/backend/optimizer/path/allpaths.c | 8 ++ src/backend/optimizer/path/costsize.c | 5 + src/backend/optimi

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-02 Thread Jesper Pedersen
Hi Alvaro, On 12/22/2017 10:10 AM, Alvaro Herrera wrote: I believe these are all fixed by the attached delta patch. Thanks. If you have wording suggestions for the doc changes, please send them along. Maybe we should make the default index name more explicit under the 'name' parameter a

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-02 Thread Jesper Pedersen
Hi Alvaro, On 12/29/2017 12:59 PM, Alvaro Herrera wrote: This seems to work pretty well, much to my surprise. I was a bit scared of adding a new deptype, but actually the only affected code is findDependentObjects() and the semantics of the new type is a subset of the existing DEPTYPE_INTERNAL,

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

2018-01-02 Thread Jesper Pedersen
Hi, 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 itself),

Re: [HACKERS] path toward faster partition pruning

2018-01-04 Thread Jesper Pedersen
Hi Amit, On 12/21/2017 11:25 PM, Amit Langote wrote: Thanks again. Please find attached updated patches. I have been looking at this patch from a simple hash partition point of view. -- ddl.sql -- CREATE TABLE t1 ( a integer NOT NULL, b integer NOT NULL ) PARTITION BY HASH (b); C

Re: [HACKERS] path toward faster partition pruning

2018-01-05 Thread Jesper Pedersen
Hi David, On 01/04/2018 09:21 PM, David Rowley wrote: On 5 January 2018 at 07:16, Jesper Pedersen wrote: Could you share your thoughts on 1) if the generic plan mechanics should know about the pruning and hence give a lower planner cost I think the problem here is that cached_plan_cost

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-08 Thread Jesper Pedersen
Hi Alvaro, On 01/04/2018 09:30 AM, Alvaro Herrera wrote: v11 fixes the dependency problem I mentioned in https://postgr.es/m/20171229203818.pqxf2cyl4g2wre6h@alvherre.pgsql and adds some test to cover that stuff. Thanks, make check-world passes. Maybe a warning for existing indexes on the sam

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-08 Thread Jesper Pedersen
Hi Alvaro, On 01/08/2018 03:36 PM, Alvaro Herrera wrote: Jesper Pedersen wrote: Maybe a warning for existing indexes on the same column(s), but with a different type, should be emitted during ATTACH, e.g. [detach one partition, replace index with a different one, attach partition] Of

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-19 Thread Jesper Pedersen
Hi Alvaro, On 01/18/2018 04:43 PM, Alvaro Herrera wrote: Here's a patch to add pg_dump tests. This verifies that the CREATE INDEX on parent and partition appear, as well as ALTER INDEX .. ATTACH PARTITION. While doing this, I noticed a small bug: the ALTER INDEX would not be dumped when only o

Re: unique indexes on partitioned tables

2018-01-25 Thread Jesper Pedersen
Hi Alvaro, On 01/22/2018 05:55 PM, Alvaro Herrera wrote: Alvaro Herrera wrote: Version 4 of this patch, rebased on today's master. Passes make check-world. Maybe add a test case to indexing.sql that highlights that hash indexes doesn't support UNIQUE; although not unique to partitioned i

Re: [HACKERS] path toward faster partition pruning

2018-01-29 Thread Jesper Pedersen
Hi Amit, On 01/26/2018 04:17 AM, Amit Langote wrote: I made a few of those myself in the updated patches. Thanks a lot again for your work on this. This needs a rebase. Best regards, Jesper

Re: [HACKERS] path toward faster partition pruning

2018-01-30 Thread Jesper Pedersen
Hi Amit, On 01/29/2018 07:57 PM, Amit Langote wrote: This needs a rebase. AFAICS, v22 cleanly applies to HEAD (c12693d8f3 [1]), compiles, and make check passes. It was a rebase error; I should have checked against a clean master. Sorry for the noise. Best regards, Jesper

Application name for pg_basebackup and friends

2019-10-31 Thread Jesper Pedersen
dd an -a / --appname command line switch to control the application_name property. Author: Jesper Pedersen --- doc/src/sgml/ref/pg_basebackup.sgml| 11 +++ doc/src/sgml/ref/pg_receivewal.sgml| 11 +++ doc/src/sgml/ref/pg_recvlogical.sgml | 11 +++ src/bin/pg_ba

Re: Application name for pg_basebackup and friends

2019-11-07 Thread Jesper Pedersen
On 11/7/19 1:51 AM, Michael Paquier wrote: I don't think we need a new comand line switch for it. +1. Please note that I have marked this patch as rejected in the CF app, per the arguments upthread. Ok, agreed. Thanks for the feedback ! Best regards, Jesper

Re: Index Skip Scan

2019-11-11 Thread Jesper Pedersen
for your patch ! v29 using UniqueKey attached. Best regards, Jesper >From 4e27a04702002d06f60468f8a9033d2ac2e12d8a Mon Sep 17 00:00:00 2001 From: jesperpedersen Date: Mon, 11 Nov 2019 08:49:43 -0500 Subject: [PATCH 1/2] Unique key Design by David Rowley. Author: Jesper Pedersen --- src

Re: Index Skip Scan

2019-11-15 Thread Jesper Pedersen
Hi, On 11/11/19 1:24 PM, Jesper Pedersen wrote: v29 using UniqueKey attached. Just a small update to the UniqueKey patch to hopefully keep CFbot happy. Feedback, especially on the planner changes, would be greatly appreciated. Best regards,  Jesper >F

Re: Index Skip Scan

2020-01-20 Thread Jesper Pedersen
find the updated patches attached that Dmitry and I made. Thanks again ! Best regards, Jesper >From 3c540c93307e6cbe792b31b12d4ecb025cd6b327 Mon Sep 17 00:00:00 2001 From: jesperpedersen Date: Fri, 15 Nov 2019 09:46:05 -0500 Subject: [PATCH 1/2] Unique key Design by David Rowley. Author: Jesper Pedersen --- src/backe

Re: Index Skip Scan

2020-01-21 Thread Jesper Pedersen
Hi Peter, Thanks for your feedback; Dmitry has followed-up with some additional questions. On 1/20/20 8:05 PM, Peter Geoghegan wrote: This is definitely not okay. I suggest that you find a way to add assertions to code like _bt_readpage() that verify that we do in fact have the buffer conte

Re: partitioned tables referenced by FKs

2019-04-02 Thread Jesper Pedersen
Hi, On 4/1/19 4:03 PM, Alvaro Herrera wrote: I'm satisfied with this patch now, so I intend to push early tomorrow. Passes check-world, and my tests. Best regards, Jesper

Re: partitioned tables referenced by FKs

2019-04-03 Thread Jesper Pedersen
On 4/3/19 1:52 PM, Alvaro Herrera wrote: Pushed, many thanks Amit and Jesper for reviewing. Thank you for working on this feature. Best regards, Jesper

COLLATE: Hash partition vs UPDATE

2019-04-08 Thread Jesper Pedersen
Hi, The following case -- test.sql -- CREATE TABLE test (a text PRIMARY KEY, b text) PARTITION BY HASH (a); CREATE TABLE test_p0 PARTITION OF test FOR VALUES WITH (MODULUS 2, REMAINDER 0); CREATE TABLE test_p1 PARTITION OF test FOR VALUES WITH (MODULUS 2, REMAINDER 1); -- CREATE INDEX idx_tes

Re: COLLATE: Hash partition vs UPDATE

2019-04-09 Thread Jesper Pedersen
Hi Amit, On 4/8/19 11:18 PM, Amit Langote wrote: As of this commit, hashing functions hashtext() and hashtextextended() require a valid collation to be passed in. ISTM, satisfies_hash_partition() that's called by hash partition constraint checking should have been changed to use FunctionCall2Co

Re: New committer: David Rowley

2019-05-31 Thread Jesper Pedersen
On 5/30/19 11:39 AM, Magnus Hagander wrote: Congratulations to David, may the buildfarm be gentle to him, and his first revert far away! Congrats ! Best regards, Jesper

Re: Index Skip Scan

2019-06-03 Thread Jesper Pedersen
Hi Floris, On 6/1/19 12:10 AM, Floris Van Nee wrote: Given a table definition of (market text, feedcode text, updated_at timestamptz, value float8) and an index on (market, feedcode, updated_at desc) (note that this table slightly deviates from what I described in my previous mail) and fillin

Re: Index Skip Scan

2019-06-03 Thread Jesper Pedersen
Hi Rafia, On 6/1/19 6:03 AM, Rafia Sabih wrote: Here is my repeatable test case, create table t (market text, feedcode text, updated_at timestamptz, value float8) ; create index on t (market, feedcode, updated_at desc); insert into t values('TEST', 'abcdef', (select timestamp '2019-01-10 20:00:

Re: partition tree inspection functions

2018-10-05 Thread Jesper Pedersen
On 10/5/18 2:52 AM, Michael Paquier wrote: On Fri, Oct 05, 2018 at 03:31:49PM +0900, Amit Langote wrote: Thanks for making those changes yourself and posting the new version. Can you check the attached diff file for some updates to the documentation part of the patch. Other parts look fine.

Re: Index Skip Scan

2018-10-09 Thread Jesper Pedersen
Hi Pavel, On 10/9/18 9:42 AM, Pavel Stehule wrote: I tested last patch and I have some notes: 1. postgres=# explain select distinct a1 from foo; +---+ |QUERY PLAN

Re: PostgreSQL vs SQL/XML Standards

2018-10-25 Thread Jesper Pedersen
On 10/25/18 2:33 PM, Andrew Dunstan wrote: Yeah, very good point. xqilla/xerces-C appears to be widely available (Centos and ubuntu, at least). xqilla/xerces-c are in the Fedora/RHEL repo too. Best regards, Jesper

Re: pread() and pwrite()

2018-11-02 Thread Jesper Pedersen
Hi Thomas, On 10/9/18 4:56 PM, Thomas Munro wrote: Thanks, much nicer. Rebased. This still applies, and passes make check-world. I wonder what the commit policy is on this, if the Windows part isn't included. I read Heikki's comment [1] as it would be ok to commit benefiting all platforms

Re: pread() and pwrite()

2018-11-05 Thread Jesper Pedersen
Hi Thomas, On 11/5/18 7:08 AM, Thomas Munro wrote: On Sun, Nov 4, 2018 at 12:03 AM Thomas Munro wrote: On Sat, Nov 3, 2018 at 2:07 AM Jesper Pedersen wrote: This still applies, and passes make check-world. I wonder what the commit policy is on this, if the Windows part isn't includ

Re: pread() and pwrite()

2018-11-06 Thread Jesper Pedersen
Hi, On 11/5/18 9:10 PM, Thomas Munro wrote: On Tue, Nov 6, 2018 at 5:07 AM Alvaro Herrera wrote: Please remove Tell from line 18 in fd.h. To Küssnacht with him! Thanks, done. But what is this arrow sticking through my Mac laptop's screen...? On Tue, Nov 6, 2018 at 6:23 AM Tom Lane wrote:

Re: Speeding up INSERTs and UPDATEs to partitioned tables

2018-11-06 Thread Jesper Pedersen
On 11/4/18 5:07 AM, David Rowley wrote: I've attached v13 which hopefully addresses these. I ran a test against the INSERT case using a 64 hash partition. Non-partitioned table: ~73k TPS Master: ~25k TPS 0001: ~26k TPS 0001 + 0002: ~68k TPS The profile of 0001 shows that almost all of ExecS

Re: pread() and pwrite()

2018-11-07 Thread Jesper Pedersen
Hi Thomas, On 11/6/18 4:04 PM, Thomas Munro wrote: On Wed, Nov 7, 2018 at 4:42 AM Jesper Pedersen Thanks! Pushed. I'll keep an eye on the build farm to see if anything breaks on Cygwin or some other frankenOS. There is [1] on Andres' skink setup. Looking.

valgrind on initdb

2018-11-07 Thread Jesper Pedersen
Hi, While looking at [1] (included in 23315.log) there are other warnings as well. I ran with valgrind --leak-check=full --show-leak-kinds=all --gen-suppressions=all --suppressions=/path/to/postgresql/src/tools/valgrind.supp --time-stamp=yes --log-file=/tmp/valgrind/%p.log --trace-children=

Re: valgrind on initdb

2018-11-07 Thread Jesper Pedersen
On 11/7/18 8:08 AM, Jesper Pedersen wrote: While looking at [1] (included in 23315.log) there are other warnings as well. On 77366d90. Best regards,  Jesper

Re: pread() and pwrite()

2018-11-07 Thread Jesper Pedersen
Hi, On 11/7/18 7:26 AM, Jesper Pedersen wrote: On 11/6/18 4:04 PM, Thomas Munro wrote: On Wed, Nov 7, 2018 at 4:42 AM Jesper Pedersen Thanks!  Pushed.  I'll keep an eye on the build farm to see if anything breaks on Cygwin or some other frankenOS. There is [1] on Andres' s

Re: pread() and pwrite()

2018-11-07 Thread Jesper Pedersen
Hi Tom, On 11/7/18 9:30 AM, Tom Lane wrote: I'm confused by this. Surely the pwrite-based code is writing exactly the same data as before. Do we have to conclude that valgrind is complaining about passing uninitialized data to pwrite() when it did not complain about exactly the same thing for

Re: Speeding up INSERTs and UPDATEs to partitioned tables

2018-11-07 Thread Jesper Pedersen
Hi David, On 11/7/18 6:46 AM, David Rowley wrote: I've attached a patch which does this. It adds a new struct named PartitionRoutingInfo into ResultRelInfo and pulls 3 of the 4 arrays out of PartitionTupleRouting. There are fields for each of what these arrays used to store inside the Partition

Re: speeding up planning with partitions

2018-11-09 Thread Jesper Pedersen
Hi Amit, On 11/9/18 3:55 AM, Amit Langote wrote: And here are patches structured that way. I've addressed some of the comments posted by Imai-san upthread. Also, since David's patch to postpone PlannerInfo.total_pages calculation went into the tree earlier this week, it's no longer included in

Re: Speeding up INSERTs and UPDATEs to partitioned tables

2018-11-13 Thread Jesper Pedersen
Hi, On 11/12/18 6:17 PM, David Rowley wrote: On 9 November 2018 at 19:18, Amit Langote wrote: I have a comment regarding how you chose to make PartitionTupleRouting private. Using the v14_to_v15 diff, I could quickly see that there are many diffs changing PartitionTupleRouting to struct Parti

Re: Index Skip Scan

2018-11-16 Thread Jesper Pedersen
Hi, On 11/15/18 6:41 AM, Alexander Kuzmenkov wrote: But having this logic inside _bt_next means that it will make a non-skip index only scan a bit slower, am I right? Correct. Well, it depends on how the skip scan is implemented. We don't have to make normal scans slower, because skip scan

Re: JIT compiling with LLVM v10.1

2018-02-19 Thread Jesper Pedersen
Hi, On 02/14/2018 01:17 PM, Andres Freund wrote: On 2018-02-07 06:54:05 -0800, Andres Freund wrote: I've pushed v10.0. The big (and pretty painful to make) change is that now all the LLVM specific code lives in src/backend/jit/llvm, which is built as a shared library which is loaded on demand.

Re: [HACKERS] Runtime Partition Pruning

2018-02-22 Thread Jesper Pedersen
Hi David, On 02/21/2018 04:06 AM, David Rowley wrote: I've attached v11 of the patch. Are UPDATE and DELETE suppose to be supported ? With -- test.sql -- CREATE TABLE test (a integer NOT NULL, b integer) PARTITION BY HASH(a); CREATE TABLE test_p00 PARTITION OF test FOR VALUES WITH (MODULUS

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

2018-03-01 Thread Jesper Pedersen
Hi, On 01/02/2018 11:09 AM, Jesper Pedersen wrote: Oh... there were stupid error in previos file. Attached fixed version. As the patch still applies, make check-world passes and I believe that Yura has provided feedback for Andres' comments I'll leave this entry in "Read

Re: [HACKERS] Runtime Partition Pruning

2018-03-01 Thread Jesper Pedersen
Hi David, On 03/01/2018 08:04 AM, David Rowley wrote: I've also split the patch out a bit more into logical parts in the hope it makes things easier to review. A small typo in 0001: + * leftmost_ons_pos[x] gives the bit number (0-7) of the leftmost one bit in a ..."_one_"... 0004 fails "

Re: [HACKERS] Runtime Partition Pruning

2018-03-09 Thread Jesper Pedersen
Hi David, On 03/01/2018 08:29 PM, David Rowley wrote: 0004 fails "make check-world" due to pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 670; 1259 49954 TABLE boolp_f jpedersen pg_restore: [archiver (db)] could not execute query: ERROR:

Re: [HACKERS] path toward faster partition pruning

2018-03-13 Thread Jesper Pedersen
Hi Amit, On 03/13/2018 07:37 AM, Amit Langote wrote: I will continue working on improving the comments / cleaning things up and post a revised version soon, but until then please look at the attached. Passes check-world. Some minor comments: 0001: Ok 0002: Ok 0003: * Trailing white space

EXPLAIN of Parallel Append

2018-03-14 Thread Jesper Pedersen
Hi, Given -- test.sql -- CREATE TABLE t1 ( a integer NOT NULL, b integer NOT NULL ) PARTITION BY HASH (b); CREATE TABLE t1_p00 PARTITION OF t1 FOR VALUES WITH (MODULUS 4, REMAINDER 0); CREATE TABLE t1_p01 PARTITION OF t1 FOR VALUES WITH (MODULUS 4, REMAINDER 1); CREATE TABLE t1_p02

Re: PostgreSQL 17 Release Management Team & Feature Freeze

2024-04-08 Thread Jesper Pedersen
Hi, On 4/8/24 14:15, Tomas Vondra wrote: I think we need to fix & improve that - not to rework/push it at the very end. This is going to be very extreme... Either a patch is ready for merge or it isn't - when 2 or more Committers agree on it then it can be merged - the policy have to be di

Re: GSOC2023

2023-01-04 Thread Jesper Pedersen
Hi, On 12/28/22 21:10, diaa wrote: *Hi Sir.* I’m Computer engineering student from Egypt Interested in Database Management Systems. Can I know details about the list of ideas for 2023 projects or how to prepare myself to be ready with the required knowledge? Thanks for your interest in GSoC 2

Re: New committers: Nathan Bossart, Amit Langote, Masahiko Sawada

2023-04-24 Thread Jesper Pedersen
On 4/20/23 13:40, Tom Lane wrote: The Core Team would like to extend our congratulations to Nathan Bossart, Amit Langote, and Masahiko Sawada, who have accepted invitations to become our newest Postgres committers. Please join me in wishing them much success and few reverts. Huge congrats !

Re: MDAM techniques and Index Skip Scan patch

2022-03-24 Thread Jesper Pedersen
On 3/23/22 18:22, Dmitry Dolgov wrote: The CF item could be set to RwF, what would you say, Jesper? We want to thank the community for the feedback that we have received over the years for this feature. Hopefully a future implementation can use Tom's suggestions to get closer to a committab

Re: Index Skip Scan (new UniqueKeys)

2022-03-24 Thread Jesper Pedersen
On 6/9/20 06:22, Dmitry Dolgov wrote: Here is a new version of index skip scan patch, based on v8 patch for UniqueKeys implementation from [1]. I want to start a new thread to simplify navigation, hopefully I didn't forget anyone who actively participated in the discussion. This CommitFest ent

Re: GSoC: pgmoneta: Write-Ahead Log (WAL) infrastructure (2022)

2022-04-01 Thread Jesper Pedersen
Hi Jinlang, On 4/1/22 12:39, Jinlang Wang wrote: To whom it may concern: Here is my proposal (https://docs.google.com/document/d/1KKKDU6iP0GOkAMSdGRyxFJRgW964JFVROnpKkbzWyNw/edit?usp=sharing )

Re: GSoC: pgmoneta, storage API

2022-04-04 Thread Jesper Pedersen
Hi Mariam, On 4/4/22 09:16, Mariam Fahmy wrote: Hope you’re having a good day! I am Mariam Fahmy, A senior computer and systems engineering student at faculty of engineering, AinShams university. I am interested in working with pgmoneta during GSoC 2022. Here is a link to the draft proposal fo

Re: GSoC 2022: Proposal of pgmoneta on-disk encryption

2022-04-13 Thread Jesper Pedersen
Hi Jichen, On 4/13/22 10:40, Solo Kyo wrote: To whom it may concern: Hi, I am Jichen Xu. I am a first year master computer science student at Waseda University. Here is a link to my proposal: https://docs.google.com/document/d/1vdgPY5wvhjhrX9aSUw5mTDOnXwEQNcr4cxfzuSHMWlg Looking forward to work

Re: GSoC: pgmoneta: Write-Ahead Log (WAL) infrastructure (2022)

2022-04-16 Thread Jesper Pedersen
Hi, On 4/16/22 13:06, dl x wrote: My name is Donglin Xie, a MSc. student at Zhejiang University, in China. I am interested in the project *pgmoneta: Write-Ahead Log (WAL) infrastructure.* The proposal is attached to this email. Looking forward to the suggestions! Thanks for your proposal to

Re: GsoC: pgexporter: Custom file

2022-04-17 Thread Jesper Pedersen
Hi, On 4/17/22 04:43, dl x wrote: My name is Donglin Xie, a MSc. student at Zhejiang University, in China. I am interested in the project *pgexporter: Custom_file.* The proposal is attached to this email. Looking forward to the suggestions! Thanks for your proposal to Google Summer of Code

  1   2   >