Re: CSN snapshots in hot standby

2024-04-04 Thread Kirill Reshke
Hi, On Thu, 4 Apr 2024 at 22:21, Heikki Linnakangas wrote: > You cannot run queries on a Hot Standby server until the standby has > seen a running-xacts record. Furthermore if the subxids cache had > overflowed, you also need to wait for those transactions to finish. That > is usually not a prob

Re: Add last_commit_lsn to pg_stat_database

2024-04-08 Thread Kirill Reshke
Hi James, There are some review in the thread that need to be addressed. it seems that we need to mark this entry "Waiting on Author" and move to the next CF [0]. Thanks [0] https://commitfest.postgresql.org/47/4355/ On Sat, 10 Jun 2023 at 05:27, James Coleman wrote: > I've previously noted i

Re: Allow non-superuser to cancel superuser tasks.

2024-04-09 Thread Kirill Reshke
Hi, thanks for looking into this. On Tue, 9 Apr 2024 at 08:53, Michael Paquier wrote: > On Mon, Apr 08, 2024 at 05:42:05PM +, Leung, Anthony wrote: > > Are you suggesting that we check if the backend is B_AUTOVAC in > > pg_cancel/ terminate_backend? That seems a bit unclean to me since > > p

Re: [PoC/RFC] Multiple passwords, interval expirations

2024-04-10 Thread Kirill Reshke
Hi! I'm interested in this feature presence in the PostgreSQL core. Will try to provide valuable review/comments/suggestions and other help. On Tue, 10 Oct 2023 at 16:17, Gurjeet Singh wrote: > > > On Mon, Oct 9, 2023 at 2:31 AM Gurjeet Singh wrote: > > > > > > Next steps: > > > - Break the pat

Re: psql: Greatly speed up "\d tablename" when not using regexes

2024-04-10 Thread Kirill Reshke
Hi > Regex matching is obviously unnecessary when we're looking for an exact > match. This checks for this (common) case and starts using plain > equality in that case. +1 > + appendPQExpBuffer(buf, "(%s OPERATOR(pg_catalog.=) ", namevar); > + appendStringLiteralConn(buf, &namebuf.data[2], conn

Re: psql: Greatly speed up "\d tablename" when not using regexes

2024-04-10 Thread Kirill Reshke
On Wed, 10 Apr 2024, 23:37 Jelte Fennema-Nio, wrote: > On Wed, 10 Apr 2024 at 20:21, Kirill Reshke > wrote: > > Do we need to force Collaction here like in other branches? > > if (PQserverVersion(conn) >= 12) > >appendPQExpBufferStr(buf, " COLLATE pg_cat

Allow non-superuser to cancel superuser tasks.

2024-02-25 Thread Kirill Reshke
Hi hackers! In our Cloud we have a patch, which allows non-superuser role ('mdb_admin') to do some superuser things. In particular, we have a patch that allows mdb admin to cancel the autovacuum process and some other processes (processes with application_name = 'MDB'), see the attachment. This is

Re: Allow non-superuser to cancel superuser tasks.

2024-02-26 Thread Kirill Reshke
On Mon, 26 Feb 2024 at 20:10, Nathan Bossart wrote: > On Mon, Feb 26, 2024 at 12:38:40PM +0500, Kirill Reshke wrote: > > I see 2 possible ways to implement this. The first one is to have hool in > > pg_signal_backend, and define a hook in extension which can do the thing. > &

Re: Allow non-superuser to cancel superuser tasks.

2024-02-27 Thread Kirill Reshke
On Tue, 27 Feb 2024 at 01:22, Kirill Reshke wrote: > > > On Mon, 26 Feb 2024 at 20:10, Nathan Bossart > wrote: > >> On Mon, Feb 26, 2024 at 12:38:40PM +0500, Kirill Reshke wrote: >> > I see 2 possible ways to implement this. The first one is to have hool >> i

Annoying corruption in PostgreSQL.

2023-10-27 Thread Kirill Reshke
Hi hackers! We run a large amount of PostgreSQL clusters in our production. They differ by versions (we have 11-16 pg), load, amount of data, schema, etc. From time to time, postgresql corruption happens. It says ERROR,XX001,"missing chunk number 0 for toast value 18767319 in pg_toast_2619",,"

Fwd: Annoying corruption in PostgreSQL.

2023-10-27 Thread Kirill Reshke
Sorry, seems that i replied only to Tomas, so forwarding message. -- Forwarded message - From: Kirill Reshke Date: Sat, 28 Oct 2023 at 02:06 Subject: Re: Annoying corruption in PostgreSQL. To: Tomas Vondra Hi Tomas! Thanks for the explanation! 1) 11 to 15. This week there

Fwd: Extensible storage manager API - SMGR hook Redux

