Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-10-01 Thread Noah Misch
On Tue, Oct 01, 2024 at 11:55:48AM -0700, Masahiko Sawada wrote: > On Mon, Sep 30, 2024 at 11:49 AM Noah Misch wrote: > > This has initdb set the field to the current C implementation's signedness. > > I > > wonder if, instead, initdb should set signedness=true unco

Re: Inval reliability, especially for inplace updates

2024-09-30 Thread Noah Misch
Rebased. Author: Noah Misch Commit: Noah Misch For inplace update, send nontransactional invalidations. The inplace update survives ROLLBACK. The inval didn't, so another backend's DDL could then update the row without incorporating the inplace update. I

Re: AIO v2.0

2024-09-30 Thread Noah Misch
On Mon, Sep 30, 2024 at 10:49:17AM -0400, Andres Freund wrote: > We also discussed the topic at > https://postgr.es/m/20240925020022.c5.nmisch%40google.com > > ... neither BM_SETTING_HINTS nor keeping bounce buffers looks like a bad > > decision. From what I've heard so far of the performance eff

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-30 Thread Noah Misch
On Wed, Sep 25, 2024 at 03:46:27PM -0700, Masahiko Sawada wrote: > On Wed, Sep 18, 2024 at 6:46 PM Noah Misch wrote: > > On Tue, Sep 17, 2024 at 09:43:41PM -0700, Masahiko Sawada wrote: > > > On Mon, Sep 16, 2024 at 9:24 AM Noah Misch wrote: > > > > On Thu, Se

Re: Primary and standby setting cross-checks

2024-09-24 Thread Noah Misch
On Thu, Aug 29, 2024 at 09:52:06PM +0300, Heikki Linnakangas wrote: > Currently, if you configure a hot standby server with a smaller > max_connections setting than the primary, the server refuses to start up: > > LOG: entering standby mode > FATAL: recovery aborted because of insufficient param

Re: AIO writes vs hint bits vs checksums

2024-09-24 Thread Noah Misch
On Tue, Sep 24, 2024 at 04:30:25PM -0400, Andres Freund wrote: > On 2024-09-24 12:43:40 -0700, Noah Misch wrote: > > On Tue, Sep 24, 2024 at 11:55:08AM -0400, Andres Freund wrote: > > > Besides that, the need to copy the buffers makes checkpoints with AIO > > > noticeabl

Re: race condition in pg_class

2024-09-24 Thread Noah Misch
On Thu, Sep 19, 2024 at 02:33:46PM -0700, Noah Misch wrote: > On Mon, Sep 09, 2024 at 10:55:32AM +0530, Nitin Motiani wrote: > > On Sat, Sep 7, 2024 at 12:25 AM Noah Misch wrote: > > > https://commitfest.postgresql.org/49/5090/ remains in status="Needs > > > revi

Re: Recovering from detoast-related catcache invalidations

2024-09-24 Thread Noah Misch
On Sun, Jan 14, 2024 at 12:14:11PM -0800, Noah Misch wrote: > On Fri, Jan 12, 2024 at 03:47:13PM -0500, Tom Lane wrote: > > Oh! After nosing around a bit more I remembered systable_recheck_tuple, > > which is meant for exactly this purpose. So v4 attached. > > systable_rec

Re: AIO writes vs hint bits vs checksums

2024-09-24 Thread Noah Misch
On Tue, Sep 24, 2024 at 11:55:08AM -0400, Andres Freund wrote: > So far the AIO patchset has solved this by introducing a set of "bounce > buffers", which can be acquired and used as the source/target of IO when doing > it in-place into shared buffers isn't viable. > > I am worried about that solu

Re: pgsql: Don't enter parallel mode when holding interrupts.

2024-09-20 Thread Noah Misch
On Thu, Sep 19, 2024 at 09:25:05AM -0400, Robert Haas wrote: > On Wed, Sep 18, 2024 at 3:27 AM Laurenz Albe wrote: > > On Wed, 2024-09-18 at 02:58 +0000, Noah Misch wrote: > > > Don't enter parallel mode when holding interrupts. > > > > > > Doing s

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-18 Thread Noah Misch
On Tue, Sep 17, 2024 at 09:43:41PM -0700, Masahiko Sawada wrote: > On Mon, Sep 16, 2024 at 9:24 AM Noah Misch wrote: > > On Thu, Sep 12, 2024 at 03:42:48PM -0700, Masahiko Sawada wrote: > > > On Tue, Sep 10, 2024 at 3:05 PM Noah Misch wrote: > > > > On Tue, Sep 10,

Re: AIO v2.0

2024-09-17 Thread Noah Misch
On Mon, Sep 16, 2024 at 01:51:42PM -0400, Andres Freund wrote: > On 2024-09-16 07:43:49 -0700, Noah Misch wrote: > > On Fri, Sep 06, 2024 at 03:38:16PM -0400, Andres Freund wrote: > > Reattaching descriptors and memory in each child may work, or one could just > > block io_

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-16 Thread Noah Misch
On Thu, Sep 12, 2024 at 03:42:48PM -0700, Masahiko Sawada wrote: > On Tue, Sep 10, 2024 at 3:05 PM Noah Misch wrote: > > On Tue, Sep 10, 2024 at 05:56:47PM -0400, Tom Lane wrote: > > > Got it. So now I'm wondering if we need all the complexity of storing > > > st

