Re: Use streaming read API in pgstattuple.

2024-11-27 Thread Kirill Reshke
On Tue, 26 Nov 2024 at 15:39, Nazir Bilal Yavuz wrote: > > Hi, > > Thank you for working on this! > > On Mon, 25 Nov 2024 at 21:17, Kirill Reshke wrote: > > While reviewing other threads implementing stream API for various core > > subsystems, I spotted that pgsta

Re: [PATCH] SVE popcount support

2024-11-28 Thread Kirill Reshke
n one of this format: https://wiki.postgresql.org/wiki/Cfbot#Which_attachments_are_considered_to_be_patches.3F This is useful for reviewers who use cfbot or cputube. -- Best regards, Kirill Reshke

Re: Useless field ispartitioned in CreateStmtContext

2024-11-28 Thread Kirill Reshke
ro stated in [0] Patch status is now Rejected. [0] https://www.postgresql.org/message-id/202411051209.hzs5jktf6e3s@alvherre.pgsql -- Best regards, Kirill Reshke

Re: Using read stream in autoprewarm

2024-11-28 Thread Kirill Reshke
se_main() function when it is set to false. > > block_range_read_stream_cb() callback is used when the callback only > needs to loop over the block numbers. However, for the autoprewarm > case; the callback function needs to do additional checks so another > callback and the use of this variable are required. > > v3 is attached. > > -- > Regards, > Nazir Bilal Yavuz > Microsoft Hi! > + old_blk = &(p->block_info[p->pos - 1]); > + cur_blk = &(p->block_info[p->pos]); Should we Assert(p->pos > 0 && p->pos < *something*) Patch tested with no regression. -- Best regards, Kirill Reshke

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-11-27 Thread Kirill Reshke
On Wed, 27 Nov 2024 at 23:39, Tom Lane wrote: > > Kirill Reshke writes: > > On Wed, 27 Nov 2024 at 08:42, jian he wrote: > >> CREATE SCHEMA regress_schema_2 AUTHORIZATION CURRENT_ROLE > >> create domain ss1 as ss > >> create domain ss as text; > >>

Re: pg_stat_statements and "IN" conditions

2024-11-28 Thread Kirill Reshke
old.patch > > Fine tuning for the previous patch, makes only arrays with the length over a > certain threshold to be reduced. > > On top of that Yasuo Honda and Jakub Wartak have provided a couple of > practical > examples, where handling of constant arrays has to be improved. David Geier > pointed out some examples that might be confusing as well. All those are > definitely worth addressing, but out of scope of this patch for now. Hi! Can you please send a rebased version of this? -- Best regards, Kirill Reshke

Re: Using read_stream in index vacuum

2024-11-28 Thread Kirill Reshke
On Mon, 18 Nov 2024 at 16:34, Andrey M. Borodin wrote: > > > > > On 2 Nov 2024, at 02:36, Kirill Reshke wrote: > > > > I noticed CI failure for this patch. This does not look like a flap. > > Seems like vacuum did not start index cleanup. I’ve added "i

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

2024-11-28 Thread Kirill Reshke
On Tue, 19 Nov 2024 at 13:52, jian he wrote: > > On Sat, Nov 16, 2024 at 5:55 PM Kirill Reshke wrote: > > > > I am attaching my v8 for reference. > > > > in your v8. > > > REJECT_LIMIT > > > Specifies the maxim

