Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed

2024-06-09 Thread Michael Paquier
On Mon, Jun 10, 2024 at 06:29:17AM +, Bertrand Drouvot wrote: > Thanks for the report! I think it makes sense to add it to the list of known > failures. > > One way to deal with those corner cases could be to make use of injection > points > around places where RUNNING_XACTS is emitted, thoug

Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed

2024-06-09 Thread Bertrand Drouvot
Hi Alexander, On Sat, Jun 08, 2024 at 07:00:00AM +0300, Alexander Lakhin wrote: > Hello Bertrand and Michael, > > 23.01.2024 11:07, Bertrand Drouvot wrote: > > On Tue, Jan 23, 2024 at 02:50:06PM +0900, Michael Paquier wrote: > > > > > Anyway, that's not the end of it. What should we do for snap

Re: Things I don't like about \du's "Attributes" column

2024-06-09 Thread Kyotaro Horiguchi
At Sat, 8 Jun 2024 14:09:11 -0400, Robert Haas wrote in > On Sat, Jun 8, 2024 at 10:02 AM Pavel Luzanov > wrote: > > Therefore, I think the current patch offers a better version of the \du > > command. > > However, I admit that these improvements are not enough to accept the patch. > > I would

Re: Logical Replication of sequences

2024-06-09 Thread Masahiko Sawada
On Fri, Jun 7, 2024 at 7:30 PM Amit Kapila wrote: > > On Fri, Jun 7, 2024 at 7:55 AM Masahiko Sawada wrote: > > > > On Thu, Jun 6, 2024 at 6:40 PM Amit Kapila wrote: > > > > > > On Thu, Jun 6, 2024 at 11:10 AM Masahiko Sawada > > > wrote: > > > > > > > > On Wed, Jun 5, 2024 at 9:30 PM Amit Kap

Re: Injection points: preloading and runtime arguments

2024-06-09 Thread Michael Paquier
On Sat, Jun 08, 2024 at 04:52:25PM +0500, Andrey M. Borodin wrote: > Alvaro, here’s the test for multixact CV sleep that I was talking > about on PGConf. > It is needed to test [0]. It is based on loaded injection > points. > This technique is not committed yet, but the patch looks good. OK, cool

Track the amount of time waiting due to cost_delay

2024-06-09 Thread Bertrand Drouvot
Hi hackers, During the last pgconf.dev I attended Robert’s presentation about autovacuum and it made me remember of an idea I had some time ago: $SUBJECT Please find attached a patch doing so by adding a new field (aka "time_delayed") to the pg_stat_progress_vacuum view. Currently one can chang

Re: Remove dependence on integer wrapping

2024-06-09 Thread Tom Lane
Nathan Bossart writes: > On Sun, Jun 09, 2024 at 09:57:54PM -0400, Tom Lane wrote: >> I think you could replace the whole thing by using overflow-aware >> multiplication and addition primitives in the result calculation. > I was still confused by the comment about 1999, but I tracked it down to >

Re: Remove dependence on integer wrapping

2024-06-09 Thread Nathan Bossart
On Sun, Jun 09, 2024 at 09:57:54PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Sun, Jun 09, 2024 at 04:59:22PM -0400, Joseph Koshakow wrote: >>> The following comment was in the code for parsing timestamps: >>> /* check for just-barely overflow (okay except time-of-day wraps) */ >>> /* c

Re: Assert in heapgettup_pagemode() fails due to underlying buffer change

2024-06-09 Thread Thomas Munro
I adjusted the code a bit more to look like the 16 coding including restoring some very useful comments that had been lost, and pushed. Thanks very much to Alexander and Noah for (independently) chasing this down and reporting, testing etc, and Alvaro and Robert for review comments. (Passing thou

Re: CheckMyDatabase some error messages in two lines.

2024-06-09 Thread Tom Lane
Nathan Bossart writes: > On Mon, Jun 10, 2024 at 08:00:00AM +0800, jian he wrote: >> - errdetail("The database was initialized with >> LC_COLLATE \"%s\", " >> - " which is not recognized by >> setlocale().", collate), >> +

Re: CheckMyDatabase some error messages in two lines.

2024-06-09 Thread Nathan Bossart
On Mon, Jun 10, 2024 at 08:00:00AM +0800, jian he wrote: > https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-FORMATTING > "Don't end a message with a newline." > > > accidentally, I found some error messages in the function > CheckMyDatabase spread into two lines. > s

Re: Remove dependence on integer wrapping

2024-06-09 Thread Tom Lane
Nathan Bossart writes: > On Sun, Jun 09, 2024 at 04:59:22PM -0400, Joseph Koshakow wrote: >> The following comment was in the code for parsing timestamps: >> /* check for just-barely overflow (okay except time-of-day wraps) */ >> /* caution: we want to allow 1999-12-31 24:00:00 */ >> >> I wasn't

