Re: [PATCH] dynahash: add memory allocation failure check

2025-04-24 Thread Andrey Borodin
n a less efficient fill loop. Well, that's just few hundred bytes at most. But I agree that makes sense. Best regards, Andrey Borodin.

Re: [PATCH] dynahash: add memory allocation failure check

2025-04-24 Thread Andrey Borodin
this maybe use MemoryContextAllocZero() instead of subsequent MemSet()? But this might unroll loop of unnecessary beautifications like DynaHashAlloc() calling Assert(MemoryContextIsValid(CurrentDynaHashCxt)) just before MemoryContextAllocExtended() will repeat same exercise. Best regards, Andrey Borodin.

Re: [PATCH] dynahash: add memory allocation failure check

2025-04-23 Thread Andrey Borodin
there are a lot of cases of MCXT_ALLOC_NO_OOM, perhaps should we check them all? Best regards, Andrey Borodin.

Re: Built-in Raft replication

2025-04-15 Thread Andrey Borodin
stgreSQL and others purely DCS nodes will reduce waste of resources”? Best regards, Andrey Borodin.

Re: Built-in Raft replication

2025-04-15 Thread Andrey Borodin
> On 16 Apr 2025, at 10:39, Kirill Reshke wrote: > > You can run bash from extension, what's the point? You cannot run bash that will stop backend running bash. Best regards, Andrey Borodin.

Re: Built-in Raft replication

2025-04-15 Thread Andrey Borodin
> On 16 Apr 2025, at 09:26, Tom Lane wrote: > > Andrey Borodin writes: >> I think it's what Konstantin is proposing. To have our own Raft >> implementation, without dependencies. > > Hmm, OK. I thought that the proposal involved relying on some existing &

Re: Built-in Raft replication

2025-04-15 Thread Andrey Borodin
one-CPU hosts for Zookeper\etcd. If you use build-in failover you have to resort to 3 big Postgres machines because you need 2/3 majority. Of course, you can install MySQL-stype arbiter - host that had no real PGDATA, only participates in voting. But this is a solution to problem induced by built-in autofailover. Best regards, Andrey Borodin.

Re: Built-in Raft replication

2025-04-15 Thread Andrey Borodin
nce properties. I'd start to design from here, not from Raft paper. Best regards, Andrey Borodin.

Re: New committer: Jacob Champion

2025-04-15 Thread Andrey Borodin
> On 12 Apr 2025, at 01:26, Jonathan S. Katz wrote: > > Please join us in wishing Jacob much success and few reverts! Congratulations, Jacob! Best regards, Andrey Borodin.

Re: Call for Posters: PGConf.dev 2025

