RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-10-22 Thread Hayato Kuroda (Fujitsu)
Dear Bharath, Thank you for reviewing! PSA new version. > 1. A nit: > + > +/* > + * We also skip decoding in 'fast_forward' mode. In passing set the > + * 'processing_required' flag to indicate, were it not for this mode, > + * processing *would* have been required. > + */ >

RE: pg_upgrade's interaction with pg_resetwal seems confusing

2023-10-22 Thread Hayato Kuroda (Fujitsu)
Dear Vignesh, Thank you for reviewing! New patch can be available in [1]. > We can update the commit message with the details of the same, it will > help to understand that it is intentionally done. Both comments and a commit message were updated related. > There are couple of typos with the

RE: pg_upgrade's interaction with pg_resetwal seems confusing

2023-10-22 Thread Hayato Kuroda (Fujitsu)
Dear Alvaro, Thank you for updating! PSA new version. > Note that this patch falsifies the comment in SetNextObjectId that > taking the lock is pro forma only -- it no longer is, since in upgrade > mode there can be multiple subprocesses running -- so I think it should > be updated. Indeed,

Re: Server crash on RHEL 9/s390x platform against PG16

2023-10-22 Thread Suraj Kharage
On Sat, Oct 21, 2023 at 5:17 AM Andres Freund wrote: > Hi, > > On 2023-09-12 15:27:21 +0530, Suraj Kharage wrote: > > *[edb@9428da9d2137 postgres]$ cat /etc/redhat-release AlmaLinux release > 9.2 > > (Turquoise Kodkod)[edb@9428da9d2137 postgres]$ lscpuArchitecture: > > s390x CPU op-mode(s):

Re: Fix output of zero privileges in psql

2023-10-22 Thread David G. Johnston
On Fri, Oct 20, 2023 at 7:29 PM Erik Wienhold wrote: > On 2023-10-20 22:35 +0200, David G. Johnston wrote: > > In short, I don't want default privileges to start to obey \pset null > when > > it never has before and is documented as displaying the empty string. I > do > > want the empty string

Re: speed up a logical replica setup

2023-10-22 Thread Euler Taveira
On Mon, Feb 21, 2022, at 9:09 AM, Euler Taveira wrote: > A new tool called pg_subscriber does this conversion and is tightly integrated > with Postgres. After a long period of inactivity, I'm back to this client tool. As suggested by Andres, I added a new helper function to change the system

Re: Removing unneeded self joins

2023-10-22 Thread Andrei Lepikhov
On 22/10/2023 05:01, Alexander Korotkov wrote: On Thu, Oct 19, 2023 at 6:16 AM Andrei Lepikhov wrote: On 19/10/2023 01:50, Alexander Korotkov wrote: This query took 3778.432 ms with self-join removal disabled, and 3756.009 ms with self-join removal enabled. So, no measurable overhead.

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread Tom Lane
sirisha chamarthi writes: > I believe that any reasonable use of a standby server for queries > requires hot_standby_feedback to be turned on. The fact that it's not the default should suggest to you that that's not the majority opinion. regards, tom lane

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread Vik Fearing
On 10/23/23 04:02, sirisha chamarthi wrote: On Sun, Oct 22, 2023 at 4:56 AM Vik Fearing wrote: On 10/22/23 09:50, sirisha chamarthi wrote: Is there any specific reason hot_standby_feedback default is set to off? Yes. No one wants a rogue standby to ruin production. Agreed. Okay...

RE: Remove wal_level settings for subscribers in tap tests

2023-10-22 Thread Hayato Kuroda (Fujitsu)
Dear Michael, I found it was pushed. Thanks! Best Regards, Hayato Kuroda FUJITSU LIMITED

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread sirisha chamarthi
On Sun, Oct 22, 2023 at 4:56 AM Vik Fearing wrote: > On 10/22/23 09:50, sirisha chamarthi wrote: > > Is there any specific reason hot_standby_feedback default is set to off? > > > Yes. No one wants a rogue standby to ruin production. > Agreed. I believe that any reasonable use of a standby

Re: pgstatindex vs. !indisready