Re: AIO v2.0

2024-09-16 Thread Noah Misch
On Fri, Sep 06, 2024 at 03:38:16PM -0400, Andres Freund wrote: > There's plenty more to do, but I thought this would be a useful checkpoint. I find patches 1-5 are Ready for Committer. > +typedef enum PgAioHandleState This enum clarified a lot for me, so I wish I had read it before anything else

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2024-09-13 Thread Noah Misch
On Wed, Sep 11, 2024 at 09:00:33AM -0400, Robert Haas wrote: > On Tue, Sep 10, 2024 at 4:58 PM Noah Misch wrote: > > ... a rule of "each wait event appears in one > > pgstat_report_wait_start()" would be a rule I don't want. > > As the original committer of

Re: Use read streams in pg_visibility

2024-09-11 Thread Noah Misch
On Wed, Sep 11, 2024 at 09:19:09AM +0300, Nazir Bilal Yavuz wrote: > On Wed, 11 Sept 2024 at 01:38, Noah Misch wrote: > > I also fixed the mix of tabs and spaces inside test file string literals. > > I ran both pgindent and pgperltidy but they didn't catch them. Is > th

Re: Windows socket problems, interesting connection to AIO

2024-09-10 Thread Noah Misch
On Mon, Sep 02, 2024 at 09:20:21PM +1200, Thomas Munro wrote: > 2. If a Windows client tries to send() and gets an ECONNRESET/EPIPE > error, then the network stack seems to drop already received data, so > a following recv() will never see it. In other words, it depends on > whether the applicati

Re: Use read streams in pg_visibility

2024-09-10 Thread Noah Misch
On Tue, Sep 10, 2024 at 02:35:46PM +0300, Nazir Bilal Yavuz wrote: > Your patch is correct. I wrongly assumed it would catch blockno bug, > the attached version catches it. I made blockno = 0 invisible and not > frozen before copying the vm file. So, in the blockno buggy version; > callback will sk

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-10 Thread Noah Misch
On Tue, Sep 10, 2024 at 05:56:47PM -0400, Tom Lane wrote: > Masahiko Sawada writes: > > On Tue, Sep 10, 2024 at 11:57 AM Tom Lane wrote: > >> Yeah, that seems like it could work. But are we sure that replicas > >> get a copy of the primary's control file rather than creating their > >> own? > >

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2024-09-10 Thread Noah Misch
On Tue, Sep 10, 2024 at 02:51:23PM -0400, Robert Haas wrote: > On Tue, Sep 10, 2024 at 1:27 PM Noah Misch wrote: > > On Tue, Sep 10, 2024 at 02:29:57PM +0900, Michael Paquier wrote: > > > You are adding twelve event points with only 5 > > > new wait names. Couldn'

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2024-09-10 Thread Noah Misch
On Tue, Sep 10, 2024 at 02:29:57PM +0900, Michael Paquier wrote: > You are adding twelve event points with only 5 > new wait names. Couldn't it be better to have a one-one mapping > instead, adding twelve entries in wait_event_names.txt? No, I think the patch's level of detail is better. One sho

Re: Use read streams in pg_visibility

2024-09-09 Thread Noah Misch
On Mon, Sep 09, 2024 at 06:25:07PM +0300, Nazir Bilal Yavuz wrote: > On Thu, 5 Sept 2024 at 18:54, Noah Misch wrote: > > On Thu, Sep 05, 2024 at 03:59:53PM +0300, Nazir Bilal Yavuz wrote: > > > On Wed, 4 Sept 2024 at 21:43, Noah Misch wrote: > >

Re: Yet another way for pg_ctl stop to fail on Windows

2024-09-08 Thread Noah Misch
On Sun, Sep 08, 2024 at 06:00:00PM +0300, Alexander Lakhin wrote: > 07.09.2024 21:11, Noah Misch wrote: > > > Noah, what do you think of handling this error in line with handling of > > > ERROR_BROKEN_PIPE and ERROR_BAD_PIPE (which was done in 0ea1f2a3a)? > > > >

Re: Yet another way for pg_ctl stop to fail on Windows

2024-09-07 Thread Noah Misch
On Sat, Sep 07, 2024 at 03:00:00PM +0300, Alexander Lakhin wrote: > With extra logging added, I got: > ### Stopping node "CIC_2PC_test" using mode fast > # Running: pg_ctl -D > C:\src\postgresql\build/testrun/amcheck_3/003_cic_2pc\data/t_003_cic_2pc_CIC_2PC_test_data/pgdata > -m fast stop > waitin

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-06 Thread Noah Misch
On Fri, Sep 06, 2024 at 07:37:09PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Fri, Sep 06, 2024 at 06:36:53PM -0400, Tom Lane wrote: > >> I feel like all of these are leaning heavily on users to get it right, > > > What do you have in mind? I see things for th

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-06 Thread Noah Misch
On Fri, Sep 06, 2024 at 06:36:53PM -0400, Tom Lane wrote: > Noah Misch writes: > > Yes, that's one way to make it work. If we do it that way, it would be > > critical to make the ALTER EXTENSION UPDATE run before anything uses the > > index. Otherwise, we'll run

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-09-06 Thread Noah Misch
On Fri, Sep 06, 2024 at 02:07:10PM -0700, Masahiko Sawada wrote: > On Fri, Aug 30, 2024 at 8:10 PM Noah Misch wrote: > > On Thu, Aug 29, 2024 at 03:48:53PM -0500, Masahiko Sawada wrote: > > > On Sun, May 19, 2024 at 6:46 AM Noah Misch wrote: > > > > If I were stand