2025-04-14 Thread Andrey Borodin
hink I’ll create a Telegram chat for quick feedback and so that I can show how posters look on the wall. > > On Sun, Apr 13, 2025 at 04:01:56PM +0500, Andrey Borodin wrote: >> The goal of the poster session is to visually present your patch or project >> on an A2-sized poster (ANS

Re: rounding_up

2025-04-14 Thread Andrey Borodin
ee from your data, rint() is consistent across OSes. Can user observe any inconsistency caused by rint() behavior in PostgreSQL? Thanks! Best regards, Andrey Borodin.

Call for Posters: PGConf.dev 2025

2025-04-13 Thread Andrey Borodin
ing collaboration: attracting coauthors, reviewers, maybe committers, improving the overall discussion, etc. Let me know if you would like to present your poster or have a question. Thank you for your ongoing contributions to PostgreSQL, and I look forward to hearing from you. Best rega

Re: [PATCH] Add sortsupport for range types and btree_gist

2025-04-03 Thread Andrey Borodin
> On 3 Apr 2025, at 16:13, Heikki Linnakangas wrote: > > Committed Cool! Thank you!!! Best regards, Andrey Borodin.

Re: UUID v7

2025-03-26 Thread Andrey Borodin
coincide for a false failure. Thank you! Best regards, Andrey Borodin.

Re: Using read_stream in index vacuum

2025-03-24 Thread Andrey Borodin
discussed here [1] 2. '+ERROR: tuple concurrently deleted' in injection_points/isolation seems to be discussed here [2] Thanks! Best regards, Andrey Borodin. [0] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-03-21%2019%3A09%3A59 [1] https://www.postg

Re: Using read_stream in index vacuum

2025-03-22 Thread Andrey Borodin
e posting list and streamify this as well. > > It's probably not worth it -- since we process the pending list for > each page of the index. My understanding is that pending lists should be small on real workloads. Thank you! Best regards, Andrey Borodin.

Re: Using read_stream in index vacuum

2025-03-21 Thread Andrey Borodin
> On 21 Mar 2025, at 05:54, Melanie Plageman wrote: > > On Wed, Mar 19, 2025 at 5:26 AM Andrey Borodin wrote: >> >> So, yes, your change to the test seems correct to me. We can do the test >> with just one injection point. > > Attached 0001 is what I pl

Re: Using read_stream in index vacuum

2025-03-19 Thread Andrey Borodin
safe, due to wait_counts in InjectionPointSharedState. So, yes, your change to the test seems correct to me. We can do the test with just one injection point. Best regards, Andrey Borodin.

Re: Using read_stream in index vacuum

2025-03-18 Thread Andrey Borodin
essed, not before. FWIW I do not insist on committing the test, it was mostly necessary to validate that backtracking still works. I could not check it manually. But other injection tests, surprisingly, seem to be stable enough across buildfarm. Best regards, Andrey Borodin. v9-0001

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-03-12 Thread Andrey Borodin
> On 12 Mar 2025, at 20:02, Evgeny Voropaev wrote: > v6 looks good to me. I'll flip the CF entry. Thanks! Best regards, Andrey Borodin.

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-03-11 Thread Andrey Borodin
if this function would better belong to SLRU than common XLog stuff. Besides this patch seems ready to me. Thanks! Best regards, Andrey Borodin.

Re: Get rid of WALBufMappingLock

2025-02-26 Thread Andrey Borodin
nditionVariableCancelSleep(); Won’t this sleep wait forever? I see about 20 other occurrences of similar code, so, perhaps, everything is fine. But I would greatly appreciate a little pointers on why it works. Best regards, Andrey Borodin.

Re: Spinlock can be released twice in procsignal.c

2025-02-26 Thread Andrey Borodin
when elog() was near, but now IMO we can have few words about what is going on. Best regards, Andrey Borodin.

Re: Spinlock can be released twice in procsignal.c

2025-02-25 Thread Andrey Borodin
> On 26 Feb 2025, at 00:34, Maksim.Melnikov wrote: > > In applied patch I removed spinlock release in if clause. Looks like the oversight in 9d9b9d4. IMO the fix is correct. Best regards, Andrey Borodin.

Re: Amcheck verification of GiST and GIN

2025-02-21 Thread Andrey Borodin
lot of time ironing out various false positives from GIN check. Kirill, what is your opinion about GIN verification? Does it look complete? (in a sense that it will not trigger false alarm, certainly it cannot catch all the type of corruptions) Thanks! Best regards, Andrey Borodin.

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-17 Thread Andrey Borodin
ctMemberPage, ZeroSUBTRANSPage) it means just a call to SimpleLruZeroPage(). I think we can safely replace + slotno = (*zerofunc)(pageno, false); with + slotno = SimpleLruZeroPage(pageno); Thus we will not need zerofunc argument at all. Thanks! Best regards, Andrey Borodin.

Re: Add Option To Check All Addresses For Matching target_session_attr

2025-02-16 Thread Andrey Borodin
conn->check_all_addrs[0] == '1') Let's make it like load balancing is done [4]. Finally, let's think about naming alternatives for "check_all_addrs". I think that's enough for a first round of the review. If it's not a bug, but a feature - it's a

Re: UUID v7