Re: tab_complete for copy(merge

2024-11-19 Thread Kirill Reshke
Hi! On Tue, 19 Nov 2024, 14:08 jian he, wrote: > hi. > > in v17, we support COPY(MERGE RETURNING) > we can add tab_complete for it. > Sounds sane > /* Complete COPY ( with legal query commands */ > else if (Matches("COPY|\\copy", "(")) > - COMPLETE_WITH("SELECT", "TABLE",

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

2024-11-19 Thread Kirill Reshke
On Tue, 19 Nov 2024, 13:52 jian he, wrote: > > On Sat, Nov 16, 2024 at 5:55 PM Kirill Reshke wrote: > > > > I am attaching my v8 for reference. > > > > in your v8. > > > REJECT_LIMIT > > > Specifies the maxim

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

2024-11-09 Thread Kirill Reshke
On Thu, 7 Nov 2024 at 23:00, Fujii Masao wrote: > > > > On 2024/10/26 6:03, Kirill Reshke wrote: > > when the REJECT LIMIT is set to some non-zero number and the number of > > row NULL replacements exceeds the limit, is it OK to fail. Because > > there WAS errors, a

Re: Index AM API cleanup

2024-11-16 Thread Kirill Reshke
> 5. Provide mapping between index AM strategy numbers and > > RowCompareType (with some small extensions). This is what this > > patch does. > > As the patch author, obviously this is the one I chose. The "small > extensions" are just to handle "no such value" type cases. > > > — > Mark Dilger > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > Hi! Can we please have a rebased version of this patch series? -- Best regards, Kirill Reshke

Re: [PATCH] New predefined role pg_manage_extensions

2024-11-17 Thread Kirill Reshke
loaded on the host, I never want a normal user to run code with superuser privileges. For a thorough understanding of the current situation and the rationale behind the design, you can read this[1] discussion. [1] https://www.postgresql.org/message-id/5889.1566415762%40sss.pgh.pa.us -- Best regards, Kirill Reshke

Re: [PATCH] New predefined role pg_manage_extensions

2024-11-17 Thread Kirill Reshke
On Mon, 18 Nov 2024 at 11:26, Kirill Reshke wrote: > > On Fri, 1 Nov 2024 at 02:47, Michael Banck wrote: > > > > Hi, > > > > Even though there has not been a lot of discussion on this, here is a > > rebased patch. I have also added it

Re: Allow non-superuser to cancel superuser tasks.

2024-11-26 Thread Kirill Reshke
On Sat, 23 Nov 2024, 07:44 Nathan Bossart, wrote: > On Fri, Nov 22, 2024 at 06:13:16PM -0500, Andres Freund wrote: > >> -if (procStatus && procStatus->st_backendType == > B_AUTOVAC_WORKER) > >> +if (pgstat_get_backend_type(pid) == B_AUTOVAC_WORKER) > > > > Because we alrea

Re: What db objects can only be created with superuser?

2024-11-26 Thread Kirill Reshke
w'; fdwowner -- 10 (1 row) -- Best regards, Kirill Reshke

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-11-26 Thread Kirill Reshke
^ To implement this, we need to include `ParseLoc location` to the `CreateDomainStmt` struct, which is doubtful, because I don't see any other type of create *something* that does this. `make check` on v3 runs successfully. Test & doc seems fine to me. PFA v4. The only change I made

Re: Add Pipelining support in psql

2024-11-27 Thread Kirill Reshke
should instead support \sync meta-command in psql? This will be a useful contribution itself. > Those meta-commands will allow testing pipelined query behaviour using > psql regression tests. > > Regards, > Anthonin I haven't looked into the patch in detail yet. -- Best regards, Kirill Reshke

Re: Add Pipelining support in psql

2024-11-27 Thread Kirill Reshke
tx block. this is however untrue before the bind+exec message for p1 will be sent (\bind_name metacommand). Am I correct? -- Best regards, Kirill Reshke

Re: Vacuum statistics

2024-11-29 Thread Kirill Reshke
llo! After a brief glance, I think this patch set is good. But there isn't any more time in the current CF to commit this :(. So I moved to the next CF. I also like the 0001 commit message. This commit message is quite large and easy to understand. Actually, it might be too big. Perhaps rather of being a commit message, the final paragraph (pages_frozen - number of pages that..) need to be a part of the document. Perhaps delete the explanation on pages_frozen that we have in 0004? -- Best regards, Kirill Reshke

Re: Truncate logs by max_log_size

2024-11-29 Thread Kirill Reshke
"1foo" > HINT: Valid units for this parameter are "B", "kB", "MB", "GB", and "TB". > postgres=# set log_parameter_max_length = '1TB'; > ERROR: invalid value for parameter "log_parameter_max_length": "1TB" > HINT: Value exceeds integer range. > > I think we can leave it as is. Hi > +for (my $attempts = 0; $attempts < $max_attempts; $attempts++) > +{ > + eval { > + $current_logfiles = slurp_file($node->data_dir . '/current_logfiles'); > + }; > + last unless $@; > + usleep(100_000); > +} `usleep` in tap tests is usually a bad pattern. Do we have a chance to test this using `wait_for_log` or similar? -- Best regards, Kirill Reshke

Re: Enhance file_fdw to report processed and skipped tuples in COPY progress

2024-11-29 Thread Kirill Reshke
the next CF. -- Best regards, Kirill Reshke

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-11-30 Thread Kirill Reshke
rtions, character sets, translations, collations, privileges) and their associated descriptors are effectively created. ``` Look like we are 100% to do it in order of definition -- Best regards, Kirill Reshke v2-0001-Don-t-try-to-re-order-the-subcommands-of-CREATE-S.patch Description: Binary data

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

2024-11-16 Thread Kirill Reshke
On Sat, 16 Nov 2024 at 13:27, jian he wrote: > > On Sat, Nov 9, 2024 at 8:55 PM Kirill Reshke wrote: > > > > > > > But while I was trying to implement that, I realized that I don't > > > > understand v4 of this patch. My misunderstanding is about >

Re: Using read stream in autoprewarm

2024-12-02 Thread Kirill Reshke
On Fri, 29 Nov 2024 at 16:19, Nazir Bilal Yavuz wrote: > v4 is attached. Hi! I feel like we are ready to mark this as RFC, WDYT? -- Best regards, Kirill Reshke

Re: Sequence Access Methods, round two

2024-12-03 Thread Kirill Reshke
On Wed, 2 Oct 2024 at 10:29, Michael Paquier wrote: > > Rebased as v29 due to an OID conflict. Hi! Looks like this needs another rebase -- Best regards, Kirill Reshke

Re: Fix for consume_xids advancing XIDs incorrectly

2024-12-03 Thread Kirill Reshke
ksz_32k.diff) that supports the > block size == 32K case. > > Best, > Yushi Ogiwara > Hi! There is review comments that need to be addressed in [1] Patch status now is waiting on author [1] https://www.postgresql.org/message-id/CAD21AoCthHcSQ5zeeivNpiz7HMi_FPG-dtwDDNYUx2oKG36bCQ%40mail.gmail.com -- Best regards, Kirill Reshke

Re: on_error table, saving error info to a table

2024-12-03 Thread Kirill Reshke
317d0c26786953646a411.ca...@cybertec.at) > + * in COPY FROM keep error saving table locks until the transaction end. > + */ I can rarely see other comments referencing commits, and even few referencing a mail archive thread. Can we just write proper comment explaining the reasons? = overall Patch design is a little dubious for me. We give users some really incomprehensible API. To use on_error *relation* feature user must create tables with proper schema. Maybe a better design will be to auto-create on_error table if this table does not exist. Thoughts? -- Best regards, Kirill Reshke

Re: processes stuck in shutdown following OOM/recovery

2024-12-03 Thread Kirill Reshke
and it fixes the repro that > Justin posted. FYI on my machine I had to use sleep 0.005 where he > had 0.05, as an FYI if someone else is trying to reproduce the issue. Hi! This patch needs a rebase.CF entry status now is Waiting On author. -- Best regards, Kirill Reshke

Re: Pass ParseState as down to utility functions.

2024-12-05 Thread Kirill Reshke
On Thu, 5 Dec 2024 at 11:45, Michael Paquier wrote: > > On Wed, Dec 04, 2024 at 03:31:47PM +0500, Kirill Reshke wrote: > > On Sat, 30 Nov 2024 at 17:37, jian he wrote: > >> So I guess bundling it into a single patch should be fine? > > > > Ok. I created CF entry

Re: Pass ParseState as down to utility functions.

2024-12-04 Thread Kirill Reshke
On Sat, 30 Nov 2024 at 17:37, jian he wrote: > So I guess bundling it into a single patch should be fine? Ok. I created CF entry for this patch. [0] https://commitfest.postgresql.org/51/5420/ -- Best regards, Kirill Reshke

Re: Implement waiting for wal lsn replay: reloaded

2024-12-04 Thread Kirill Reshke
-id/CAPpHfdvRmTzGJw5rQdSMkTxUPZkjwtbQ%3DLJE2u9Jqh9gFXHpmg%40mail.gmail.com > 4. > https://www.postgresql.org/message-id/4953563546cb8c8851f84c7debf723ef%40postgrespro.ru > 5. > https://www.postgresql.org/message-id/ab0eddce-06d4-4db2-87ce-46fa2427806c%40iki.fi > > -- > Regards, > Alexander Korotkov > Supabase Hi! What's the current status of https://commitfest.postgresql.org/50/5167/ ? Should we close it or reattach to this thread? -- Best regards, Kirill Reshke

Add pg_stat_progress_rewrite view.

2024-12-04 Thread Kirill Reshke
) that was read from the altered table. Thoughts? -- Best regards, Kirill Reshke v1-0001-Add-pg_stat_progress_rewrite-view.patch Description: Binary data

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

2024-12-07 Thread Kirill Reshke
I can take > care of that ... > Thank you for taking a look. PFA v6 with last Karina's review comments addressed. -- Best regards, Kirill Reshke v6-0003-Add-missing-tab-completion-for-CREATE-TEMP-TABLE-.patch Description: Binary data v6-0001-Enhance-tab-completion-to-ALTER-TYPE-ADD-ATT

Re: Popcount optimization using SVE for ARM

2024-12-05 Thread Kirill Reshke
.postgresql.org/wiki/Submitting_a_Patch>. *Please find the > attachments for the patch and performance results.* > Please let us know if you have any queries or suggestions. > > > Thanks & Regards, > Susmitha Devanga. > Hi! Is this patch somehow related to [0] ? [0] https://www.postgresql.org/message-id/010101936e4aaa70-b474ab9e-b9ce-474d-a3ba-a3dc223d295c-00%40us-west-2.amazonses.com -- Best regards, Kirill Reshke

Re: Use streaming read API in pgstattuple.

2024-12-05 Thread Kirill Reshke
_items and version? [0] https://api.cirrus-ci.com/v1/artifact/task/5037800950595584/testrun/build-32/testrun/pgstattuple/regress/regression.diffs -- Best regards, Kirill Reshke

Re: Use streaming read API in pgstattuple.

2024-12-05 Thread Kirill Reshke
lso add more tests to the pgstattuple regression test, as Nazir suggested. It turns out that pgstattuple works on GIST indexes, but not GIN, while `pgstatginindex` exists and `pgstatgistindex` does not. It took me a while to process the reasons. But those reasons worth another thread & patch, s

Re: Popcount optimization using SVE for ARM

2024-12-06 Thread Kirill Reshke
I did not yet look into this in detail, but please note that PostgreSQL comments style is /**/ not //. Also, please, do not top post on this list

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-09 Thread Kirill Reshke
On Mon, 9 Dec 2024 at 15:27, Alexander Kukushkin wrote: > postgres=# reassign owned by test to postgres; > WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4) > REASSIGN OWNED Hi! Looks like PFA should fix that. -- Best regards, Kirill Reshke v1-0001-Loc

Re: Pass ParseState as down to utility functions.

2024-12-09 Thread Kirill Reshke
auxiliary functions are > actual arguments to errstart() -- which means that the parentheses > you're adding here are unnecessary and discouraged. Just add the > parser_errposition() call and it'll be fine. Should be fixed in v7. -- Best regards, Kirill Reshke v7-0001-Pri

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

2025-01-07 Thread Kirill Reshke
oneous rows tests. In short, we need this message somewhere in a regression test. ``` ERROR: skipped more than REJECT_LIMIT (xxx) rows due to data type incompatibility ``` Also, please update commit msg with all authors and reviewers. This will make committer job a little bit easier -- Best regards, Kirill Reshke

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-09 Thread Kirill Reshke
in database.sql. Sure. I added one test case to dependency.sql (for DATABASE ownership change), do we need more (other catalog classes)? -- Best regards, Kirill Reshke v2-0001-When-making-dependency-changes-lock-the-tuple-for.patch Description: Binary data

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-09 Thread Kirill Reshke
On Tue, 10 Dec 2024 at 10:45, Kirill Reshke wrote: > PFA v2. Also CF entry https://commitfest.postgresql.org/51/5430/ to get CI feedback. -- Best regards, Kirill Reshke

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-10 Thread Kirill Reshke
On Tue, 10 Dec 2024 at 10:47, Kirill Reshke wrote: > > On Tue, 10 Dec 2024 at 10:45, Kirill Reshke wrote: > > > PFA v2. > Also CF entry https://commitfest.postgresql.org/51/5430/ to get CI feedback. CI fails due to bad naming in the regression test. The change is deptestdb1 -&

Re: Pass ParseState as down to utility functions.

2024-12-10 Thread Kirill Reshke
d in the first patch. > > This makes also the whole review easier. Ok. Sure. > Typo here: s/exists/exist/. Fixed, Thank you PFA v8. -- Best regards, Kirill Reshke v8-0001-Add-more-regression-tests-to-various-DDL-patterns.patch Description: Binary data v8-0002-Print-out-error-

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-12-10 Thread Kirill Reshke
made within CREATE SCHEMA, a possible though non-standard answer > would be to allow ALTER TABLE ADD CONSTRAINT as a . That's a nice feature to have by itself? -- Best regards, Kirill Reshke

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-10 Thread Kirill Reshke
On Tue, 10 Dec 2024 at 14:14, Kirill Reshke wrote: > CI fails due to bad naming in the regression test. > The change is deptestdb1 -> regressdeptestdb1 I'm very sorry for spam. PFAv4 regressdeptestdb1 -> regressiondeptestdb1 -- Best regards, Kirill Reshke v4-0001-When-

Re: Amcheck verification of GiST and GIN

2024-12-16 Thread Kirill Reshke
the high key on the rightmost page in the entry GIN tree explicitly, as this is not actually stored. PFA little v35 fix for this. I will update this thread with a full v35 patch set shortly. [0] https://www.postgresql.org/message-id/87a5gyqnl5.fsf%40163.com -- Best regards, Kirill Reshke v35

Re: on_error table, saving error info to a table

2024-12-16 Thread Kirill Reshke
nd of checks. +1 on that. -- Best regards, Kirill Reshke

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-16 Thread Kirill Reshke
stead harness the existing one. Would you do it that way? Sure, my bad, I missed this part of your message. PFA v5 with database.sql changes. -- Best regards, Kirill Reshke v5-0001-When-making-dependency-changes-lock-the-tuple-for.patch Description: Binary data

Re: Allow subfield references without parentheses

2024-12-12 Thread Kirill Reshke
On Thu, 12 Dec 2024, 21:45 Tom Lane, wrote: > Peter Eisentraut writes: > > This patch allows subfield references in column references without > > parentheses, subject to certain condition. This implements (hopes to, > > anyway) the rules from the SQL standard (since SQL99). > > This has been re

Re: log_min_messages per backend type

2024-12-18 Thread Kirill Reshke
On Wed, 18 Dec 2024 at 00:15, Euler Taveira wrote: > > Hi, > > Sometimes you need to inspect some debug messages from autovacuum worker but > you cannot apply the same setting for backends (that could rapidly fill the > log > file). This proposal aims to change log_min_messages to have different

Re: Allow non-superuser to cancel superuser tasks.

2024-11-22 Thread Kirill Reshke
ave a copy of the backend type in PGPROC. > > Greetings, > > Andres Freund Hi, thanks for taking care of this. I agree with this analysis, and it appears that the worries are legitimate. For the fix, I believe that copy-pasting `pgstat_get_backend_current_activity` to get the backend type should solve the issue. Not sure if this is the correct way of doing this. Enlarging PGPROC somehow feels worse. -- Best regards, Kirill Reshke

Re: CREATE TABLE NOT VALID for check and foreign key

2024-12-05 Thread Kirill Reshke
On Thu, 5 Dec 2024 at 14:36, Alvaro Herrera wrote: > Maybe it would have been wise to forbid NOT VALID when used with CREATE > TABLE. But we didn't. Should we do that now? Maybe we can just > document that you can specify it but it doesn't do anything. +1 on that -- B

Re: Pass ParseState as down to utility functions.

2024-12-05 Thread Kirill Reshke
Looks like v4 fails on windows, PFA v5. Sorry for the noise, I hope Cirrus CI will like this version. -- Best regards, Kirill Reshke v5-0001-print-out-error-position-for-some-DDL-command.patch Description: Binary data

Re: attndims, typndims still not enforced, but make the value within a sane threshold

2024-12-05 Thread Kirill Reshke
On Fri, 20 Sept 2024 at 07:11, jian he wrote: > attached patch removes attndims and typndims entirely. LGTM? I see no open items in this thread. Are there any issues about v1? -- Best regards, Kirill Reshke

Re: clean up create|alter domain stmt incompatiable constraint error case and add regression test

2024-12-07 Thread Kirill Reshke
ql.org/51/5385/ -- Best regards, Kirill Reshke

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

2025-01-11 Thread Kirill Reshke
Maybe we can add a `malformed_tuples` column to this view? > 3. do we settled (on_error set_to_null) syntax. I think so. I prefer this syntax to others discussed in this thread. -- Best regards, Kirill Reshke

Re: Compression of bigger WAL records

2025-01-12 Thread Kirill Reshke
std is not supported by this build 2025-01-12 18:10:47.657 UTC [4167965] PANIC: cannot abort transaction 1, it was already committed Aborted (core dumped) child process exited with exit code 134 initdb: removing data directory "db" ``` Also pg_waldump fails with ``` corrupted size vs. prev_size Aborted (core dumped) ``` Best regards, Kirill Reshke

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

2025-01-20 Thread Kirill Reshke
On Tue, 14 Jan 2025 at 10:51, jian he wrote: > > the attached patch also did some doc enhancement, error message enhancement. LGTM -- Best regards, Kirill Reshke

Re: Add a property to automatically suspend portals as they produce given number of bytes

2025-01-17 Thread Kirill Reshke
Hi, client can use CURSOR feature to process data in batches. What is the case where proposed feature solves problem that CURSOR does not? https://www.postgresql.org/docs/current/plpgsql-cursors.html On Fri, 17 Jan 2025, 16:08 Vladimir Sitnikov, wrote: > Hi, > > Applications often face an "out

Re: read stream on amcheck

2025-01-02 Thread Kirill Reshke
;+ >+ if ((p->skip_option == SKIP_PAGES_ALL_FROZEN && (mapbts & >VISIBILITYMAP_ALL_FROZEN) != 0) || >+ (p->skip_option == SKIP_PAGES_ALL_VISIBLE && (mapbts & >VISIBILITYMAP_ALL_VISIBLE) != 0)) > + continue; I don't understand this change. The patch aims to be purely applying streaming API, not refactoring. And if we refactor this code, this is less readable than it was. Other than that, LGTM. -- Best regards, Kirill Reshke

Re: Get rid of WALBufMappingLock

2025-02-16 Thread Kirill Reshke
Hi! I spotted a typo in v10: + /* + * Page at nextidx wasn't initialized yet, so we cann't move + * InitializedUpto further. It will be moved by backend which + * will initialize nextidx. + */ cann't - > can't moved by backend -> moved by the backend -- Best regards, Kirill Reshke

Re: Some read stream improvements

2025-02-16 Thread Kirill Reshke
s that were not checked as uniformly as I would like. Just out of curiosity, should we `Assert(*index + n < stream->queue_size);` in `read_stream_index_advance_n`? -- Best regards, Kirill Reshke

Re: Vacuum statistics

2025-03-15 Thread Kirill Reshke
0 | 455 | 0 | 0 + vestat | 0 | 0 | 417 | 0 | 0 (1 row) SELECT relpages AS rp === EOF === ``` [0] https://api.cirrus-ci.com/v1/artifact/task/5336493629112320/testrun/build-32/testrun/recovery/027_stream_regress/log/regress_log_027_stream_regress -- Best regards, Kirill Reshke

Re: protocol support for labels

2025-03-15 Thread Kirill Reshke
ouncer,spqr,pgpool II, pgcat, pg_doorman) is used. 2) pg_comment_stats uses comments in the query to accumulate statistics. [0] However, I don't think PostgreSQL community is open for this big change for much (non-big) matters. [0] g...@github.com:munakoiso/pg_comment_stats.git -- Best regards, Kirill Reshke

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2025-03-26 Thread Kirill Reshke
class.relkind) that > > only works in one direction of COPY. > > hi. > patch attached. > also cc to Tom, > since at that time, you are against the idea of ``COPY matview TO``. Hi! With this patch it is possible to COPY matview TO, but not regular view, which is surprising. Let's fix that? -- Best regards, Kirill Reshke

Re: sync_standbys_defined read/write race on startup

2025-03-26 Thread Kirill Reshke
l config initializing. > Attached possible patch for codebase. > > Best regards > Melnikov Maksim We do not tolerate TAP test flaps. Your repro is OK, can we have deterministic test here using injection point technique? -- Best regards, Kirill Reshke

Re: a pool for parallel worker

2025-03-25 Thread Kirill Reshke
orker in a pool running a user query, which uses UDF. In this UDF, one can simply RESET SESSION AUTHORIZATION and process with anything under superuser rights. > Any comments on this idea? > > -- > Best Regards > Andy Fan > > > -- Best regards, Kirill Reshke

Re: support create index on virtual generated column.

2025-03-26 Thread Kirill Reshke
--+-+-+--+- a | integer | | | | plain | | | Indexes: "xx_b_idx" btree ("pg.dropped.2" int4_ops) Access method: heap reshke=# ``` with regular columns we have different behaviour - with drop column we drop the index -- Best regards, Kirill Reshke

Re: [PATCH] avoid double scanning in function byteain

2025-03-26 Thread Kirill Reshke
locate max possible size */ > rp = VARDATA(result); >+ tp = inputText; >+ > while (*tp != '\0') Isn't this `strlen` O(n) + `while` O(n)? Where is the speed up? [0] https://github.com/bminor/glibc/blob/master/string/strlen.c#L43-L45 -- Best regards, Kirill Reshke

Re: a pool for parallel worker

2025-03-26 Thread Kirill Reshke
On Wed, 26 Mar 2025, 11:10 Andy Fan, wrote: > > Hi, > >> The boring thing for the pool is it is [dbid + userId] based, which > >> I mean if the dbid or userId is different with the connection in pool, > >> they can't be reused. To reduce the effect of UserId, I think if we can > >> start the poo

Re: Sequence Access Methods, round two

2025-03-28 Thread Kirill Reshke
neric xlog for logging very small actual changes. I understand this is out of topic here, but can we add a second option for generic log to store FormData_snowflake_data which is a few bytes? Maybe we should start different thread for that -- Best regards, Kirill Reshke

Re: speedup COPY TO for partitioned table.

2025-04-07 Thread Kirill Reshke
On Fri, 4 Apr 2025, 15:17 Kirill Reshke, wrote: > Hi! > > First of all, a commit message does not need to contain SQL examples > of what it does. We should provide human-readable explanations and > that's it. > > Next, about changes to src/test/regress/sql/copy2.sql. I

Re: speedup COPY TO for partitioned table.

2025-04-10 Thread Kirill Reshke
pp (year int, day int) PARTITION BY RANGE (year); +CREATE TABLE pp_1 (year int, day int) PARTITION BY RANGE (day); +CREATE TABLE pp_2 (year int, day int) PARTITION BY RANGE (day); ?? -- Best regards, Kirill Reshke

Re: tab complete for COPY populated materialized view TO

2025-04-09 Thread Kirill Reshke
bNZAp-DCmwvOE_Gkogb%2Brhfqqe1%3DS5cOHR-V7Q%40mail.gmail.com -- Best regards, Kirill Reshke

Re: psql suggestion "select " offers nothing, can we get functions like "\df "

2025-04-10 Thread Kirill Reshke
On Fri, 4 Apr 2025, 16:41 Kirill Reshke, wrote: > On Thu, 3 Apr 2025 at 20:07, Kirk Wolak wrote: > > Worse, "select pg_stat_st" has no clue. I was looking for ... > _reset > > > > It's not that difficult to add, I am suggesting that we use the same &

Re: tab complete for COPY populated materialized view TO

2025-04-10 Thread Kirill Reshke
On Thu, 10 Apr 2025 at 20:07, Fujii Masao wrote: > > > > On 2025/04/09 19:24, Kirill Reshke wrote: > > On Wed, 9 Apr 2025 at 14:45, Fujii Masao > > wrote: > >> > >> > >> > >> On 2025/04/09 18:25, Kirill Reshke wrote: > &g

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2025-04-01 Thread Kirill Reshke
On Tue, 1 Apr 2025, 11:45 vignesh C, wrote: > > One thing I noticed was that if the materialized view is not refreshed > user will get stale data > > Should we document this? > Does this patch alter thus behaviour? User will get stale data even on HEAD, why should we take a care within this thr

Re: Amcheck verification of GiST and GIN

2025-03-28 Thread Kirill Reshke
On Fri, 28 Mar 2025 at 21:26, Tomas Vondra wrote: > > Here's a polished version of the patches. If you have any > comments/objections, please speak now. > -- > Tomas Vondra Hi, no objections, lgtm -- Best regards, Kirill Reshke

Re: duplicated comments on get_relation_constraints

2025-03-28 Thread Kirill Reshke
nue; > } > `` > > The first "Also ignore if NO INHERIT and we weren't told that that's > safe." is duplicated, > also it's in the wrong place? > The second one is fine. > > Hi! Indeed. Looks like an oversight from ca87c41. I think we can safely remove one of those, presumably the first one. -- Best regards, Kirill Reshke