2023-10-22 Thread Michael Paquier
On Sun, Oct 22, 2023 at 02:02:45PM -0700, Noah Misch wrote: > - /* OK, do it */ > - brinsummarize(indexRel, heapRel, heapBlk, true, , NULL); > + /* see gin_clean_pending_list() */ > + if (indexRel->rd_index->indisvalid) > + brinsummarize(indexRel, heapRel, heapBlk,

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread sirisha chamarthi
Hi Andres, On Sun, Oct 22, 2023 at 12:08 PM Andres Freund wrote: > Hi, > > On October 22, 2023 4:56:15 AM PDT, Vik Fearing > wrote: > >On 10/22/23 09:50, sirisha chamarthi wrote: > >> Is there any specific reason hot_standby_feedback default is set to off? > > > > > >Yes. No one wants a rogue

Re: Remove extraneous break condition in logical slot advance function

2023-10-22 Thread Michael Paquier
On Sun, Oct 22, 2023 at 11:59:00PM +0530, Bharath Rupireddy wrote: > AFAICS, there's no correctness argument for breaking before CFI. As > rightly said, CFIs can happen before the break condition either down > inside LogicalDecodingProcessRecord or XLogReadRecord (page_read > callbacks for

Re: Show version of OpenSSL in ./configure output

2023-10-22 Thread Michael Paquier
On Sun, Oct 22, 2023 at 08:34:40PM -0400, Tom Lane wrote: > +1, I've wished for that too. It's not 100% clear that whatever > openssl is in your PATH matches the libraries we select, but this > will get it right in most cases and it seems like about the right > level of effort. Yes, I don't

Re: Casual Meson fixups

2023-10-22 Thread Andres Freund
Hi, On 2023-09-01 11:31:07 -0500, Tristan Partin wrote: > Muon development has slowed quite a bit this year. Postgres is probably the > largest project which tries its best to support Muon. It seems like if we > want to keep supporting Muon, we should get a buildfarm machine to use it > instead

Re: Patch: Improve Boolean Predicate JSON Path Docs

2023-10-22 Thread Erik Wienhold
On 2023-10-20 15:49 +0200, David Wheeler wrote: > On Oct 19, 2023, at 23:49, Erik Wienhold wrote: > > > I don't even know what that represents, probably not some fancy file > > compression. That's an AppleSingle file according to [1][2]. It only contains the resource fork and file name but no

Re: Show version of OpenSSL in ./configure output

2023-10-22 Thread Tom Lane
Michael Paquier writes: > 5e4dacb9878c has reminded me that we don't show the version of OpenSSL > in the output of ./configure. This would be useful to know when > looking at issues within the buildfarm, and I've wanted that a few > times. +1, I've wished for that too. It's not 100% clear

Show version of OpenSSL in ./configure output

2023-10-22 Thread Michael Paquier
Hi all, 5e4dacb9878c has reminded me that we don't show the version of OpenSSL in the output of ./configure. This would be useful to know when looking at issues within the buildfarm, and I've wanted that a few times. How about the attached to use the openssl command, if available, to display

Re: LLVM 16 (opaque pointers)

2023-10-22 Thread Thomas Munro
On Sun, Oct 22, 2023 at 2:44 PM Thomas Munro wrote: > On Sat, Oct 21, 2023 at 2:45 PM Tom Lane wrote: > > Thomas Munro writes: > > > (It'd be nice if the > > > build farm logged "$LLVM_CONFIG --version" somewhere.) > > > > It's not really the buildfarm script's responsibility to do that, > >

Re: SQL:2011 application time

2023-10-22 Thread jian he
hi. also based on v16. -tests. drop table if exists for_portion_of_test1; CREATE unlogged TABLE for_portion_of_test1 (id int4range, valid_at tsrange,name text ); INSERT INTO for_portion_of_test1 VALUES ('[1,1]', NULL, '[1,1]_NULL'),('[1,1]', '(,)', '()_[1,]') ,('[1,1]', 'empty',

Re: UniqueKey v2

2023-10-22 Thread jian he
On Fri, Oct 20, 2023 at 4:33 PM wrote: > > > > i did some simple tests using text data type. > > > > it works with the primary key, not with unique indexes. > > it does not work when the column is unique, not null. > > > > The following is my test. > > Can you simplify your test case please? I

Re: pgstatindex vs. !indisready

2023-10-22 Thread Noah Misch
On Wed, Oct 04, 2023 at 09:00:23AM +0900, Michael Paquier wrote: > On Sun, Oct 01, 2023 at 06:31:26PM -0700, Noah Misch wrote: > > The !indisvalid index may be missing tuples, yes. In what way does that > > make > > one of those four operations incorrect? > > Reminding myself of what these four

Re: Guiding principle for dropping LLVM versions?

2023-10-22 Thread Andres Freund
Hi, On October 21, 2023 7:46:17 PM PDT, Xing Guo wrote: >Can we also check if the clang's version is compatible with llvm's version >in llvm.m4? I have multiple llvm toolchains installed on my system and I >have to specify the $CLANG and $LLVM_CONFIG variables each time I build the >server

Re: Guiding principle for dropping LLVM versions?

2023-10-22 Thread Thomas Munro
On Sun, Oct 22, 2023 at 3:46 PM Xing Guo wrote: > Can we also check if the clang's version is compatible with llvm's version in > llvm.m4? I have multiple llvm toolchains installed on my system and I have to > specify the $CLANG and $LLVM_CONFIG variables each time I build the server > against

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread Andres Freund
Hi, On October 22, 2023 4:56:15 AM PDT, Vik Fearing wrote: >On 10/22/23 09:50, sirisha chamarthi wrote: >> Is there any specific reason hot_standby_feedback default is set to off? > > >Yes. No one wants a rogue standby to ruin production. Medium term, I think we need an approximate xid->"time

Re: Remove extraneous break condition in logical slot advance function

2023-10-22 Thread Bharath Rupireddy
On Sat, Oct 21, 2023 at 11:40 PM Tom Lane wrote: > > Gurjeet Singh writes: > > On Fri, Oct 20, 2023 at 7:30 PM Bharath Rupireddy > > wrote: > >> There exists an extraneous break condition in > >> pg_logical_replication_slot_advance(). When the end of WAL or moveto > >> LSN is reached, the main

Re: BRIN minmax multi - incorrect distance for infinite timestamp/date

2023-10-22 Thread Tomas Vondra
On 10/20/23 11:52, Ashutosh Bapat wrote: > On Thu, Oct 19, 2023 at 6:11 PM Ashutosh Bapat > wrote: >> >> I think we should provide generate_series(date, date, integer) which >> will use date + integer -> date. > > Just to be clear, I don't mean that this patch should add it. > I'm not against

PoC: prefetching index leaf pages (for inserts)

2023-10-22 Thread Tomas Vondra
Hi, Some time ago I started a thread about prefetching heap pages during index scans [1]. That however only helps when reading rows, not when inserting them. Imagine inserting a row into a table with many indexes - we insert the row into the table, and then into the indexes one by one,

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread Vik Fearing
On 10/22/23 09:50, sirisha chamarthi wrote: Is there any specific reason hot_standby_feedback default is set to off? Yes. No one wants a rogue standby to ruin production. -- Vik Fearing

Re: missing dependencies PostgreSQL 16 OpenSUSE Tumbleweed (SLES 15.5 packages)

2023-10-22 Thread Michael Banck
Hi, On Sun, Oct 22, 2023 at 11:00:07AM +0200, André Verwijs wrote: > missing dependencies PostgreSQL 16 OpenSUSE Tumbleweed (SLES 15.5 > packages) > > --- > > YaST2 conflicts list - generated 2023-10-22 10:30:07 > > there is no package providing 'libldap_r-2.4.so.2())(64bit)'

missing dependencies PostgreSQL 16 OpenSUSE Tumbleweed (SLES 15.5 packages)

2023-10-22 Thread André Verwijs
missing dependencies PostgreSQL 16 OpenSUSE Tumbleweed (SLES 15.5 packages) --- YaST2 conflicts list - generated 2023-10-22 10:30:07 there is no package providing 'libldap_r-2.4.so.2())(64bit)' required by installing postgresql16-server-16.0-1PGDG.sles15.x86_64 [ ]

Why is hot_standby_feedback off by default?

2023-10-22 Thread sirisha chamarthi
Hi Hackers, Is there any specific reason hot_standby_feedback default is set to off? I see some explanation in the thread [1] about recovery_min_apply_delay value > 0 causing table bloat. However, recovery_min_apply_delay is set to 0 by default. So, if a server admin wants to change this value,