2023-12-04 Thread Kirill Reshke
Sorry for double-posting, I accidentally replied to Matthias, not the mailing list :( -- Forwarded message - From: Kirill Reshke Date: Mon, 4 Dec 2023 at 19:46 Subject: Re: Extensible storage manager API - SMGR hook Redux To: Matthias van de Meent Hi! On Fri, 30 Jun 2023 at

Re: Extensible storage manager API - SMGR hook Redux

2023-12-04 Thread Kirill Reshke
On Mon, 4 Dec 2023 at 22:21, Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Mon, 4 Dec 2023 at 17:51, Kirill Reshke wrote: > > > > So, 0002 patch uses the `get_tablespace` function, which searches > Catalog to tablespace SMGR id. I wonder how `smgr_

Re: Slow standby snapshot

2021-05-20 Thread Kirill Reshke
sorry, forgot to add a patch to the letter чт, 20 мая 2021 г. в 13:52, Кирилл Решке : > Hi, > I recently ran into a problem in one of our production postgresql cluster. > I had noticed lock contention on procarray lock on standby, which causes > WAL replay lag growth. > To reproduce this, you c

Re: Add sub-transaction overflow status in pg_stat_activity

2023-02-08 Thread Kirill Reshke
On Tue, 20 Dec 2022 at 09:23, Dilip Kumar wrote: > > On Tue, Dec 20, 2022 at 2:32 AM Robert Haas wrote: > > > > On Mon, Dec 19, 2022 at 3:48 PM Ted Yu wrote: > > > It seems the comment for `backend_subxact_overflowed` missed a word. > > > > > > Please see the patch. > > > > Committed this fix, t

pg_init_privs corruption.

2023-02-17 Thread Kirill Reshke
Hi hackers! Recently we faced a problem with one of our production clusters. Problem was with pg_upgrade, the reason was an invalid pg_dump of cluster schema. in pg_dump sql there was strange records like REVOKE SELECT,INSERT,DELETE,UPDATE ON TABLE *relation* FROM "144841"; but there is no role

Re: Extensible storage manager API - smgr hooks

2022-06-17 Thread Kirill Reshke
Hello Yura and Anastasia. I have tried to implement per-relation SMGR approach, and faced with a serious problem with redo. So, to implement per-relation SMGR feature i have tried to do things similar to custom table AM apporach: that is, we can define our custom SMGR in an extention (which defin

Use fadvise in wal replay

2022-06-21 Thread Kirill Reshke
Hi hackers! Recently we faced a problem with one of our production clusters. We use a cascade replication setup in this cluster, that is: master, standby (r1), and cascade standby (r2). From time to time, the replication lag on r1 used to grow, while on r2 it did not. Analysys showed that r1 start

Re: Commitfest manager for July 2024

2024-07-01 Thread Kirill Reshke
> Postgres 17 18

Re: Allow non-superuser to cancel superuser tasks.

2024-07-09 Thread Kirill Reshke
Hi On Tue, 9 Jul 2024 at 23:13, Nathan Bossart wrote: > > I've committed 0001. It looks like 0002 failed CI testing [0], but I > haven't investigated why. > > [0] https://cirrus-ci.com/task/5668467599212544 > > -- > nathan The problem is the error message has been changed. # DETAIL: Only role

Re: Allow non-superuser to cancel superuser tasks.

2024-07-09 Thread Kirill Reshke
> The script has two tests, and the CI is failing for the second test > where we expect the signal to be processed: > [12:48:23.370] # Failed test 'autovacuum worker signaled with > pg_signal_autovacuum_worker granted' > [12:48:23.370] # at t/006_signal_autovacuum.pl line 90. > -- > Michael T

Re: Allow non-superuser to cancel superuser tasks.

2024-07-10 Thread Kirill Reshke
Hi, that's for digging into this. Turns out I completely missed one of your emails today morning. On Wed, 10 Jul 2024 at 10:15, Michael Paquier wrote: > And then the timestamp of the tests: > [12:48:23.277](0.058s) not ok 2 - autovacuum worker signaled with > pg_signal_autovacuum_worker granted >

Re: Allow non-superuser to cancel superuser tasks.

2024-04-11 Thread Kirill Reshke
Posting updated version of this patch with comments above addressed. 1) pg_signal_autovacuum -> pg_signal_autovacuum_worker, as there seems to be no objections to that. 2) There are comments on how to write if statement: > In core, do_autovacuum() is only called in a process without > a role spe

TerminateOtherDBBackends code comments inconsistency.

2024-04-11 Thread Kirill Reshke
Hi hackers! While working on [0] i have noticed this comment in TerminateOtherDBBackends function: /* * Check whether we have the necessary rights to terminate other * sessions. We don't terminate any session until we ensure that we * have rights on all the sessions to be terminated. These checks

Re: Allow non-superuser to cancel superuser tasks.

2024-04-11 Thread Kirill Reshke
On Thu, 11 Apr 2024 at 19:07, Nathan Bossart wrote: > > On Thu, Apr 11, 2024 at 04:55:59PM +0500, Kirill Reshke wrote: > > Posting updated version of this patch with comments above addressed. > > I look for a commitfest entry for this one, but couldn't find it. Would >

Re: Allow non-superuser to cancel superuser tasks.

2024-04-12 Thread Kirill Reshke
On Thu, 11 Apr 2024 at 16:55, Kirill Reshke wrote: > 7) > > > +# Copyright (c) 2022-2024, PostgreSQL Global Development Group > > [...] > > +# Copyright (c) 2024-2024, PostgreSQL Global Development Group > > > These need to be cleaned up. > > > +# Makefi

Re: Index AM API cleanup

2024-08-21 Thread Kirill Reshke
> Internal development versions 1..16 not included. Andrew, Peter, and Alex > have all provided reviews internally and are cc'd here. Patch by me. Here > is v17 for the community: > > > > — > Mark Dilger > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company Hi! Why is the patch attached as .tar.bz2? Usually raw patches are sent here... -- Best regards, Kirill Reshke

Re: Vacuum statistics

2024-08-21 Thread Kirill Reshke
postgr.es/m/CACJufxHb_YGCp=pvh6dzcpk9yml+sueffpearbx2lzxzvah...@mail.gmail.com > [2] https://postgr.es/m/78394e29-a900-4af4-b5ce-d6eb2d263...@postgrespro.ru Hi, your points are valid. Regarding 0003, I also wanted to object database naming in a regression test during my review but for some reason didn't.Now, as soon as we already need to change it, I suggest we also change regression_statistic_vacuum_db1 to something less generic. Maybe regression_statistic_vacuum_db_unaffected. -- Best regards, Kirill Reshke

Better documentation for RIR term?

2024-08-21 Thread Kirill Reshke
ditional and where only one rule can exist on each * relation). * ``` Maybe I'm really bad at searching things and nobody before had problems understanding what RIR stands for. If not, should we enhance documentation in some way? If yes, what is the proper place? -- Best regards, Kirill Reshke

Re: optimize hashjoin

2024-08-22 Thread Kirill Reshke
t; Only parallel HashJoin speed up to ~2x(all data cached in memory), > > not full query, include non-parallel HashJoin. > > non-parallel HashJoin only when batchs large then one will speed up, > > because this patch only optimize for read batchs tuples to memory. > > Hi likely/unlikely usage can be justified via benchmark. Parallel HashJoin speed up still also can be verified via benchmark. Either benchmark script or benchmark result, and it is better to provide both. -- Best regards, Kirill Reshke

Avoid logging enormously large messages

2024-08-23 Thread Kirill Reshke
om/pg-sharding/pg_log_trunc/blob/master/pg_log_trunc.c#L43 -- Best regards, Kirill Reshke

[BUG?] WAL file archive leads to crash during startup

2024-08-28 Thread Kirill Reshke
hed, then redo is not needed. === Proposed fix Is as simply as attached. WFM, but this is probably not a correct way to fix this. -- Best regards, Kirill Reshke v1-0001-Fix.patch Description: Binary data

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-07-21 Thread Kirill Reshke
Hi! I'm interested in the vacuum concurrently feature being inside the core, so will try to review patch set and give valuable feedback. For now, just a few little thoughts.. > The first version is attached. The actual feature is in 0003. 0004 is probably > not necessary now, but I haven't realiz

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-07-22 Thread Kirill Reshke
> Also, we obviously need more tests on this. Both tap-test and > regression tests I suppose. The one simple test to this patch can be done this way: 1) create test relation (call it vac_conc_r1 for example) and fill it with dead tuples (insert + update or insert + delete) 2) create injection poi

