Re: Failures in constraints regression test, "read only 0 of 8192 bytes"

2024-03-09 Thread Thomas Munro
On Sun, Mar 10, 2024 at 6:48 PM Thomas Munro wrote: > I won't be surprised if the answer is: if you're holding a reference, > you have to get a pin (referring to bulk_write.c). Ahhh, on second thoughts, I take that back, I think the original theory still actually works just fine. It's just that

Re: Failures in constraints regression test, "read only 0 of 8192 bytes"

2024-03-09 Thread Thomas Munro
On Sun, Mar 10, 2024 at 5:02 PM Thomas Munro wrote: > Thanks, reproduced here (painfully slowly). Looking... I changed that ERROR to a PANIC and now I can see that _bt_metaversion() is failing to read a meta page (block 0), and the file is indeed of size 0 in my filesystem. Which is not cool, f

Re: Allow non-superuser to cancel superuser tasks.

2024-03-09 Thread Leung, Anthony
Another comment that I forgot to mention is that we should also make the documentation change in doc/src/sgml/user-manag.sgml for this new predefined role Thanks. -- Anthony Leung Amazon Web Services: https://aws.amazon.com

Re: Allow non-superuser to cancel superuser tasks.

2024-03-09 Thread Leung, Anthony
Hi, I'm new to reviewing postgres patches, but I took an interest in reviewing this patch as recommended by Nathan. I have the following comments: > if (!superuser()) { > if (!OidIsValid(proc->roleId)) { > LocalPgBackendStatus *local_beentry; >

Re: Failures in constraints regression test, "read only 0 of 8192 bytes"

2024-03-09 Thread Thomas Munro
On Sat, Mar 9, 2024 at 9:48 AM Tomas Vondra wrote: > I spent a bit of time investigating this today, but haven't made much > progress due to (a) my unfamiliarity with the smgr code in general and > the patch in particular, and (b) CLOBBER_CACHE_ALWAYS making it quite > time consuming to iterate an

Re: Add checkpoint/redo LSNs to recovery errors.

2024-03-09 Thread David Steele
On 2/29/24 16:42, Michael Paquier wrote: On Thu, Feb 29, 2024 at 10:53:15AM +1300, David Steele wrote: This patch adds checkpoint/redo LSNs to recovery error messages where they may be useful for debugging. I've scanned a bit xlogrecovery.c, and I have spotted a couple of that could gain more

Re: Add recovery to pg_control and remove backup_label

2024-03-09 Thread David Steele
On 1/29/24 12:28, David Steele wrote: On 1/28/24 19:11, Michael Paquier wrote: On Fri, Jan 26, 2024 at 06:27:30PM +0530, vignesh C wrote: Please post an updated version for the same. [1] - http://cfbot.cputube.org/patch_46_3511.log With the recent introduction of incremental backups that dep

Re: Vectored I/O in bulk_write.c

2024-03-09 Thread Thomas Munro
Slightly better version, adjusting a few obsoleted comments, adjusting error message to distinguish write/extend, fixing a thinko in smgr_cached_nblocks maintenance. From c786f979b0c38364775e32b9403b79303507d37b Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sat, 9 Mar 2024 16:04:21 +1300 Subje

Vectored I/O in bulk_write.c