Re: duplicated comments on get_relation_constraints

2025-03-28 Thread Kirill Reshke
On Fri, 28 Mar 2025 at 15:19, Richard Guo wrote: > > On Fri, Mar 28, 2025 at 4:53 PM Kirill Reshke wrote: > > On Fri, 28 Mar 2025 at 09:47, jian he wrote: > > > The first "Also ignore if NO INHERIT and we weren't told that that's > > > safe."

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2025-04-01 Thread Kirill Reshke
On Tue, 1 Apr 2025 at 15:52, vignesh C wrote: > > On Tue, 1 Apr 2025 at 15:49, Kirill Reshke wrote: > > > > On Tue, 1 Apr 2025, 11:45 vignesh C, wrote: > >> > >> > >> One thing I noticed was that if the materialized view is not refreshed >

Re: Draft for basic NUMA observability

2025-04-08 Thread Kirill Reshke
s/errcodes.h" [m [K | [01;31m [K^~ [m [K compilation terminated. [0] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dogfish&dt=2025-04-08%2011%3A25%3A11 -- Best regards, Kirill Reshke

Re: Parallel CREATE INDEX for GIN indexes

2025-04-09 Thread Kirill Reshke
; Mattias after I wrote that. If not, I'll move it to the next CF. Looks like no more patches will get into v18 so i moved the CF -- Best regards, Kirill Reshke