Re: Add new COPY option REJECT_LIMIT

2024-07-22 Thread Kirill Reshke
Hi! Nice feature. Few comments: > + When a positive integer value is specified, COPY > limits > + the maximum tolerable number of errors while converting a column's > input > + value into its data type. If nothing is specified, then the maximum tolerable number of errors is one,

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-07-25 Thread Kirill Reshke
Hi! On Tue, 30 Jan 2024 at 15:31, Alvaro Herrera wrote: > FWIW a newer, more modern and more trustworthy alternative to pg_repack > is pg_squeeze, which I discovered almost by random chance, and soon > discovered I liked it much more. Can you please clarify this a bit more? What is the exact re

Re: Remove duplicate table scan in logical apply worker and code refactoring

2024-07-25 Thread Kirill Reshke
Hi! > When reviewing the code in logical/worker.c, I noticed that when applying a > cross-partition update action, it scans the old partition twice. Nice catch! > -/* > - * Workhorse for apply_handle_update() > - * relinfo is for the relation we're actually updating in > - * (could be a child p

Re: Incremental View Maintenance, take 2

2024-07-27 Thread Kirill Reshke
Hi! Cloudberry DB (Greenplum fork) uses IMMV feature for AQUMV (auto query use matview) feature, so i got interested in how it is implemented. On Thu, 11 Jul 2024 at 09:24, Yugo NAGATA wrote: > > I updated the patch to bump up the version numbers in psql and pg_dump codes > from 17 to 18. Few su

Fix smgrtruncate code comment.

2024-07-29 Thread Kirill Reshke
Today I was busy rebasing my Greenplum-related Extendable SMGR patches on Cloudberry, and I faced some conflicts. While resolving them I noticed code & comments inconsistency in smgr.c in smgrtruncate function, which tracks down to c5315f4f44843c20ada876fdb0d0828795dfbdf5. In this commit, smgr_fsm_

Re: Incremental View Maintenance, take 2

2024-07-29 Thread Kirill Reshke
On Sat, 27 Jul 2024 at 13:26, Kirill Reshke wrote: > > Hi! > Cloudberry DB (Greenplum fork) uses IMMV feature for AQUMV (auto query > use matview) feature, so i got interested in how it is implemented. > > On Thu, 11 Jul 2024 at 09:24, Yugo NAGATA wrote: > > > >

Re: COPY FROM crash

2024-07-29 Thread Kirill Reshke
Hi! On Tue, 30 Jul 2024 at 08:52, Zhang Mingli wrote: > > Hi, all > > I got a crash when copy partition tables with mass data in Cloudberry > DB[0](based on Postgres14.4, Greenplum 7). > > I have a test on Postgres and it has the similar issue(different places but > same function). Just to be

Re: Incremental View Maintenance, take 2

2024-07-30 Thread Kirill Reshke
On Tue, 30 Jul 2024 at 03:32, Kirill Reshke wrote: > > On Sat, 27 Jul 2024 at 13:26, Kirill Reshke wrote: > > > > Hi! > > Cloudberry DB (Greenplum fork) uses IMMV feature for AQUMV (auto query > > use matview) feature, so i got interested in how it is implemented.

Lack of possibility to specify CTAS TAM

2024-07-31 Thread Kirill Reshke
I have noticed $subj while working with other unrelated patches. The question is, why there is no CREATE TABLE AS USING (some_access_method)? This feature looks straightforward, and lack of it is a bit of inconsistency from my point of view. Maybe there are some unobvious caveats with implemen

Re: Lack of possibility to specify CTAS TAM

2024-07-31 Thread Kirill Reshke
On Wed, 31 Jul 2024, 12:12 Andrey M. Borodin, wrote: > > Currently we do not have so many TAMs > Currently we do not have so many TAM in core. Outside core there is actually a quite a number of projects doing TAMs. Orioledb is one example. >

Re: Lack of possibility to specify CTAS TAM

2024-07-31 Thread Kirill Reshke
On Wed, 31 Jul 2024 at 12:15, David G. Johnston wrote: > > On Wednesday, July 31, 2024, Kirill Reshke wrote: >> >> I have noticed $subj while working with other unrelated patches. >> The question is, why there is no CREATE TABLE AS USING >> (some_acces

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-01 Thread Kirill Reshke
On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > Relatedly, if we can EXPLAIN a CREATE MATERIALIZED VIEW, perhaps we > should be able to EXPLAIN a REFRESH MATERIALIZED VIEW, too? Sure > Comments? Seems like this is indeed inconsistent behaviour and should be fixed in all PGDG-supported versions i

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-01 Thread Kirill Reshke
On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > > EXPLAIN ANALYZE CREATE MATERIALIZED VIEW doesn't go through > ExecCreateTableAs(), but does use CreateIntoRelDestReceiver(). EXPLAIN ANALYZE and regular query goes through create_ctas_internal (WITH NO DATA case too). Maybe we can simply move Set

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-08-02 Thread Kirill Reshke
On Fri, 2 Aug 2024 at 11:09, Antonin Houska wrote: > > Kirill Reshke wrote: > > However, in general, the 3rd patch is really big, very hard to > > comprehend. Please consider splitting this into smaller (and > > reviewable) pieces. > > I'll try to move some pr

Small refactoring around vacuum_open_relation

2024-08-02 Thread Kirill Reshke
I hate to be "that guy", but there are many places in sources where we use LOCKMODE lockmode; variable and exactly one where we use LOCKMODE lmode: it is vacuum_open_relation function. Is it worth a patch? v1-0001-Rename-vacuum_open_relation-argument-to-lockmode.patch Description: Binary data

Re: Small refactoring around vacuum_open_relation

2024-08-02 Thread Kirill Reshke
Thanks for review! On Fri, 2 Aug 2024 at 14:31, Ashutosh Bapat wrote: > > On Fri, Aug 2, 2024 at 1:55 PM Kirill Reshke wrote: > > > > I hate to be "that guy", but there are many places in sources where we use > > LOCKMODE lockmode; variable and exactly one wher

Support multi-column renaming?

2024-08-06 Thread Kirill Reshke
So is it worth a patch? [1] https://www.postgresql.org/docs/current/sql-altertable.html -- Best regards, Kirill Reshke

Re: Incremental View Maintenance, take 2

2024-08-06 Thread Kirill Reshke
It is very strange to receive `division by zero` while inserting into relation, isn't it? Can we add some hints/CONTEXT here? Regular triggers do it: ``` db2=# insert into ttt values(10,0); ERROR: division by zero CONTEXT: PL/pgSQL function f1() line 3 at IF ``` -- Best regards, Kirill Reshke

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-06 Thread Kirill Reshke
On Tue, 6 Aug 2024 at 21:06, Yugo Nagata wrote: > > On Thu, 1 Aug 2024 23:41:18 +0500 > Kirill Reshke wrote: > > > On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > > > Relatedly, if we can EXPLAIN a CREATE MATERIALIZED VIEW, perhaps we > > > should be able to

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-06 Thread Kirill Reshke
On Tue, 6 Aug 2024 at 22:13, Yugo Nagata wrote: > > On Thu, 01 Aug 2024 13:34:51 -0700 > Jeff Davis wrote: > > > On Fri, 2024-08-02 at 00:13 +0500, Kirill Reshke wrote: > > > On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > > > > > > > >

Re: Incremental View Maintenance, take 2

2024-08-08 Thread Kirill Reshke
', descr => 'ivm trigger (before)', > + proname => 'IVM_immediate_before', provolatile => 'v', prorettype => > 'trigger', > + proargtypes => '', prosrc => 'IVM_immediate_before' }, > +{ oid => '787', descr => 'ivm trigger (after)', > + proname => 'IVM_immediate_maintenance', provolatile => 'v', prorettype => > 'trigger', > + proargtypes => '', prosrc => 'IVM_immediate_maintenance' }, > +{ oid => '788', descr => 'ivm filetring ', > + proname => 'ivm_visible_in_prestate', provolatile => 's', prorettype => > 'bool', > + proargtypes => 'oid tid oid', prosrc => 'ivm_visible_in_prestate' }, > ] -- Best regards, Kirill Reshke

Re: Incremental View Maintenance, take 2

2024-08-08 Thread Kirill Reshke
r non-IMMV. Specifically, we can use our cost-based Optimizer to decide which way is cheaper: regular query execution, or delta-table approach (if it is applicable). Is it worth another thread? -- Best regards, Kirill Reshke

Re: [Patch] remove duplicated smgrclose

2024-08-09 Thread Kirill Reshke
efactoring job, which deserves a separate patch. There is similar coding in smgrdestroy function: ``` for (forknum = 0; forknum <= MAX_FORKNUM; forknum++) smgrsw[reln->smgr_which].smgr_close(reln, forknum); ``` So, I feel like these two places should be either changed together or not be altered at all. And is it definitely a separate change. -- Best regards, Kirill Reshke

Re: EphemeralNamedRelation and materialized view

2024-08-10 Thread Kirill Reshke
esc to avoid to create useless matviews > accidentally, > as the attached patch? > > > Regards, > Yugo Nagata > > -- > Yugo Nagata Hi I think this is a clear bug fix, and should be backported in pg v12-v16. LTGM P.S should be set https://commitfest.postgresql.org/49/5153/ entry as RFC? -- Best regards, Kirill Reshke

Re: Constant Splitting/Refactoring

2024-08-10 Thread Kirill Reshke
gt; pieces needing > to be adjusted once. > > Thanks, > > David > > [1] https://commitfest.postgresql.org/47/3986/ Hi! Your patchset needs a rebase. Are you going to push it forward? Also, It is better to have more informative commit messages in patches. -- Best regards, Kirill Reshke

Re: [PATCH] Add log_transaction setting

2024-08-10 Thread Kirill Reshke
ments within this tx are logged and this is not configurable now, correct? Well, if this is the case, why should we add a new GUC? Maybe we should use `log_statement` in this case too, so there is a bug, that log_statement is honored not during tx sampling? Also, tests are failing[1] [1] https://cirrus-ci.com/task/5645711230894080 -- Best regards, Kirill Reshke

Re: Vacuum statistics

2024-08-10 Thread Kirill Reshke
cks on the second database adds much value. Can you justify this please? Other places look more or less fine to me. However, I'll maybe post some additional nit-picky comments on the next patch version. -- Best regards, Kirill Reshke

Re: CSN snapshots in hot standby

2024-08-13 Thread Kirill Reshke
On Wed, 14 Aug 2024 at 01:13, Heikki Linnakangas wrote: > > On 05/04/2024 13:49, Andrey M. Borodin wrote: > >> On 5 Apr 2024, at 02:08, Kirill Reshke wrote: > > Thanks for taking a look, Kirill! > > >> maybe we need some hooks here? Or maybe, we can take CSN

Re: Incremental View Maintenance, take 2

2024-08-19 Thread Kirill Reshke
On Tue, 30 Jul 2024 at 10:24, Yugo NAGATA wrote: > > Hi, > > On Tue, 30 Jul 2024 03:32:19 +0500 > Kirill Reshke wrote: > > > On Sat, 27 Jul 2024 at 13:26, Kirill Reshke wrote: > > > > > > Hi! > > > Cloudberry DB (Greenplum fork) uses IMMV featu

Re: Incremental View Maintenance, take 2

2024-08-19 Thread Kirill Reshke
On Tue, 20 Aug 2024 at 02:14, Kirill Reshke wrote: > == Other thoughts > > In OLAP databases (see [2]), IVM opens the door for 'view > exploitation' feature. That is, use IVM (which is always up-to-date) > for query execution. But current IVM implementation is not com

Re: Incremental View Maintenance, take 2

2024-08-20 Thread Kirill Reshke
On Tue, 20 Aug 2024 at 02:14, Kirill Reshke wrote: > > > == Major suggestions. > > 1) At first glance, working with this IVM/IMMV infrastructure feels > really unintuitive about what servers actually do for query execution. > I do think It will be much better for user e

Re: Consider the number of columns in the sort cost model

2024-10-14 Thread Kirill Reshke
#x27;s why we add 1), and this is strictly better than multiplying by 2, but why exactly is this formula like this, not (1.0 + cmpMultiplier ^ 2 / 10) for example? Maybe we need some more sophisticated approach? Also, this patch needs to be rebased, again. -- Best regards, Kirill Reshke

Re: Amcheck verification of GiST and GIN

2024-10-18 Thread Kirill Reshke
ere is a memory leak. > > > regards > > -- > Tomas Vondra > > So, I did some testing, and it seems that the tuple returned by `gistgetadjusted` inside `gist_check_page` is not being freed. Trivial fix attached. -- Best regards, Kirill Reshke v28-0014-Fix-memory-leak-in-gist_check_page.patch Description: Binary data

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-10-21 Thread Kirill Reshke
change this correctly. We definitely don't want two separate forms of saying the same in 2 consecutive lines. I did small changes: 1) added `-- tests for set_to_null` option in the test script akin to 4ac2a9beceb10d44806d2cf157d5a931bdade39e 2) I rephrased Allow "stop", or "ignore", "set_to_null" values to Allow "stop", "ignore", "set_to_null" values PFA. [1] https://www.postgresql.org/message-id/b26e9c6c-75bf-45ea-8aea-346dda3bd445%40uni-muenster.de -- Best regards, Kirill Reshke v5-0001-on_error-set_to_null.patch Description: Binary data

Re: cache lookup failed when \d t concurrent with DML change column data type

2024-10-25 Thread Kirill Reshke
> acceptable) behaviour. I suspect this is the case. If that is, should be reflect it in the doc? -- Best regards, Kirill Reshke

Re: Useless field ispartitioned in CreateStmtContext

2024-10-25 Thread Kirill Reshke
ue keys on partition tables in commit eb7ed3f [2], this field became unneeded. CreateStmtContext is internal parser struct, so no not used outside PG core (i mean, by any extension). So, my suggestion is to remove it. Hugo, can you please create a CF entry for this patch? Patch itself looks good. [1] https://github.com/postgres/postgres/blob/f0e44751d7175fa3394da2c8f85e3ceb3cdbfe63/src/backend/parser/parse_utilcmd.c#L617 [2] https://github.com/postgres/postgres/commit/eb7ed3f3063401496e4aa4bd68fa33f0be31a72f#diff-5bd59ecc8991bacaefd56f7fe986287b8d664e62566eb3588c3845d7625cacf1L715 -- Best regards, Kirill Reshke

Re: Useless field ispartitioned in CreateStmtContext

2024-10-30 Thread Kirill Reshke
Hi On Thu, 24 Oct 2024, 18:08 hugo, <2689496...@qq.com> wrote: > Hi! > >When looking at the partition-related code, I found that the > ispartitioned > > field in CreateStmtContext is not used. It looks like we can safely remove > it and > > avoid invalid assignment logic. > > > > Here's a

Re: Using read_stream in index vacuum

2024-11-01 Thread Kirill Reshke
t regards, Andrey Borodin. > I noticed CI failure for this patch. This does not look like a flap. [0] https://cirrus-ci.com/task/4527545259917312 [1] https://api.cirrus-ci.com/v1/artifact/task/4527545259917312/log/src/test/modules/test_misc/tmp_check/log/regress_log_007_vacuum_btree -- Best regards, Kirill Reshke

Re: Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS

2024-11-04 Thread Kirill Reshke
On Fri, 1 Nov 2024 at 15:43, Kirill Reshke wrote: > > Hi hackers! > > I have been working on cloudberry/greenplum tab completion features, > and I spotted that the postgres version of psql does not tab-complete > ALTER TABLE ADD COLUMN IF NOT EXISTS pattern. > So, I pr

Re: Useless field ispartitioned in CreateStmtContext

2024-11-04 Thread Kirill Reshke
cxt.blist = NIL; > > cxt.alist = NIL; > > cxt.pkey = NULL; > > - cxt.ispartitioned = (rel->rd_rel->relkind == > RELKIND_PARTITIONED_TABLE); > > cxt.partbound = NULL; > > cxt.ofType = false; > > > > -- > > Best regards, > > hugozhang Hi, I noticed a change of cf entry, thanks! Can you please also send your patch as attachment? You need to do something like git format-patch -v1 -1 and attach resulting file -- Best regards, Kirill Reshke

Re: Allow default \watch interval in psql to be configured

2024-11-04 Thread Kirill Reshke
ase? Something like: ``` reshke=# \set WATCH_INTERVAL -1e-309 underflow while parsing parameter ``` Also, maybe we should provide `double max` arg to the ParseVariableDouble function, because this is a general-use function? -- Best regards, Kirill Reshke

Re: Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS

2024-11-01 Thread Kirill Reshke
On Fri, 1 Nov 2024 at 15:43, Kirill Reshke wrote: > > Hi hackers! > > I have been working on cloudberry/greenplum tab completion features, > and I spotted that the postgres version of psql does not tab-complete > ALTER TABLE ADD COLUMN IF NOT EXISTS pattern. > So, I pr

Re: [Patch] remove duplicated smgrclose

2024-10-27 Thread Kirill Reshke
18:11写道: >> >> Kirill, >> >> Good catch! >> I will split the patch into two to cover both cases. >> >> Thanks, >> Steven >> >> >> Junwang Zhao 于2024年8月9日周五 18:19写道: >>> >>> On Fri, Aug 9, 2024 at 5:20 PM Kirill Reshk

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-11-11 Thread Kirill Reshke
On Mon, 11 Nov 2024 at 16:11, torikoshia wrote: > > On 2024-11-09 21:55, Kirill Reshke wrote: > > Thanks for working on this! Thanks for reviewing the v7 patch series! > > On Thu, 7 Nov 2024 at 23:00, Fujii Masao > > wrote: > >> > >> > &g

Re: Add reject_limit option to file_fdw

2024-11-11 Thread Kirill Reshke
bigint. If not specified, ON_ERROR=ignore allows an unlimited number of errors, meaning COPY will skip all erroneous data. There is a difference. Should we add REJECT_LIMIT vs ON_ERROR clarification for file_fdw too? or maybe we put a reference for COPY doc. -- Best regards, Kirill Reshke

Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS

2024-11-01 Thread Kirill Reshke
Hi hackers! I have been working on cloudberry/greenplum tab completion features, and I spotted that the postgres version of psql does not tab-complete ALTER TABLE ADD COLUMN IF NOT EXISTS pattern. So, I propose to support this. -- Best regards, Kirill Reshke v1-0001-Add-missing-psql-tab

Re: Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS

2024-11-10 Thread Kirill Reshke
On Thu, 7 Nov 2024 at 22:33, Karina Litskevich wrote: > > I looked through the new set of patches. > > On Thu, Nov 7, 2024 at 2:42 PM Kirill Reshke wrote: > > v3-0002 patch actually mixes two types of completion. First one, which > > adds a data type completion for

CREATE SCHEMA ... CREATE DOMAIN support

2024-11-12 Thread Kirill Reshke
is needed in PostgreSQL == end [0] https://www.postgresql.org/message-id/CALdSSPgxcRkooZ2iQ5A7XhYoexVAdbiT6znZDqJTE8hxUVjz_A%40mail.gmail.com [1] https://www.postgresql.org/message-id/20241009.ckna4vp7ahyk%40alvherre.pgsql -- Best regards, Kirill Reshke v1-0001-Extend-CREATE-SCHEMA-elemen

Re: Call rm_redo in a temporary memory context

2024-10-01 Thread Kirill Reshke
ince this simplifies RMGR API for extension developers. Compiler warns about `src/backend/access/transam/xlogrecovery.c:1860`, where we switch to maybe-uninitialized memory context. Lets assign this to something. -- Best regards, Kirill Reshke

set_rel_pathlist function unnecessary params.

2024-09-30 Thread Kirill Reshke
ke that for extension backward compatibility. So, I propose to refactor this a little bit. Am I missing something? -- Best regards, Kirill Reshke

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-10-25 Thread Kirill Reshke
Hi! On Mon, 21 Oct 2024 at 17:39, Fujii Masao wrote: > > > > On 2024/10/21 18:30, Kirill Reshke wrote: > > v4 no longer applies. It now conflicts with > > e7834a1a251d4a28245377f383ff20a657ba8262. > > Also, there were review comments. > > > > So, I d

Re: Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS

2024-11-07 Thread Kirill Reshke
so perhaps we should wait for some other views.. For this reason, I split v3-0002 into two separate patches. I also want to propose an Access method completion for create M.V. using. This is a patch I forgot to attach in my last email. Please, see v4-0004 -- Best regards, Kirill Reshke v4

Re: Page freezing, FSM, and WAL replay

2024-11-08 Thread Kirill Reshke
a Hi! Sorry for disturbing you after so much time. Today, while I was doing my stuff and researching several FSM-related questions, I noticed that the comment in the `heap_xlog_visible` function used improper punctuation. After some investigation, I conclude that this is an oversight of ab7dbd6, wh

Re: Parallel CREATE INDEX for GIN indexes

2024-11-24 Thread Kirill Reshke
vious if statements. 5) In _gin_partition_sorted_data: >charfname[128]; >sprintf(fname, "worker-%d", i); Other places use MAXPGPATH in similar cases. Also, code `sprintf(fname, "worker-%d",...);` duplicates. This might be error-prone. Should we have a macro/inline function for this? I will take another look later, maybe reporting real problems, not nit-picks. -- Best regards, Kirill Reshke

Re: Truncate logs by max_log_size

2024-11-25 Thread Kirill Reshke
or. > Hello! Please deliver the most recent patch version and fix the issues Jim identified [0] as the current commitfest draws to a close. Do not forget to include both parts of this patch (This was actually developed off-list, and we are now using this on our cloud PostgreSQL distribution on versions 12–17). [0] https://www.postgresql.org/message-id/35096a36-04d4-480b-a7cd-a2d8151fb737%40uni-muenster.de -- Best regards, Kirill Reshke

Use streaming read API in pgstattuple.

2024-11-25 Thread Kirill Reshke
, since the streaming API already delivers the right buffer, I think it's okay. This change behaves sanely on my by-hand testing. -- Best regards, Kirill Reshke v1-0001-Use-stream-read-interface-for-pgstattuple-routine.patch Description: Binary data

Re: [PATCH] SVE popcount support

2024-11-29 Thread Kirill Reshke
:08.804) -- with small variance db1=# select drive_popcount64(1000, 1); drive_popcount64 -- 64608 (1 row) Time: 200716.879 ms (02:21.717) -- with small variance ``` I'm not sure how to interpret these results. Looks like this does not help much on a large $num? -- Best regards, Kirill Reshke

Re: EphemeralNamedRelation and materialized view

2024-11-29 Thread Kirill Reshke
ws by passing > QueryEnv to DefineView() (or in ealier stage) , but there are other > objects that can contain ENR in their definition, for examle, functions, > cursor, or RLS policies. Is it worth introducing this version of error > message for all these objects? > > Regards, > Yugo Nagata > > -- > Yugo NAGATA Hi! There are review comments that need to be addressed. Commitfest status is now waiting on the author. [0] https://www.postgresql.org/message-id/ZzrHUEaWB67EAZpW%40paquier.xyz [1] https://www.postgresql.org/message-id/222722.1732124596%40sss.pgh.pa.us -- Best regards, Kirill Reshke

Re: [PATCH] Add log_transaction setting

2024-11-29 Thread Kirill Reshke
On Wed, 14 Aug 2024 at 23:08, Сергей Соловьев wrote: > > > > 10.08.2024, 16:40, "Kirill Reshke" : > > On Thu, 4 Jul 2024 at 21:46, Sergey Solovev > wrote: > > > Hi. > > We encountered a problem with excessive logging when transaction is > sampl

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-11-29 Thread Kirill Reshke
On Fri, 29 Nov 2024 at 18:47, jian he wrote: > > new patch, add tab complete for it. Thank you. You may also be interested in reviewing [0]. [0] https://www.postgresql.org/message-id/CALdSSPhqfvKbDwqJaY%3DyEePi_aq61GmMpW88i6ZH7CMG_2Z4Cg%40mail.gmail.com -- Best regards, Kirill Reshke

Re: relfilenode statistics

2024-11-29 Thread Kirill Reshke
On Fri, 29 Nov 2024 at 20:20, Bertrand Drouvot wrote: > On Fri, Nov 29, 2024 at 11:23:12AM +0500, Kirill Reshke wrote: > > If we don’t have the relation OID when writing buffers out, can we > > just store oid to buffertag mapping somewhere and use it? > > Do you mean add the

Re: relfilenode statistics

2024-11-28 Thread Kirill Reshke
that we will break too many abstraction layers for such a minor matter? -- Best regards, Kirill Reshke

Re: Отв.: Re: UUID v7

2024-11-28 Thread Kirill Reshke
On Fri, 29 Nov 2024, 09:14 Sergey Prokhorenko, < sergeyprokhore...@yahoo.com.au> wrote: > I mean to add not benchmark results to the patch, but functions so that > everyone can compare themselves on their equipment. The comparison with > UUIDv4 is not very interesting, as the choice is usually bet

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-11-28 Thread Kirill Reshke
est regards, Kirill Reshke

Pass ParseState as down to utility functions.

2024-11-28 Thread Kirill Reshke
Hi hackers! PFA patch fixing a number of places where typenameType called with NULL pstate. === motivation. Per discussion in a nearby thread for `CREATE SCHEMA ... CREATE DOMAIN support`. Suggested by Jian He & Tom Lane. On Thu, 28 Nov 2024 at 10:52, Tom Lane wrote: > > Kirill Resh

Re: [PATCH] kNN for btree

2024-11-28 Thread Kirill Reshke
on A. Melnikov > Postgres Professional: http://www.postgrespro.com > The Russian Postgres Company Hi! Given little activity here, there is a little chance of being committed in the current commitfest, so I moved to the next. I will try to take a look at v19 soon. -- Best regards, Kirill Reshke

  1   2   3   >