Re: race condition in pg_class

2024-09-06 Thread Noah Misch
On Fri, Sep 06, 2024 at 03:22:48PM +0530, Nitin Motiani wrote: > Thanks. I have no other comments. https://commitfest.postgresql.org/49/5090/ remains in status="Needs review". When someone moves it to status="Ready for Committer", I will commit inplace090, inplace110, and inplace120 patches. If o

Re: race condition in pg_class

2024-09-05 Thread Noah Misch
On Thu, Sep 05, 2024 at 07:10:04PM +0530, Nitin Motiani wrote: > On Thu, Sep 5, 2024 at 1:27 AM Noah Misch wrote: > > On Wed, Sep 04, 2024 at 09:00:32PM +0530, Nitin Motiani wrote: > > > Assert(rel->ri_needsLockTagTuple == > > > IsInplaceUpdateRelation(rel->r

Re: Use read streams in pg_visibility

2024-09-05 Thread Noah Misch
On Thu, Sep 05, 2024 at 03:59:53PM +0300, Nazir Bilal Yavuz wrote: > On Wed, 4 Sept 2024 at 21:43, Noah Misch wrote: > > https://postgr.es/m/caeudqaozv3wty5tv2t29jcwpydbmkbiwqkzd42s2ogzdixp...@mail.gmail.com > > then observed that collect_corrupt_items() was now guaranteed to ne

Re: race condition in pg_class

2024-09-04 Thread Noah Misch
precheck design qualifying as a modularity improvement. > Assert(rel->ri_needsLockTagTuple == > IsInplaceUpdateRelation(rel->relationDesc) > > This can safeguard against users of ResultRelInfo missing this field. v10 does the rename and adds that assertion. This question remains o

Re: GetRelationPath() vs critical sections

2024-09-04 Thread Noah Misch
On Wed, Sep 04, 2024 at 11:58:33AM -0400, Andres Freund wrote: > In general emitting a LOG inside a critical section isn't a huge issue - we > made sure that elog.c has a reserve of memory to be able to log without > crashing. > > However, the current message for buffer IO issues use relpath*() (e

Re: Use read streams in pg_visibility

2024-09-04 Thread Noah Misch
On Tue, Sep 03, 2024 at 10:46:34PM +0300, Nazir Bilal Yavuz wrote: > On Tue, 3 Sept 2024 at 22:20, Noah Misch wrote: > > On Tue, Sep 03, 2024 at 10:50:11AM -0700, Noah Misch wrote: > > > Pushed with some other cosmetic changes. > > Thanks! > > > I see I pushed

Re: race condition in pg_class

2024-09-03 Thread Noah Misch
On Tue, Sep 03, 2024 at 09:24:52PM +0530, Nitin Motiani wrote: > On Sat, Aug 31, 2024 at 6:40 AM Noah Misch wrote: > > On Thu, Aug 29, 2024 at 09:08:43PM +0530, Nitin Motiani wrote: > > > On Thu, Aug 29, 2024 at 8:11 PM Noah Misch wrote: > > > > -

Re: Use read streams in pg_visibility

2024-09-03 Thread Noah Misch
On Tue, Sep 03, 2024 at 10:50:11AM -0700, Noah Misch wrote: > On Mon, Sep 02, 2024 at 03:20:12PM +0300, Nazir Bilal Yavuz wrote: > > Thanks, updated patches are attached. > > > +/* > > + * Ask the callback which block it would like us to read next, with a small > >

Re: Use read streams in pg_visibility

2024-09-03 Thread Noah Misch
On Mon, Sep 02, 2024 at 03:20:12PM +0300, Nazir Bilal Yavuz wrote: > Thanks, updated patches are attached. > +/* > + * Ask the callback which block it would like us to read next, with a small > + * buffer in front to allow read_stream_unget_block() to work and to allow > the > + * fast path to sk

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-08-30 Thread Noah Misch
On Thu, Aug 29, 2024 at 03:48:53PM -0500, Masahiko Sawada wrote: > On Sun, May 19, 2024 at 6:46 AM Noah Misch wrote: > > If I were standardizing pg_trgm on one or the other notion of "char", I > > would > > choose signed char, since I think it's still the majo

Re: race condition in pg_class

2024-08-30 Thread Noah Misch
On Thu, Aug 29, 2024 at 09:08:43PM +0530, Nitin Motiani wrote: > On Thu, Aug 29, 2024 at 8:11 PM Noah Misch wrote: > > On Tue, Aug 20, 2024 at 11:59:45AM +0300, Heikki Linnakangas wrote: > > > My order of preference is: 2, 1, 3. > > > > I kept tuple locking respo

Re: Inval reliability, especially for inplace updates

2024-08-30 Thread Noah Misch
On Tue, Jun 18, 2024 at 08:23:49AM -0700, Noah Misch wrote: > On Mon, Jun 17, 2024 at 06:57:30PM -0700, Andres Freund wrote: > > On 2024-06-17 16:58:54 -0700, Noah Misch wrote: > > > On Sat, Jun 15, 2024 at 03:37:18PM -0700, Noah Misch wrote: > > > > On Wed, May 22,

Re: Use read streams in pg_visibility

2024-08-30 Thread Noah Misch
On Tue, Aug 27, 2024 at 10:49:19AM +0300, Nazir Bilal Yavuz wrote: > On Fri, 23 Aug 2024 at 22:01, Noah Misch wrote: > > On Fri, Aug 23, 2024 at 02:20:06PM +0300, Nazir Bilal Yavuz wrote: > > > On Tue, 20 Aug 2024 at 21:47, Noah Misch wrote: > > > > On Tue, Au

Re: Use read streams in pg_visibility

2024-08-23 Thread Noah Misch
On Fri, Aug 23, 2024 at 02:20:06PM +0300, Nazir Bilal Yavuz wrote: > On Tue, 20 Aug 2024 at 21:47, Noah Misch wrote: > > On Tue, Aug 13, 2024 at 03:22:27PM +0300, Nazir Bilal Yavuz wrote: > > > The downside of this approach is there are too many "vmbuffer is valid > &g

Re: race condition in pg_class

2024-08-22 Thread Noah Misch
On Tue, Aug 20, 2024 at 11:59:45AM +0300, Heikki Linnakangas wrote: > On 17/08/2024 07:07, Noah Misch wrote: > > On Fri, Aug 16, 2024 at 12:26:28PM +0300, Heikki Linnakangas wrote: > > > I wonder if the functions should be called "systable_*" and placed in > >

Re: Use read streams in pg_visibility

2024-08-20 Thread Noah Misch
On Tue, Aug 13, 2024 at 03:22:27PM +0300, Nazir Bilal Yavuz wrote: > 2- collect_corrupt_items() > > This one is more complicated. The read stream callback function loops > until it finds a suitable block to read. So, if the callback returns > an InvalidBlockNumber; it means that the stream process

Re: race condition in pg_class

2024-08-16 Thread Noah Misch
Thanks for reviewing. On Fri, Aug 16, 2024 at 12:26:28PM +0300, Heikki Linnakangas wrote: > On 14/07/2024 20:48, Noah Misch wrote: > > I've pushed the two patches for your reports. To placate cfbot, I'm > > attaching > > the remaining patches. > > inp

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2024-08-10 Thread Noah Misch
On Sat, Jul 27, 2024 at 07:24:33AM +0900, Michael Paquier wrote: > I've just applied now the remaining pieces down to 17. Comparing commit c9e2457 to the patch in zqgvzsbw5tgkq...@paquier.xyz, the commit lacks the slru.c portion.

Re: Don't overwrite scan key in systable_beginscan()

2024-08-08 Thread Noah Misch
On Thu, Aug 08, 2024 at 08:46:35AM +0200, Peter Eisentraut wrote: > When systable_beginscan() and systable_beginscan_ordered() choose an index > scan, they remap the attribute numbers in the passed-in scan keys to the > attribute numbers of the index, and then write those remapped attribute > numbe

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-08-08 Thread Noah Misch
On Sun, Apr 07, 2024 at 01:22:51AM +0300, Alexander Korotkov wrote: > I've pushed 0001 and 0002 The partition MERGE (1adf16b8f) and SPLIT (87c21bb94) v17 patches introduced createPartitionTable() with this code: createStmt->relation = newPartName; ... wrapper->utilityStmt = (Node

Re: Inval reliability, especially for inplace updates

2024-08-06 Thread Noah Misch
On Tue, Jun 18, 2024 at 08:23:49AM -0700, Noah Misch wrote: > On Mon, Jun 17, 2024 at 06:57:30PM -0700, Andres Freund wrote: > > On 2024-06-17 16:58:54 -0700, Noah Misch wrote: > > > That inplace150 patch turned out to be unnecessary. Contrary to the > > > "noncrit

Re: meson "experimental"?

2024-08-02 Thread Noah Misch
On Thu, May 30, 2024 at 01:32:18PM +0300, Aleksander Alekseev wrote: > > > [*] What is the correct name for this? > > > > I believe in this section it should be "Visual Studio" as we specify > > elsewhere [1][2]. In [2] we name specific required versions. Maybe we > > should reference this section.

Re: The stats.sql test is failing sporadically in v14- on POWER7/AIX 7.1 buildfarm animals

2024-07-31 Thread Noah Misch
On Wed, Jul 31, 2024 at 02:00:00PM +0300, Alexander Lakhin wrote: > --- > /home/nm/farm/gcc64/REL_14_STABLE/pgsql.build/src/test/regress/expected/stats.out > 2022-03-30 01:18:17.0 + > +++ > /home/nm/farm/gcc64/REL_14_STABLE/pgsql.build/src/test/regress/results/stats.out > 2024-07-30

Re: race condition when writing pg_control

2024-07-30 Thread Noah Misch
On Mon, Jul 15, 2024 at 03:44:48PM +1200, Thomas Munro wrote: > On Fri, Jul 12, 2024 at 11:43 PM Noah Misch wrote: > > On Sat, May 18, 2024 at 05:29:12PM +1200, Thomas Munro wrote: > > > On Fri, May 17, 2024 at 4:46 PM Thomas Munro > > > wrote: > > >

Re: race condition in pg_class

2024-07-28 Thread Noah Misch
On Sun, Jul 28, 2024 at 11:50:33AM -0400, Tom Lane wrote: > Noah Misch writes: > > On Sat, Jul 20, 2024 at 11:00:00AM +0300, Alexander Lakhin wrote: > >> A recent buildfarm test failure [1] showed that the > >> intra-grant-inplace-db.spec test added with 0844b3968 may f

Re: Built-in CTYPE provider

2024-07-26 Thread Noah Misch
On Wed, Jul 24, 2024 at 08:19:13AM -0700, Noah Misch wrote: > On Wed, Jul 17, 2024 at 03:03:26PM -0700, Noah Misch wrote: > > vote one way or the other on the question in > > https://postgr.es/m/20240706195129...@rfd.leadboat.com? > > I'll keep the voting open for anot

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2024-07-25 Thread Noah Misch
On Thu, Jul 25, 2024 at 10:52:13AM +0900, Michael Paquier wrote: > On Wed, Jul 24, 2024 at 06:00:59AM -0700, Noah Misch wrote: > > I'm still seeing need for s/int/int64/ at: > I am attaching a patch for all these you have spotted, switching the > logs to use %llx. Does th

Re: Built-in CTYPE provider

2024-07-24 Thread Noah Misch
On Wed, Jul 17, 2024 at 03:03:26PM -0700, Noah Misch wrote: > On Wed, Jul 17, 2024 at 08:48:46AM -0700, Jeff Davis wrote: > > On Thu, 2024-07-11 at 05:50 -0700, Noah Misch wrote: > > > > This is still marked as an open item for 17, but you've already > > > >

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2024-07-24 Thread Noah Misch
On Tue, Jul 23, 2024 at 06:01:44PM +0900, Michael Paquier wrote: > Hearing nothing but cicadas as now is their season, I have taken the > initiative here to address this open item. > > 0001 felt a bit too complicated in slru.h, so I have simplified it and > kept all the details in slru.c with Slru

Re: [18] Policy on IMMUTABLE functions and Unicode updates

2024-07-24 Thread Noah Misch
On Tue, Jul 23, 2024 at 01:07:49PM -0700, Jeff Davis wrote: > On Tue, 2024-07-23 at 07:39 -0700, Noah Misch wrote: > > Short-term, we should remedy the step backward that pg_c_utf8 has taken: > > https://postgr.es/m/20240718233908.52.nmi...@google.com > >

Re: [18] Policy on IMMUTABLE functions and Unicode updates

2024-07-23 Thread Noah Misch
On Mon, Jul 22, 2024 at 09:34:42AM -0700, Jeff Davis wrote: > On Mon, 2024-07-22 at 11:14 -0400, Robert Haas wrote: > > On Mon, Jul 22, 2024 at 10:26 AM Peter Eisentraut > > wrote: > > > I disagree with that.  We should put ourselves into the position to > > > adopt new Unicode versions without f

Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-07-23 Thread Noah Misch
On Mon, Jul 22, 2024 at 12:00:45PM +0300, Nazir Bilal Yavuz wrote: > On Sat, 20 Jul 2024 at 21:14, Noah Misch wrote: > > On a different naming topic, my review missed that field name > > copy_storage_using_buffer_read_stream_private.last_block doesn't fit how the > > fi

Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-07-20 Thread Noah Misch
On Sat, Jul 20, 2024 at 03:01:31PM +0300, Nazir Bilal Yavuz wrote: > On Sat, 20 Jul 2024 at 14:27, Noah Misch wrote: > > > > On Thu, Jul 18, 2024 at 02:11:13PM +0300, Nazir Bilal Yavuz wrote: > > > v4 is attached. > > > > Removal of the PinBufferForBl

Re: race condition in pg_class

2024-07-20 Thread Noah Misch
On Sat, Jul 20, 2024 at 11:00:00AM +0300, Alexander Lakhin wrote: > 28.06.2024 08:13, Noah Misch wrote: > > Pushed. > > A recent buildfarm test failure [1] showed that the > intra-grant-inplace-db.spec test added with 0844b3968 may fail > on a slow machine > But as the t

Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-07-20 Thread Noah Misch
On Thu, Jul 18, 2024 at 02:11:13PM +0300, Nazir Bilal Yavuz wrote: > v4 is attached. Removal of the PinBufferForBlock() comment about the "persistence = RELPERSISTENCE_PERMANENT" fallback started to feel like a loss. I looked for a way to re-add a comment about the fallback. https://coverage.post

Re: Built-in CTYPE provider

2024-07-18 Thread Noah Misch
On Thu, Jul 18, 2024 at 01:03:31PM -0400, Tom Lane wrote: > This whole discussion seems quite bizarre to me. In the first > place, it is certain that Unicode will continue to evolve, and > I can't believe that we'd just freeze pg_c_utf8 on the current > definition forever. Whether the first chang

Re: Built-in CTYPE provider

2024-07-18 Thread Noah Misch
On Thu, Jul 18, 2024 at 10:05:34AM +0200, Laurenz Albe wrote: > On Wed, 2024-07-17 at 15:03 -0700, Noah Misch wrote: > > If I'm counting the votes right, you and Tom have voted that the feature's > > current state is okay, and I and Laurenz have voted that it's not ok

Re: Built-in CTYPE provider

2024-07-17 Thread Noah Misch
On Wed, Jul 17, 2024 at 08:48:46AM -0700, Jeff Davis wrote: > On Thu, 2024-07-11 at 05:50 -0700, Noah Misch wrote: > > > This is still marked as an open item for 17, but you've already > > > acknowledged[1] that no code changes are necessary in version 17. > > &g

Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-07-17 Thread Noah Misch
On Wed, Jul 17, 2024 at 12:22:49PM +0300, Nazir Bilal Yavuz wrote: > On Tue, 16 Jul 2024 at 15:19, Noah Misch wrote: > > On Tue, Jul 16, 2024 at 02:11:20PM +0300, Nazir Bilal Yavuz wrote: > > > On Fri, 12 Jul 2024 at 02:52, Noah Misch wrote: > > > > On Tue, Ap

Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-07-16 Thread Noah Misch
On Tue, Jul 16, 2024 at 02:11:20PM +0300, Nazir Bilal Yavuz wrote: > On Fri, 12 Jul 2024 at 02:52, Noah Misch wrote: > > On Tue, Apr 16, 2024 at 02:12:19PM +0300, Nazir Bilal Yavuz wrote: > > > --- a/src/backend/storage/aio/read_stream.c > > > +++ b/src/backen

Re: Confine vacuum skip logic to lazy_scan_skip

2024-07-15 Thread Noah Misch
On Mon, Jul 15, 2024 at 03:26:32PM +1200, Thomas Munro wrote: > On Mon, Jul 8, 2024 at 2:49 AM Noah Misch wrote: > > what is the scope of the review you seek? > > The patch "Refactor tidstore.c memory management." could definitely > use some review. That's reaso

Re: race condition in pg_class

2024-07-14 Thread Noah Misch
On Thu, Jul 04, 2024 at 03:08:16PM -0700, Noah Misch wrote: > On Thu, Jul 04, 2024 at 08:00:00AM +0300, Alexander Lakhin wrote: > > 28.06.2024 08:13, Noah Misch wrote: > > > Pushed. ... > > > > Please look also at another anomaly, I've discovered. > >

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-07-13 Thread Noah Misch
On Fri, Jul 12, 2024 at 04:50:17PM -0700, Jeff Davis wrote: > On Fri, 2024-07-12 at 16:11 -0700, Noah Misch wrote: > > Since refresh->relation is a RangeVar, this departs from the standard > > against > > repeated name lookups, from CVE-2014-0062 (commit 5f17304). >

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-07-12 Thread Noah Misch
On Fri, Jul 12, 2024 at 02:50:52PM -0700, Jeff Davis wrote: > On Thu, 2024-07-11 at 05:52 -0700, Noah Misch wrote: > > > I could try to refactor it into two statements and execute them > > > separately, or I could try to rewrite the statement to use a fully- > > &g

Re: race condition when writing pg_control

2024-07-12 Thread Noah Misch
On Sat, May 18, 2024 at 05:29:12PM +1200, Thomas Munro wrote: > On Fri, May 17, 2024 at 4:46 PM Thomas Munro wrote: > > The specific problem here is that LocalProcessControlFile() runs in > > every launched child for EXEC_BACKEND builds. Windows uses > > EXEC_BACKEND, and Windows' NTFS file syste

Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

2024-07-11 Thread Noah Misch
On Tue, Apr 16, 2024 at 02:12:19PM +0300, Nazir Bilal Yavuz wrote: > I am working on using read streams in the CREATE DATABASE command when the > strategy is wal_log. RelationCopyStorageUsingBuffer() function is used in > this context. This function reads source buffers then copies them to the Ple

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-07-11 Thread Noah Misch
On Tue, Jul 09, 2024 at 05:47:36PM -0700, Jeff Davis wrote: > On Tue, 2024-07-09 at 15:20 +0900, Michael Paquier wrote: > > On Sun, Jun 30, 2024 at 03:23:44PM -0700, Noah Misch wrote: > > Hmm.  Is RestrictSearchPath() something that we should advertise more > > strongly

Re: Built-in CTYPE provider

2024-07-11 Thread Noah Misch
On Tue, Jul 09, 2024 at 04:20:12PM -0700, Jeff Davis wrote: > On Mon, 2024-07-08 at 18:05 -0700, Noah Misch wrote: > > I'm thinking about these > > aggravating factors for $SUBJECT: > > This is still marked as an open item for 17, but you've already > acknow

Re: Built-in CTYPE provider

2024-07-08 Thread Noah Misch
On Sat, Jul 06, 2024 at 04:19:21PM -0400, Tom Lane wrote: > Noah Misch writes: > > As a released feature, NORMALIZE() has a different set of remedies to choose > > from, and I'm not proposing one. I may have sidetracked this thread by > > talking about remedies

Re: Faster "SET search_path"

2024-07-08 Thread Noah Misch
On Mon, Jul 08, 2024 at 04:39:21PM -0700, Jeff Davis wrote: > On Sun, 2024-06-30 at 15:30 -0700, Noah Misch wrote: > > You're caching the result of object_aclcheck(NamespaceRelationId, > > ...), so > > pg_auth_members changes > > Thank you for the report. >

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2024-07-08 Thread Noah Misch
On Mon, Jul 08, 2024 at 02:09:21PM -0700, Jacob Champion wrote: > On Sun, Jun 30, 2024 at 10:48 AM Noah Misch wrote: > > That said, it > > may be more fruitful to arrange for authentication timeout to cut through > > PAM > > etc. > > That seems mostly out of our

Re: Confine vacuum skip logic to lazy_scan_skip

2024-07-07 Thread Noah Misch
On Fri, Jun 28, 2024 at 05:36:25PM -0400, Melanie Plageman wrote: > I've attached a WIP v11 streaming vacuum patch set here that is > rebased over master (by Thomas), so that I could add a CF entry for > it. It still has the problem with the extra WAL write and fsync calls > investigated by Thomas

Re: Vectored I/O in bulk_write.c

2024-07-06 Thread Noah Misch
On Tue, Apr 09, 2024 at 04:51:52PM +1200, Thomas Munro wrote: > Here's a rebase. I decided against committing this for v17 in the > end. There's not much wrong with it AFAIK, except perhaps an > unprincipled chopping up of writes with large io_combine_limit due to > simplistic flow control, and I

Re: Built-in CTYPE provider

2024-07-06 Thread Noah Misch
On Fri, Jul 05, 2024 at 02:38:45PM -0700, Jeff Davis wrote: > On Thu, 2024-07-04 at 14:26 -0700, Noah Misch wrote: > > I think you're saying that if some Unicode update changes the results > > of a > > STABLE function but does not change the result of any IMMUTABLE > &

Re: race condition in pg_class

2024-07-04 Thread Noah Misch
On Thu, Jul 04, 2024 at 08:00:00AM +0300, Alexander Lakhin wrote: > 28.06.2024 08:13, Noah Misch wrote: > > Pushed. ... > > Please look also at another anomaly, I've discovered. > > An Assert added with d5f788b41 may be falsified with: > CREATE TABLE t(a int PRIMARY

Re: Built-in CTYPE provider

2024-07-04 Thread Noah Misch
On Wed, Jul 03, 2024 at 02:19:07PM -0700, Jeff Davis wrote: > * Unless I made a mistake, the last three releases of Unicode (14.0, > 15.0, and 15.1) all have the exact same behavior for UPPER() and > LOWER() -- even for unassigned code points. It would be silly to > promise to stay with 15.1 and th

Re: race condition in pg_class

2024-07-03 Thread Noah Misch
On Wed, Jul 03, 2024 at 04:09:54PM -0700, Noah Misch wrote: > On Wed, Jul 03, 2024 at 06:00:00AM +0300, Alexander Lakhin wrote: > > 29.06.2024 05:42, Noah Misch wrote: > > > Good point, any effort on (2) would be wasted once the fixes get > > > certified. I > >

Re: race condition in pg_class

2024-07-03 Thread Noah Misch
On Wed, Jul 03, 2024 at 06:00:00AM +0300, Alexander Lakhin wrote: > 29.06.2024 05:42, Noah Misch wrote: > > Good point, any effort on (2) would be wasted once the fixes get certified. > > I > > pushed (1). I'm attaching the rebased fix patches. > > Please look

Re: cannot abort transaction 2737414167, it was already committed

2024-07-03 Thread Noah Misch
On Thu, May 09, 2024 at 05:19:47PM +1200, Thomas Munro wrote: > On Thu, Dec 28, 2023 at 11:42 AM Tom Lane wrote: > > Thomas Munro writes: > > > In CommitTransaction() there is a stretch of code beginning s->state = > > > TRANS_COMMIT and ending s->state = TRANS_DEFAULT, from which we call > > > o

Re: Relation bulk write facility

2024-07-02 Thread Noah Misch
On Tue, Jul 02, 2024 at 02:42:50PM +0300, Heikki Linnakangas wrote: > On 02/07/2024 02:24, Noah Misch wrote: > > On Tue, Jul 02, 2024 at 12:53:05AM +0300, Heikki Linnakangas wrote: > log_newpage_range() loads the pages to the buffer > cache and dirties them. That kinds of sucks a

Re: Built-in CTYPE provider

2024-07-02 Thread Noah Misch
On Wed, Jul 03, 2024 at 12:05:09AM +0200, Peter Eisentraut wrote: > On 02.07.24 18:51, Noah Misch wrote: > > On Mon, Jul 01, 2024 at 06:19:08PM -0700, Jeff Davis wrote: > > > On Mon, 2024-07-01 at 16:03 -0700, Noah Misch wrote: > > > >   An alternative woul

Re: collect_corrupt_items_vacuum.patch

2024-07-02 Thread Noah Misch
On Wed, Jul 03, 2024 at 12:31:48AM +0300, Alexander Korotkov wrote: > On Mon, Jul 1, 2024 at 2:18 AM Noah Misch wrote: > > Commit e85662d wrote: > > > --- a/src/backend/storage/ipc/procarray.c > > > +++ b/src/backend/storage/ipc/procarray.c &

Re: Built-in CTYPE provider

2024-07-02 Thread Noah Misch
On Mon, Jul 01, 2024 at 06:19:08PM -0700, Jeff Davis wrote: > On Mon, 2024-07-01 at 16:03 -0700, Noah Misch wrote: > >   An alternative would be to make pg_upgrade reject > > operating on a cluster that contains use of $SUBJECT. > > That wouldn't help anyone. Can you

Re: Relation bulk write facility

2024-07-01 Thread Noah Misch
On Tue, Jul 02, 2024 at 12:53:05AM +0300, Heikki Linnakangas wrote: > On 01/07/2024 23:52, Noah Misch wrote: > > Commit 8af2565 wrote: > > > --- /dev/null > > > +++ b/src/backend/storage/smgr/bulk_write.c > > > > > +/* > > > + * Finish bulk wri

Re: Built-in CTYPE provider

2024-07-01 Thread Noah Misch
On Mon, Jul 01, 2024 at 12:24:15PM -0700, Jeff Davis wrote: > On Sat, 2024-06-29 at 15:08 -0700, Noah Misch wrote: > > lower(), initcap(), upper(), and regexp_matches() are > > PROVOLATILE_IMMUTABLE. > > Until now, we've delegated that responsibility to the user.  The u

Re: Relation bulk write facility

2024-07-01 Thread Noah Misch
On Fri, Feb 23, 2024 at 04:27:34PM +0200, Heikki Linnakangas wrote: > Committed this. Thanks everyone! Commit 8af2565 wrote: > --- /dev/null > +++ b/src/backend/storage/smgr/bulk_write.c > +/* > + * Finish bulk write operation. > + * > + * This WAL-logs and flushes any remaining pending writes to

Re: speed up a logical replica setup

2024-06-30 Thread Noah Misch
On Sun, Jun 30, 2024 at 09:32:57PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Sun, Jun 30, 2024 at 05:01:52PM -0400, Tom Lane wrote: > >> I'm tempted to lobotomize the new test case on Windows until > >> we have that resolved. > > > Sounds fin

Re: collect_corrupt_items_vacuum.patch

2024-06-30 Thread Noah Misch
On Tue, Mar 12, 2024 at 02:10:59PM +0200, Alexander Korotkov wrote: > I'm going to push this if no objections. Commit e85662d wrote: > --- a/src/backend/storage/ipc/procarray.c > +++ b/src/backend/storage/ipc/procarray.c > @@ -2740,6 +2741,8 @@ GetRunningTransactionData(void) >*/ >

Re: Faster "SET search_path"

2024-06-30 Thread Noah Misch
On Tue, Nov 14, 2023 at 08:13:25PM -0800, Jeff Davis wrote: > On Thu, 2023-10-19 at 19:01 -0700, Jeff Davis wrote: > > 0003: Cache for recomputeNamespacePath. > > Committed Commit f26c236 wrote: > Add cache for recomputeNamespacePath(). > > When search_path is changed to something th

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-06-30 Thread Noah Misch
On Mon, Mar 04, 2024 at 07:52:05PM -0800, Jeff Davis wrote: > Committed. Commit 2af07e2 wrote: > --- a/src/backend/access/brin/brin.c > +++ b/src/backend/access/brin/brin.c > @@ -1412,6 +1412,8 @@ brin_summarize_range(PG_FUNCTION_ARGS) > SetUserIdAndSecContext(heapRel->rd_rel->relown

Re: speed up a logical replica setup

2024-06-30 Thread Noah Misch
On Sun, Jun 30, 2024 at 05:01:52PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Sun, Jun 30, 2024 at 02:58:00PM -0400, Tom Lane wrote: > >> So b3f5ccebd promptly blew up on fairywren [1]: > > > It does look consistent with IPC::Run predating v20220807.0, hence

Re: speed up a logical replica setup

2024-06-30 Thread Noah Misch
On Sun, Jun 30, 2024 at 02:58:00PM -0400, Tom Lane wrote: > I wrote: > > In hopes of moving things along as we approach the v18 branch, > > I went ahead and pushed Kuroda-san's patches (with a bit of > > further editorialization). > > So b3f5ccebd promptly blew up on fairywren [1]: > > connection

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-06-30 Thread Noah Misch
On Tue, Mar 12, 2024 at 05:50:48PM +0100, Alvaro Herrera wrote: > On 2024-Mar-12, Jelte Fennema-Nio wrote: > > On Tue, 12 Mar 2024 at 10:19, Alvaro Herrera > > wrote: > > > Here's a last one for the cfbot. > > > > Thanks for committing the first 3 patches btw. > > Thanks, I included it. PGcanc

  1   2   3   4   5   6   7   8   9   10   >