Re: tab complete for COPY populated materialized view TO

2025-04-09 Thread Kirill Reshke
On Wed, 9 Apr 2025 at 14:45, Fujii Masao wrote: > > > > On 2025/04/09 18:25, Kirill Reshke wrote: > > On Wed, 9 Apr 2025 at 13:23, jian he wrote: > >> > >> hi. > >> > >> we allow the "COPY table TO" command to copy rows from materia

Re: speedup COPY TO for partitioned table.

2025-04-07 Thread Kirill Reshke
Sorry, wrong thread Best regards, Kirill Reshke On Mon, 7 Apr 2025, 19:54 Kirill Reshke, wrote: > > On Fri, 4 Apr 2025, 15:17 Kirill Reshke, wrote: > >> Hi! >> >> First of all, a commit message does not need to contain SQL examples >> of what it does.

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Kirill Reshke
on callable in production systems? One more concern is about pre-defined oids: they are limited. Maybe we should not consume predefined oid in case when this is avoidable. -- Best regards, Kirill Reshke

Re: speedup COPY TO for partitioned table.

2025-04-15 Thread Kirill Reshke
On Thu, 10 Apr 2025 at 17:37, jian he wrote: > > > I think the current test example is fine. Ok, let it be so. I changed status to RFQ as I have no more input here, and other reviewers in thread remain silent (so I assume they are fine with v10) -- Best regards, Kirill Reshke