Re: Remove dependence on integer wrapping

2024-06-09 Thread Nathan Bossart
On Sun, Jun 09, 2024 at 04:59:22PM -0400, Joseph Koshakow wrote: > I originally added the helper functions to int.h thinking I'd find > many more instances of overflow due to integer negation, however I > didn't find that many. So let me know if you think we'd be better > off without the functions.

CheckMyDatabase some error messages in two lines.

2024-06-09 Thread jian he
hi. https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-FORMATTING "Don't end a message with a newline." accidentally, I found some error messages in the function CheckMyDatabase spread into two lines. so i try to consolidate them into one line. diff --git a/src/backend

Remove dependence on integer wrapping

2024-06-09 Thread Joseph Koshakow
Hi, In [0] Andres suggested enabling -ftrapv in assert enabled builds. While I vastly underestimated the complexity of updating `configure` to do this, I was able to enable the flag locally. Enabling this flag causes our existing regression tests to trap and fail in multiple different spots. The a

Re: Wrong security context for deferred triggers?

2024-06-09 Thread Joseph Koshakow
On Sat, Jun 8, 2024 at 10:13 PM Isaac Morland wrote: > Speaking as a table owner, when I set a trigger on it, I expect that when the specified actions occur my trigger will fire and will do what I specify, without regard to the execution environment of the caller (search_path in particular); and

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-09 Thread Nathan Bossart
On Thu, Jun 06, 2024 at 02:51:42PM -0500, Nathan Bossart wrote: > On Thu, Jun 06, 2024 at 03:31:53PM -0400, Robert Haas wrote: >> I do think the name could use some more thought, though. >> semaphores_required would end up being the same kind of thing as >> shared_memory_size_in_huge_pages, but the

Re: Show WAL write and fsync stats in pg_stat_io

2024-06-09 Thread Nitin Jadhav
> If possible, let's have all the I/O stats (even for WAL) in > pg_stat_io. Can't we show the WAL data we get from buffers in the hits > column and then have read_bytes or something like that to know the > amount of data read? The ‘hits’ column in ‘pg_stat_io’ is a vital indicator for adjusting a

Format the code in xact_decode

2024-06-09 Thread cca5507
Hello hackers, just as the title says: 1. Remove redundant parentheses. 2. Adjust the position of the break statement. -- Regards, ChangAo Chen 0001-Format-the-code-in-xact_decode.patch Description: Binary data

Re: Fix grammar oddities in comments

2024-06-09 Thread Aaron Altman
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Confirming linguistic correctness of changes, and lack of anything changed o

The content of the column_name field in the error response for a constraint violation

2024-06-09 Thread arkhipov . nr
Hi, I noticed that the error response for a constraint violation only contains the column name for not-null constraints. I'm confused because the field isn't present when other types of constraints are triggered, such as unique, foreign keys, and check constraints. Was this done intentionally b

Re: Windows: openssl & gssapi dislike each other

2024-06-09 Thread Imran Zaheer
Hi I am submitting two new patches. We can undefine the macro at two locations 1). As be-secure-openssl.c [1] was the actual file where the conflict happened so I undefined the macro here before the ssl includes. I changed the comment a little to make it understandable. I am also attaching the er