2024-03-09 Thread Thomas Munro
Hi, I was trying to learn enough about the new bulk_write.c to figure out what might be going wrong over at [1], and finished up doing this exercise, which is experiment quality but passes basic tests. It's a bit like v1-0013 and v1-0014's experimental vectored checkpointing from [2] (which thems

Re: Extract numeric filed in JSONB more effectively

2024-03-09 Thread Andy Fan
>> But I have a different question about this patch set. This has some >> overlap with the JSON_VALUE function that is being discussed at >> [0][1]. For example, if I apply the patch >> v39-0001-Add-SQL-JSON-query-functions.patch from that thread, I can run >> >> select count(*) from tb where js

Re: remaining sql/json patches

2024-03-09 Thread Andy Fan
jian he writes: > On Tue, Mar 5, 2024 at 12:38 PM Andy Fan wrote: >> >> >> In the commit message of 0001, we have: >> >> """ >> Both JSON_VALUE() and JSON_QUERY() functions have options for >> handling EMPTY and ERROR conditions, which can be used to specify >> the behavior when no values are

Re: Improving contrib/tablefunc's error reporting

2024-03-09 Thread Joe Conway
On 3/9/24 15:39, Tom Lane wrote: Joe Conway writes: On 3/9/24 13:07, Tom Lane wrote: BTW, while I didn't touch it here, it seems fairly bogus that connectby() checks both type OID and typmod for its output columns while crosstab() only checks type OID. I think crosstab() is in the wrong and n

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-09 Thread Melanie Plageman
Thanks so much for the review! On Wed, Mar 6, 2024 at 7:59 AM Heikki Linnakangas wrote: > > On 25/01/2024 00:49, Melanie Plageman wrote: > > > The attached patch set is broken up into many separate commits for > > ease of review. Each patch does a single thing which can be explained > > plainly i

Re: Improving contrib/tablefunc's error reporting

2024-03-09 Thread Tom Lane
Joe Conway writes: > On 3/9/24 13:07, Tom Lane wrote: >>> BTW, while I didn't touch it here, it seems fairly bogus that >>> connectby() checks both type OID and typmod for its output >>> columns while crosstab() only checks type OID. I think >>> crosstab() is in the wrong and needs to be checking

Re: Improving contrib/tablefunc's error reporting

2024-03-09 Thread Joe Conway
On 3/9/24 13:07, Tom Lane wrote: Joe Conway writes: On 3/5/24 17:04, Tom Lane wrote: After reading the thread at [1], I could not escape the feeling that contrib/tablefunc's error reporting is very confusing. The changes all look good to me and indeed more consistent with the docs. Do you w

Re: Improving contrib/tablefunc's error reporting

2024-03-09 Thread Tom Lane
Joe Conway writes: > On 3/5/24 17:04, Tom Lane wrote: >> After reading the thread at [1], I could not escape the feeling >> that contrib/tablefunc's error reporting is very confusing. > The changes all look good to me and indeed more consistent with the docs. > Do you want me to push these? If so

Re: Improving contrib/tablefunc's error reporting

2024-03-09 Thread Joe Conway
On 3/5/24 17:04, Tom Lane wrote: After reading the thread at [1], I could not escape the feeling that contrib/tablefunc's error reporting is very confusing. Looking into the source code, I soon found that it is also very inconsistent, with similar error reports being phrased quite differently. T

Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'

2024-03-09 Thread Kambam Vinay
Hi, We observed a slight lag in timestamp for a few logs from the emit_log_hook hook implementation when the log_line_prefix GUC has '%m'. Upon debugging, we found that the saved_timeval_set variable is set to 'true' in get_formatted_log_time() but is not reset to 'false' until the next call to s

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-03-09 Thread Nathan Bossart
On Sat, Mar 09, 2024 at 11:57:18AM +0900, Yugo NAGATA wrote: > On Fri, 8 Mar 2024 16:17:58 -0600 > Nathan Bossart wrote: >> Is this guaranteed to be TOASTed for all possible page sizes? > > Should we use block_size? > > SHOW block_size \gset > INSERT INTO test_chunk_id(v1,v2) > VALUES (repea

Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

2024-03-09 Thread Magnus Hagander
On Fri, Dec 22, 2023 at 11:04 PM Alexander Korotkov wrote: > > Hi, Anton! > > On Mon, Dec 4, 2023 at 3:50 AM Anton A. Melnikov > wrote: >> >> Thanks for remarks! >> >> On 28.11.2023 21:34, Alexander Korotkov wrote: >> > After examining the second patch >> > ("v2-0001-Add-restartpoint-stats.patch

Re: postgres_fdw test timeouts

2024-03-09 Thread Nathan Bossart
On Sat, Mar 09, 2024 at 10:00:00AM +0300, Alexander Lakhin wrote: > I have re-run the tests and found out that the issue was fixed by > d3c5f37dd. It changed the inner of the loop "while (PQisBusy(conn))", > formerly contained in pgfdw_get_result() as follows: >            /* Data available in

Re: Support "Right Semi Join" plan shapes

2024-03-09 Thread Alena Rybakina
On 06.03.2024 05:23, wenhui qiu wrote: Hi Alena Rybakina For merge join + /* + * For now we do not support RIGHT_SEMI join in mergejoin. + */ + if (jointype == JOIN_RIGHT_SEMI) + { + *mergejoin_allowed = false; + return NIL; + }

Re: Improving EXPLAIN's display of SubPlan nodes

2024-03-09 Thread Dean Rasheed
On Fri, 16 Feb 2024 at 19:39, Tom Lane wrote: > > > So now I'm thinking that we do have enough detail in the present > > proposal, and we just need to think about whether there's some > > nicer way to present it than the particular spelling I used here. > One thing that concerns me about making e

Re: Reducing the log spam

2024-03-09 Thread Laurenz Albe
On Thu, 2024-03-07 at 08:30 +0100, Laurenz Albe wrote: > On Wed, 2024-03-06 at 17:33 -0500, Isaac Morland wrote: > > I have two questions about this: > > > > First, can it be done per role? If I have a particular application which is > > constantly throwing some particular error, I might want to s

Re: Make query cancellation keys longer

2024-03-09 Thread Jelte Fennema-Nio
On Fri, 8 Mar 2024 at 23:20, Heikki Linnakangas wrote: > Added some documentation. There's more work to be done there, but at > least the message type descriptions are now up-to-date. Thanks, that's very helpful. > The nice thing about relying on the message length was that we could > just redef