Re: tab complete for COPY populated materialized view TO

2025-04-10 Thread Kirill Reshke
On Fri, 11 Apr 2025 at 00:33, David G. Johnston wrote: > > They are supported for the From variant; valid completions need only satisfy > one of to/from, not both. > Thank you. If so, then WFM, and I don't have any more objections. -- Best regards, Kirill Reshke

Re: Built-in Raft replication

2025-04-14 Thread Kirill Reshke
There is actually a prod-ready (non open source) implementation of RAFT as extension, called BiHA, by pgpro. Just some thought on top of my mind, if you need my voice here. -- Best regards, Kirill Reshke

Re: HELP: SAVEPOINT feature cases

2025-04-14 Thread Kirill Reshke
; this functionality proves particularly useful. > > Thank you for your time and assistance. I look forward to your response. > > Sincerely, > > jack. Have you read https://www.postgresql.org/docs/current/sql-savepoint.html ? There are a few examples here. -- Best regards, Kirill Reshke

Re: support create index on virtual generated column.

2025-04-14 Thread Kirill Reshke
I'm not aware of. ``` ALTER TABLE gtest22c DROP COLUMN e; \d gtest22c -- EXPLAIN (COSTS OFF) SELECT * FROM gtest22c WHERE b * 3 = 6; -- SELECT * FROM gtest22c WHERE b * 3 = 6; -- EXPLAIN (COSTS OFF) SELECT * FROM gtest22c WHERE a = 1 AND b > 0; -- SELECT * FROM gtest22c WHERE a = 1 AND b > 0; ``` -- Best regards, Kirill Reshke

