Re: Comments on Custom RMGRs

2024-03-29 Thread Danil Anisimow
On Fri, Mar 22, 2024 at 2:02 AM Jeff Davis wrote: > On Thu, 2024-03-21 at 19:47 +0700, Danil Anisimow wrote: > > [pgss_001.v1.patch] adds a custom resource manager to the > > pg_stat_statements extension. > > Did you consider moving the logic for loading the initial cont

Re: Comments on Custom RMGRs

2024-03-21 Thread Danil Anisimow
On Fri, Mar 1, 2024 at 2:06 AM Jeff Davis wrote: > Added to March CF. > > I don't have an immediate use case in mind for this, so please drive > that part of the discussion. I can't promise this for 17, but if the > patch is simple enough and a quick consensus develops, then it's > possible.

Re: Comments on Custom RMGRs

2024-02-29 Thread Danil Anisimow
On Tue, Feb 27, 2024 at 2:56 AM Jeff Davis wrote: > Let's pick this discussion back up, then. Where should the hook go? > Does it need to be broken into phases like resource owners? What > guidance can we provide to extension authors to use it correctly? > > Simon's right that these things don't

Re: Comments on Custom RMGRs

2024-02-26 Thread Danil Anisimow
Hi, The checkpoint hook looks very useful, especially for extensions that have their own storage, like pg_stat_statements. For example, we can keep work data in shared memory and save it only during checkpoints. When recovering, we need to read all the data from the disk and then repeat the

Estimation rows of FULL JOIN

2023-12-20 Thread Danil Anisimow
Hi. In some cases, the planner underestimates FULL JOIN. Example: postgres=# CREATE TABLE t AS SELECT x AS a, null AS b FROM generate_series(1, 10) x; postgres=# ANALYZE; postgres=# EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t t1 FULL JOIN t t2 ON t1.b = t2.b;

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2022-12-09 Thread Danil Anisimow
Hi! I have looked at your patch and have a few questions. 110: static bool SafeCopying(CopyFromState cstate, ExprContext *econtext, 111: TupleTableSlot *myslot); --- 636: bool 637: SafeCopying(CopyFromState cstate, ExprContext *econtext, TupleTableSlot *myslot) Why is there no static keyword in