2025-02-09 Thread Andrey Borodin
uuid = generate_uuidv7(us / US_PER_MS, (us % US_PER_MS) * > NS_PER_US + ns % NS_PER_US); > > Need to update comments in uuidv7_internval() such as: > >/* > * Shift the current timestamp by the given interval. To calculate time > * shift correctly, we convert t

Re: Using Expanded Objects other than Arrays from plpgsql

2025-02-07 Thread Andrey Borodin
> On 7 Feb 2025, at 02:05, Tom Lane wrote: > > Do you have any further comments on this patch? No, all steps of the patch set look good to me. Best regards, Andrey Borodin.

Re: Using Expanded Objects other than Arrays from plpgsql

2025-02-03 Thread Andrey Borodin
p paramarg2. Best regards, Andrey Borodin. [0] https://github.com/wanglinn/xadb/blob/7695b7edcb0a89f3173b648c0da5b953538f2aa9/src/backend/pgxc/pool/execRemote.c#L835 [1] https://github.com/babelfish-for-postgresql/babelfish_extensions/blob/376cf488804fa02f9b1db5bbfbe74e98627fe96c/contrib/babelfishpg_tsql/src/pl_exec.c#L8030

Re: Using Expanded Objects other than Arrays from plpgsql

2025-02-03 Thread Andrey Borodin
> On 3 Feb 2025, at 22:36, Tom Lane wrote: > > I'm not wedded to that name; do you have a better idea? I'd propose something like attached. But feel free to ignore my suggestion: I do not understand context of these structure members. Best regards, Andrey Borodin. rena

Re: Using Expanded Objects other than Arrays from plpgsql

2025-02-03 Thread Andrey Borodin
the rest of the patch set. (Well, maybe paramarg2 resonates a bit, just from similarity with varchar2) ecpg tests seem to fail on Windows[0], but looks like it's not related to this thread. Best regards, Andrey Borodin. [0] https://cirrus-ci.com/task/4835794898124800

Re: UUID v7

2025-02-02 Thread Andrey Borodin
0:53.085+05 | 5001 years >> 6001 | 8026-01-31 12:00:53.085+05 | 6001 years >> 7001 | 9026-01-31 12:00:53.085+05 | 7001 years >> 8001 | 10026-01-31 12:00:53.085+05 | 8001 years >> (9 rows) or maybe something simple like with u as (select uuidv7() id) select uuid_extract_timestamp(uuidv7('-09-09 12:34:56.789+05' - uuid_extract_timestamp(u.id))) from u; But it would still be flaky, second call to uuidv7() can overflow a millisecond. Thanks! Best regards, Andrey Borodin. v2-0001-UUDv7-fix-offset-computations-in-dates-after-2262.patch Description: Binary data

Re: more backtraces

2025-02-01 Thread Andrey Borodin
diagnostics in case of production incidents. Thanks! Best regards, Andrey Borodin. v2-0001-Print-backtrace-on-SIGABRT-SIGBUS-SIGSEGV.patch Description: Binary data

Re: UUID v7

2025-01-30 Thread Andrey Borodin
01-31 12:00:53.085+05 | 5001 years 6001 | 8026-01-31 12:00:53.085+05 | 6001 years 7001 | 9026-01-31 12:00:53.085+05 | 7001 years 8001 | 10026-01-31 12:00:53.085+05 | 8001 years (9 rows) Best regards, Andrey Borodin. 0001-UUDv7-fix-offset-computations-in-dates-after-2262.patch Description: Binary data

Re: Compression of bigger WAL records

2025-01-30 Thread Andrey Borodin
shape before feature freeze. The chances of getting currently proposed approach to v18 seems slim either... I'm hesitating to register this patch on the CF. What do you think? Best regards, Andrey Borodin. v3-0001-Compress-big-WAL-records.patch Description: Binary data

Re: UUID v7

2025-01-30 Thread Andrey Borodin
xtra argument of generate_uuidv7()? Or, perhaps, leave things as they stand now? Thanks! Best regards, Andrey Borodin.

Re: Timeline issue if StartupXLOG() is interrupted right before end-of-recovery record is done

2025-01-28 Thread Andrey Borodin
ery good idea to retry promotion after returning online. The user will get unexpected splitbrain. Best regards, Andrey Borodin.

Re: Using Expanded Objects other than Arrays from plpgsql

2025-01-26 Thread Andrey Borodin
of ExprEvalStep. But void *paramarg and his friend void *paramarg2 are cryptic. They always have same type and same meaning, but have very generic names. I wonder if you plan similar optimizations for array_cat(), array_remove() etc? + a := a || a; -- not optimizable Why is it not optimizable? Because there is no support function, because array_cat() has no support function, or something else? Besides this, the patch looks good to me. Best regards, Andrey Borodin.

Re: Using Expanded Objects other than Arrays from plpgsql

2025-01-26 Thread Andrey Borodin
ve this optimization? Is it O(numer_of_arguments) of for every assignment execution? Thanks! Best regards, Andrey Borodin.

Re: Sample rate added to pg_stat_statements

2025-01-22 Thread Andrey Borodin
> There’s a typo in the commit message (ratio instead of rate). Besides this the patch looks ready for committer. Best regards, Andrey Borodin.

Re: Sort functions with specialized comparators

2025-01-14 Thread Andrey Borodin
nique, similar to v9. Looks good to me. Nice stats for some cleaning up 34 insertions(+), 48 deletions(-). Best regards, Andrey Borodin.

Re: Compression of bigger WAL records

2025-01-12 Thread Andrey Borodin
hanks! Also seems like I forgot to bump WAL_FILE_MAGIC… What do you think about proposed approach? Best regards, Andrey Borodin.

Re: Fix bank selection logic in SLRU

2024-12-27 Thread Andrey Borodin
> On 19 Dec 2024, at 20:48, Yura Sokolov wrote: > > Here's version with type change bits16 -> uint16 Thanks! This version looks good to me. I’ll mark the CF entry as RfC. Best regards, Andrey Borodin.

Re: transaction lost when delete clog file after normal shutdown

2024-12-23 Thread Andrey Borodin
st entries [0,1], where clog file corruption was discussed. See Emails section. Thanks! Best regards Andrey Borodin. [0] https://commitfest.postgresql.org/16/1462/ [1] https://commitfest.postgresql.org/51/4709/

Re: transaction lost when delete clog file after normal shutdown

2024-12-23 Thread Andrey Borodin
act log file. Best regards, Andrey Borodin.

Re: transaction lost when delete clog file after normal shutdown

2024-12-23 Thread Andrey Borodin
nd clog file missing, when database restart, it will > try to recover. And everything is ok > > So I think we may improve the database more reliable in some scenarios, e.g. > Only clog file corrupted or missing, like S1 I still do not get it. Why clog file would be missing? Best regards, Andrey Borodin.

Re: transaction lost when delete clog file after normal shutdown

2024-12-23 Thread Andrey Borodin
> On 23 Dec 2024, at 14:12, 章晨曦@易景科技 wrote: > > we simulate crash and clog file corrupt (delete the clog file) Clog file cannot disappear as a result of a crash. What makes you think otherwise? Best regards, Andrey Borodin.

Re: Fix bank selection logic in SLRU

2024-12-19 Thread Andrey Borodin
case of SLRU access. + bits16 nbanks; Perhaps, it’s not bits anymore. Also, is 64K banks ought enough for everybody? Best regards, Andrey Borodin.

Re: UUID v7

2024-12-17 Thread Andrey Borodin
tension might want to provide > a generator that guarantees monotonicity across backends. AFAIK extension pg_uuidv7 does not have this protection right now. But Florian might add it in future. Best regards, Andrey Borodin.

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-11-30 Thread Andrey Borodin
ld works. AFAIR there's plenty of other tests to verify that. Injection points seemed to me exactly the technogy that could help us to have tests for this patch. But at this point It looks like it's reasonable to take approach 1, as we did before. Best regards, Andrey Borodin.

Re: UUID v7

2024-11-26 Thread Andrey Borodin
x27;uuidv7()' for now. We can > rename it later if we find a better name. I think uuidv7() is kind of consensual. > I've attached the new version patch that incorporated all comments and > renamed the functions. Also I avoided using 'if defined(__darwin__) || > defined(_MSC_VER)' twice. Good, I think now it's a bit easier to understand those 2 bits. Thanks! Best regards, Andrey Borodin.

Re: glibc qsort() vulnerability

2024-02-09 Thread Andrey Borodin
o fetch even after a call instruction? These cpus are really neat things... so, probably, yes, it does. Best regards, Andrey Borodin.

Re: Transaction timeout

2024-01-31 Thread Andrey Borodin
> On 31 Jan 2024, at 14:27, Japin Li wrote: > > LGTM. > > If there is no other objections, I'll change it to ready for committer > next Monday. I think we have a quorum, so I decided to go ahead and flipped status to RfC. Thanks! Best regards, Andrey Borodin.

Re: MultiXact\SLRU buffers configuration

2024-01-26 Thread Andrey Borodin
> On 20 Jan 2024, at 08:31, vignesh C wrote: > > On Mon, 9 Jan 2023 at 09:49, Andrey Borodin wrote: >> >> On Tue, Jan 3, 2023 at 5:02 AM vignesh C wrote: >>> does not apply on top of HEAD as in [1], please post a rebased patch: >>> >> Thanks!

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-26 Thread Andrey Borodin
thing like that actually happens. If possible, I'd prefer one lock at a time, any maybe sometimes two-three with some guarantees that this is safe. So, from my POV first solution that you proposed seems much better to me. Thanks for working on this! Best regard, Andrey Borodin.

Re: UUID v7

2024-01-24 Thread Andrey Borodin
63c3741922a5 But again, UUIDs are not designed to store timestamp. They are unique and v7 promote data locality via time-ordering. Best regards, Andrey Borodin.

Re: UUID v7

2024-01-19 Thread Andrey Borodin
> On 19 Jan 2024, at 13:25, Andrey Borodin wrote: > > Also, I've added some documentation on all functions. Here's v12. Changes: 1. Documentation improvements 2. Code comments 3. Better commit message and reviews list Best regards, Andrey Borodin. v12-0001-Impl

Re: UUID v7

2024-01-19 Thread Andrey Borodin
the review. Well, that was intentional. But now I see it's kind of confusing behaviour. I've changed it to more expected version. Also, I've added some documentation on all functions. Best regards, Andrey Borodin. v11-0001-Implement-UUID-v7-as-per-IETF-draft.patch Description: Binary data

Re: UUID v7

2024-01-18 Thread Andrey Borodin
> On 18 Jan 2024, at 20:39, Andrey Borodin wrote: > > But 16455577420ns after 1582-10-15 00:00:00 UTC was 2022-02-22 19:22:22 > UTC. And that was 2022-02-23 00:22:22 in UTC-05. '2022-02-22 19:22:22 UTC' is exactly that moment which was encoded into example UU

Re: UUID v7

2024-01-18 Thread Andrey Borodin
. It is expected to be generated on "Tuesday, February 22, 2022 2:22:22.00 PM GMT-05:00". It's exaplained to be 16455577420ns after 1582-10-15 00:00:00 UTC. But 16455577420ns after 1582-10-15 00:00:00 UTC was 2022-02-22 19:22:22 UTC. And that was 2022-02-23 00:22:22 in UTC-05. Best regards, Andrey Borodin.

Re: UUID v7

2024-01-18 Thread Andrey Borodin
r when [var,ver,time] value is unknown. What is left: deal with timezones, improve documentation. Best regards, Andrey Borodin. [0] https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-example-of-a-uuidv1-value v10-0001-Implement-UUID-v7-as-per-IETF-draft.patch Description: Binary data

Re: UUID v7

2024-01-16 Thread Andrey Borodin
What do you think? Best regards, Andrey Borodin. v9-0001-Implement-UUID-v7-as-per-IETF-draft.patch Description: Binary data

Re: Proposal to add page headers to SLRU pages

2023-12-07 Thread Andrey Borodin
ld be moved to shared buffers as proposedelsewhere [1].Thread that I cited stopped in 2018 for this exact reason. 5 years ago. Is this argument still valid?Meanwhile checksums of buffer pages also reside on a page :)Best regards, Andrey Borodin.

Re: UUID v7

2023-10-09 Thread Andrey Borodin
quence rollover. Well, the current patch will just use now()+1ms when 2^18 is exhausted. Even if now() would be passed as an argument (however current patch does not support an argument). Best regards, Andrey Borodin.

Re: psql \watch 2nd argument: iteration count

2023-04-06 Thread Andrey Borodin
g the first result not \watch. I did not know that. Well, I knew it in parts, but did not understand as a whole. Thanks! Best regards, Andrey Borodin.

Re: Add "host" to startup packet

2023-04-02 Thread Andrey Borodin
lear what purpose new feature has, some documentation and test must be included. You can judge from recently committed libpq load balancing what it takes to add a connection option [0]. But, obviously, it makes sense to discuss it before going all the way of implementation.Best regards, Andrey Borodin.[0] https://github.com/postgres/postgres/commit/7f5b1981

Re: regression coverage gaps for gist and hash indexes

2023-03-31 Thread Andrey Borodin
I see that gistXLogPageDelete() is not exercised, and is worth fixing IMO. Simply adding 10x more data in gist.sql helps, but I think we can do something more clever... Best regards, Andrey Borodin.

Re: psql \watch 2nd argument: iteration count

2023-03-24 Thread Andrey Borodin
, as the past patch. Done. > > + > +If number of iterations is specified - query will be executed only > +given number of times. > + > > Is it common to use "-" here? I think using comma like > "If number of iterations is specified

Re: Amcheck verification of GiST and GIN

2023-03-17 Thread Andrey Borodin
of the box. Because it's an epsilon-comparison, ε=1.0E-06. GiST might miss newly inserted data, because the "adjusted" tuple was "same" if data is in proximity of 0.01 of any previously indexed point, but out of known MBRs. I'll try to reproduce this tomorrow, so far no luck. Best regards, Andrey Borodin.

Re: psql \watch 2nd argument: iteration count

2023-03-16 Thread Andrey Borodin
f changes is not reflected in the documentation. Done. > With an interval in place, we could now automate some tests with > \watch where it does not fail. What do you think about adding a test > with a simple query, an interval of 0s and one iteration? Done. Also found a bug that we actually were doing N+1 iterations. Thank you for working on this! Best regards, Andrey Borodin. v9-0001-Iteration-count-argument-to-psql-watch-command.patch Description: Binary data

Re: psql \watch 2nd argument: iteration count

2023-03-14 Thread Andrey Borodin
single message. I'd rather still keep the > three tests, though, as they check the three conditions upon which the > error would be triggered. PFA v8. Thanks! Best regards, Andrey Borodin. v8-0001-Fix-incorrect-argument-handling-in-psql-watch.patch Description: Binary data v8-0002-Add-

Re: psql \watch 2nd argument: iteration count

2023-03-13 Thread Andrey Borodin
On Mon, Mar 13, 2023 at 5:26 PM Michael Paquier wrote: > > I have tweaked things as bit as of the attached, and ran pgindent. > What do you think? > Looks good to me. Thanks! Best regards, Andrey Borodin.

Re: psql \watch 2nd argument: iteration count

2023-03-12 Thread Andrey Borodin
Michael, thanks for reviewing this! On Sun, Mar 12, 2023 at 6:17 PM Michael Paquier wrote: > > On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote: > > In the review above Kyotaro-san suggested that message should contain > > information on what it expects

Re: psql \watch 2nd argument: iteration count

2023-03-12 Thread Andrey Borodin
resetPQExpBuffer(query_buf); > + return PSQL_CMD_ERROR; > > Is this missing psql_scan_reset(scan_state)? Yes, fixed. Best regards, Andrey Borodin. v5-0002-Add-iteration-count-argument-to-psql-watch-comman.patch Description: Binary data v5-0001-Fix-incorrect-argument-handling-in-psql-watch.patch Description: Binary data

Re: psql \watch 2nd argument: iteration count

2023-03-08 Thread Andrey Borodin
it was available. > Yes, that makes sense! Thanks! Best regards, Andrey Borodin. v4-0002-Add-iteration-count-argument-to-psql-watch-comman.patch Description: Binary data v4-0001-Fix-incorrect-argument-handling-in-psql-watch.patch Description: Binary data

Re: [EXTERNAL] Re: Support load balancing in libpq

2023-03-02 Thread Andrey Borodin
sense in case of shuffling arrays inplace. It is important only for making a new copy of an array and only in languages that cannot access uninitialized values. I'd suggest just removing this line (in both cases). Best regards, Andrey Borodin.

Re: psql \watch 2nd argument: iteration count

2023-02-26 Thread Andrey Borodin
mes, I think we should do > the same for iteration counts. +1, done. > Additionally, we need to update the > documentation. Done. Thanks for the review! Best regards, Andrey Borodin. v3-0002-Add-iteration-count-argument-to-psql-watch-comman.patch Description: Binary data v3-0001-Fi

Re: psql \watch 2nd argument: iteration count

2023-02-20 Thread Andrey Borodin
t; That should probably be fixed. > > And should probably be independent patches. > PFA 2 independent patches. Also, I've fixed a place to break after an iteration. Now if we have e.g. 2 iterations - there will be only 1 sleep time. Thanks! Best regards, Andrey Borodin.

Re: [PATCH] Add pretty-printed XML output option

2023-02-16 Thread Andrey Borodin
nction protected from using external XML namespaces? What if the user passes some xmlns that will force it to read namespace data from the server filesystem? Or is it not possible? I see there are a lot of calls to xml_parse() anyway, but still... Best regards, Andrey Borodin.

psql \watch 2nd argument: iteration count

2023-02-16 Thread Andrey Borodin
Also, if we do not provide a timespan, 2 seconds are selected. But if we provide an incorrect argument - 1 second is selected. PFA the patch that adds iteration count argument and makes timespan argument more consistent. What do you think? Best regards, Andrey Borodin. 0001-Add-iteration-count-arg

Re: Add connection active, idle time to pg_stat_activity

2023-02-16 Thread Andrey Borodin
ink we can have some test that verifies delta for select some_counter from pg_stat_session where pid = pg_backend_pid(); 4. Macroses like PGSTAT_IS_RUNNING do not look like net win in code readability and PGSTAT prefix have no semantic load. That's all I've found so far. Thank you! Best r

Re: Silent overflow of interval type

2023-02-15 Thread Andrey Borodin
low checks in the nearby code of timestamp.c, I'd say that this case should not be an exception. By chance did you look at all other nearby cases, is it the only place with overflow? (I took a look too, but haven't found anything suspicious) Best regards, Andrey Borodin.

Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS

2023-02-13 Thread Andrey Borodin
atter only when called gazillion times per second. Best regards, Andrey Borodin. for godbolt.cpp Description: Binary data

Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS

2023-02-13 Thread Andrey Borodin
's > already quite expensive... > I think collection of instrumentation is done unconditionally. We always do that pgBufferUsage.shared_blks_hit++; when the buffer is in shared_buffers. Best regards, Andrey Borodin.

Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS

2023-02-13 Thread Andrey Borodin
t;evictions" caused by query, but they have little practical sense too. All in all I do not have an opinion if this feature is a good tradeoff. What do you think? Does the feature look useful? Do we want a more polished implementation? Thanks! Best regards, Andrey Borodin. v1-0001-Split-EXPLAIN-ANALYZE-BUFFERS-by-RelKind.patch Description: Binary data

Re: pglz compression performance, take two

2023-02-13 Thread Andrey Borodin
hould just reject it and I'll get back to this during summer. Best regards, Andrey Borodin.

Re: UUID v7

2023-02-10 Thread Andrey Borodin
does not bring value to users. However, I agree that eager users can just have it today as an extension and be happy with it [0]. Maybe it's fine to wait a year for others... Best regards, Andrey Borodin. [0] https://github.com/x4m/pg_uuid_next

UUID v7

2023-02-10 Thread Andrey Borodin
er R. Davis, authors of the standard cc Kirk Wolak and Nik Samokhvalov who requested the feature Thanks! Best regards, Andrey Borodin. [0] https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04 v1-0001-Implement-UUID-v7-as-per-IETF-draft.patch Description: Binary data

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Andrey Borodin
00}' to get a commit by date from rev-parse. Best regards, Andrey Borodin.

Re: pglz compression performance, take two

2023-02-06 Thread Andrey Borodin
dd case. And so far I failed to extract input\outputs of that odd case, because it is buried under so many layers of abstraction and affects only late stats. Maybe the problem is not in compression at all... Best regards, Andrey Borodin.

Re: pglz compression performance, take two

2023-02-05 Thread Andrey Borodin
On Sun, Feb 5, 2023 at 5:51 PM Tomas Vondra wrote: > > On 2/5/23 19:36, Andrey Borodin wrote: > > On Fri, Jan 6, 2023 at 10:02 PM Andrey Borodin > > wrote: > >> > >> Hello! Please find attached v8. > > > > I got some interesting feedback from s

Re: pglz compression performance, take two

2023-02-05 Thread Andrey Borodin
On Fri, Jan 6, 2023 at 10:02 PM Andrey Borodin wrote: > > Hello! Please find attached v8. I got some interesting feedback from some patch users. There was an oversight that frequently yielded results that are 1,2 or 3 bytes longer than expected. Looking closer I found that the correctness

Re: Amcheck verification of GiST and GIN

2023-02-04 Thread Andrey Borodin
st future. Here's the current version. Thank you! Best regards, Andrey Borodin. v23-0001-Refactor-amcheck-to-extract-common-locking-routi.patch Description: Binary data v23-0002-Add-gist_index_check-function-to-verify-GiST-ind.patch Description: Binary data v23-0003-Add-gin_index_par

Re: How to implement read operations for my own access method?

2023-02-04 Thread Andrey Borodin
nology. Also, you can see my free lectures about details of implementation of built-in access methods [2]. Also, I can offer you my PGCon talk "Index DIY" about forking GiST into extension [3]. Thank you! Best regards, Andrey Borodin. [0] https://www.postgresql.org/docs/current/xinde

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-02-04 Thread Andrey Borodin
t is the new parent of the deleted page. Even then we cannot end up with infinite index scan - we will just make one extra loop. Although, IndexScan will yield duplicate tids. In case of interference with concurrent insertion we will get a tree structure departed from optimal, but that is not a problem. Best regards, Andrey Borodin.

Re: Something is wrong with wal_compression

2023-01-27 Thread Andrey Borodin
prepared xacts. Best regards, Andrey Borodin.

Re: Something is wrong with wal_compression

2023-01-26 Thread Andrey Borodin
ss or, maybe, add an amcheck run. As far as I recollect, this test was introduced to test this new function in 857ee8e391f. Best regards, Andrey Borodin.

Re: Something is wrong with wal_compression

2023-01-26 Thread Andrey Borodin
e(x integer);". Best regards, Andrey Borodin. [0] https://www.postgresql.org/message-id/flat/565FB155-C6B0-41E2-8C44-7B514DC25132%2540yandex-team.ru [1] https://www.postgresql.org/message-id/flat/20210313012820.GJ29463%40telsasoft.com#0f18d3a4d593ea656fdc761e026fee81

Re: Experiments with Postgres and SSL

2023-01-18 Thread Andrey Borodin
possible first bytes that clearly indicates that this is a TLS connection or not? Best regards, Andrey Borodin.

  1   2   3   4   5   6   7   >