Re: Built-in Raft replication

2025-04-15 Thread Kirill Reshke
ble to manipulate with PGDATA without starting > Postgres. -- Best regards, Kirill Reshke

Re: Amcheck verification of GiST and GIN

2025-02-27 Thread Kirill Reshke
es function compares the gin tuples category first. I do not understand how this would be a valid order on the page, given that ginCompareEntries used in `ginget.c` logic. . Maybe I'm missing something vital about GIN. -- Best regards, Kirill Reshke 0001-Much-smaller-repro.patch Description: Binary data

Re: ZStandard (with dictionaries) compression support for TOAST compression

2025-03-08 Thread Kirill Reshke
NO_METHOD_SUPPORT(method) \ ereport(ERROR, \ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \ - errmsg("compression method lz4 not supported"), \ - errdetail("This functionality requires the server to be built with lz4 support."))) + errmsg("compression method %s not supported", method), \ + errdetail("This functionality requires the server to be built with %s support.", method))) ``` This could be a separate preliminary refactoring patch in series. Perhaps we need to divide the patch into smaller pieces if we follow the suggested course of this thread (in-core support). I will try to give another in-depth look here soon. -- Best regards, Kirill Reshke

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-10 Thread Kirill Reshke
pile with --enable-debug and issue stop reproducing... -- Best regards, Kirill Reshke

Re: Extensible storage manager API - SMGR hook Redux

2025-03-10 Thread Kirill Reshke
6 modifications. Later, I'll try to take another look. [0] https://cirrus-ci.com/task/6466113875214336 -- Best regards, Kirill Reshke

Re: FSM doesn't recover after zeroing damaged page.

2025-03-10 Thread Kirill Reshke
completely fine here. I don't think MarkBufferDirty provides something different from MarkBufferDirtyHint in the FSM case (because FSM changed are not persistent). At the end of the day, you just should write a page on a disk sooner or later, and that's it. -- Best regards, Kirill Reshke

Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring

2025-03-11 Thread Kirill Reshke
and Amazon CloudWatch to provide enhanced database insights and > proactive managed monitoring for users. > > Please let me know if this approach is acceptable, so I’ll go ahead and > submit a patch. Let's give it a try! -- Best regards, Kirill Reshke

<    1   2   3   >