Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-06-03 Thread Michael Paquier
On Fri, Jun 03, 2022 at 12:53:18PM -0700, Andres Freund wrote: > [...] TRAP: FailedAssertion("AmIoWorkerProcess()", File: "xlog.c", Line: 4860, PID: 35325) > regress_log_002_pg_upgrade.log includes all of 002_pg_upgrade_old_node.log and > 002_pg_upgrade_new_node.log. The old node's log includes

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Justin Pryzby
On Sat, Jun 04, 2022 at 12:13:19PM +0900, Michael Paquier wrote: > On Fri, Jun 03, 2022 at 06:55:28PM +0200, Daniel Gustafsson wrote: > > On 3 Jun 2022, at 18:26, Tom Lane wrote: > >> How about inserting an additional level of subdirectory? > >> > >> pg_upgrade_output.d/20220603122528/foo.log >

Re: pg_upgrade test writes to source directory

2022-06-03 Thread Michael Paquier
On Thu, Jun 02, 2022 at 08:50:12PM -0700, Andres Freund wrote: > +1 OK, applied the extra chdir to PostgreSQL::Test::Utils::tmp_check, as initially suggested by Peter. The CI looked happy on that. -- Michael signature.asc Description: PGP signature

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Michael Paquier
On Fri, Jun 03, 2022 at 06:55:28PM +0200, Daniel Gustafsson wrote: > On 3 Jun 2022, at 18:26, Tom Lane wrote: >> How about inserting an additional level of subdirectory? >> >> pg_upgrade_output.d/20220603122528/foo.log >> >> Then code doing "rm -rf pg_upgrade_output.d" needs no changes. > >

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-06-03 Thread Michael Paquier
On Fri, Jun 03, 2022 at 10:04:12AM -0400, Tom Lane wrote: > I agree with Robert's complaint that Parallel is far too generic > a term here. Also, the fact that this data is currently in struct > Port seems like an artifact. > > Don't we have a term for the set of processes comprising a leader >

Re: Collation version tracking for macOS

2022-06-03 Thread Tom Lane
Thomas Munro writes: > On Sat, Jun 4, 2022 at 7:13 AM Jeremy Schneider > wrote: >> It feels to me like we're still not really thinking clearly about this >> within the PG community, and that the seriousness of this issue is not >> fully understood. > FWIW A couple of us tried quite hard to make

Count output lines automatically in psql/help.c

2022-06-03 Thread Tom Lane
I finally reached the point of being fed up with our inability to maintain the number of lines output by psql's usage() and sibling functions. Almost every year, we find ourselves updating those magic constants sometime late in the dev cycle, and I just had to do it again today. So, attached is

Re: Collation version tracking for macOS

2022-06-03 Thread Thomas Munro
On Sat, Jun 4, 2022 at 7:13 AM Jeremy Schneider wrote: > No other piece of software that calls itself a database would do what > PostgreSQL is doing: just give users a "warning" after suddenly changing > the sort order algorithm (most users won't even read warnings in their > logs). Oracle, DB2,

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-06-03 Thread Andres Freund
Hi, I just saw a pg_upgrade failure on my aio branch [1]. Not sure what caused it yet. The reason I'm writing in this thread is that I looked at the regress_log_* for the failure, and found it to be 14.95MiB (which crashed the browser on my phone...).

Re: Collation version tracking for macOS

2022-06-03 Thread Thomas Munro
On Sat, Jun 4, 2022 at 12:17 AM Peter Eisentraut wrote: > On 07.05.22 02:31, Thomas Munro wrote: > > Last time I looked into this it seemed like macOS's strcoll() gave > > sensible answers in the traditional single-byte encodings, but didn't > > understand UTF-8 at all so you get C/strcmp()

Re: Collation version tracking for macOS

2022-06-03 Thread Jeremy Schneider
On 6/3/22 9:21 AM, Tom Lane wrote: > > According to that document, they changed it in macOS 11, which came out > a year and a half ago. Given the lack of complaints, it doesn't seem > like this is urgent enough to mandate a post-beta change that would > have lots of downside (namely,

Re: Proposal: adding a better description in psql command about large objects

2022-06-03 Thread Nathan Bossart
On Fri, Jun 03, 2022 at 12:56:20PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> Another option could be to move it after the "Input/Output" section so that >> it's closer to some other commands that involve files. I can't say I have >> a strong opinion about whether/where to move it,

Re: Proposal: adding a better description in psql command about large objects

2022-06-03 Thread Tom Lane
Nathan Bossart writes: > On Fri, Jun 03, 2022 at 11:12:11AM -0400, Tom Lane wrote: >> * While we're here, it seems like this whole group was placed at the >> end because of add-it-to-the-end-itis, not because that was the >> most logical place for it. The other commands that interact with >> the

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Daniel Gustafsson
> On 3 Jun 2022, at 18:26, Tom Lane wrote: > > Daniel Gustafsson writes: >> Or we could revisit Tom's proposal in the thread that implemented the >> feature: >> to have timestamped directory names to get around this very problem? I think >> we should be able to figure out a way to make it

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Tom Lane
Daniel Gustafsson writes: > Or we could revisit Tom's proposal in the thread that implemented the feature: > to have timestamped directory names to get around this very problem? I think > we should be able to figure out a way to make it easy enough for the BF code > to > figure out (and clean

Re: [RFC] building postgres with meson

2022-06-03 Thread Andres Freund
Hi, On 2022-06-03 12:35:45 +0300, Aleksander Alekseev wrote: > > Part of the patch series is to use visibility attributes, and your #if > > TS_EMPTY(PGDLLEXPORT) thing can't handle that. > > Out of curiosity, how come a patchset that adds an alternative build system > changes the visibility

Re: Collation version tracking for macOS

2022-06-03 Thread Tom Lane
Peter Eisentraut writes: > On 07.05.22 02:31, Thomas Munro wrote: >> Last time I looked into this it seemed like macOS's strcoll() gave >> sensible answers in the traditional single-byte encodings, but didn't >> understand UTF-8 at all so you get C/strcmp() order. In other words >> there was

Re: Pointer subtraction with a null pointer

2022-06-03 Thread Andres Freund
On 2022-03-26 11:08:59 -0700, Andres Freund wrote: > On 2022-03-26 10:49:53 -0700, Andres Freund wrote: > > > It's hard to see how that isn't a flat-out compiler bug. > > > > It only happens if the NULL is directly passed as an argument to the macro, > > not if there's an intermediary variable.

Re: [PATCH] fix doc example of bit-reversed MAC address

2022-06-03 Thread Tom Lane
Will Mortensen writes: > Pretty trivial since this is documenting something that Postgres > *doesn't* do, but it incorrectly reversed only the bits of each > nibble, not the whole byte. Duh, right. Will fix, thanks for noticing! regards, tom lane

Re: should check interrupts in BuildRelationExtStatistics ?

2022-06-03 Thread Justin Pryzby
On Mon, May 09, 2022 at 09:11:37AM -0400, Robert Haas wrote: > On Sun, May 8, 2022 at 11:36 PM Tom Lane wrote: > > Michael Paquier writes: > > > How long can the backend remain unresponsive? I don't think that > > > anybody would object to the addition of some CHECK_FOR_INTERRUPTS() in > > >

Re: Proposal: adding a better description in psql command about large objects

2022-06-03 Thread Nathan Bossart
On Fri, Jun 03, 2022 at 11:12:11AM -0400, Tom Lane wrote: > * How about "write large object to file" and "read large object from > file"? As it stands, if you are not totally sure which direction is > export and which is import, this description teaches you little. +1 > * While we're here, it

Re: Proposal: adding a better description in psql command about large objects

2022-06-03 Thread Tom Lane
Nathan Bossart writes: > Yes, it looks like the precedent is to have an fprintf() per command. I > still think the indentation needs some adjustment for readability. In the > attached, I've lined up all the large object commands. This is offset from > most other commands, but IMO this is far

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Daniel Gustafsson
> On 3 Jun 2022, at 15:53, Justin Pryzby wrote: > > On Fri, Jun 03, 2022 at 02:01:18PM +0200, Daniel Gustafsson wrote: >>> On 3 Jun 2022, at 13:19, tushar wrote: >> >>> This behavior was not there in earlier released versions, i guess. >>> Is it expected behavior now onwards? >> >> That's an

Re: Proposal: adding a better description in psql command about large objects

2022-06-03 Thread Nathan Bossart
On Fri, Jun 03, 2022 at 10:12:30AM +0200, Thibaud W. wrote: > In fact the original tabs were missing in the first file. > In version v2, it seems interesting to keep calls to the fprintf function > for translation. I attached a new file. Yes, it looks like the precedent is to have an fprintf()

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-06-03 Thread Tom Lane
Michael Paquier writes: > ParallelPortInfo sounds kind of right for the job to me in this set of > proposals, as the data is from the Port, and that's some information > shared between all the parallel workers and the leader. I agree with Robert's complaint that Parallel is far too generic a

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Justin Pryzby
On Fri, Jun 03, 2022 at 02:01:18PM +0200, Daniel Gustafsson wrote: > > On 3 Jun 2022, at 13:19, tushar wrote: > > > This behavior was not there in earlier released versions, i guess. > > Is it expected behavior now onwards? > > That's an unfortunate side effect which AFAICT was overlooked in

Self FK oddity when attaching a partition

2022-06-03 Thread Jehan-Guillaume de Rorthais
Hi all, While studying the issue discussed in thread "Detaching a partition with a FK on itself is not possible"[1], I stumbled across an oddity while attaching a partition having the same multiple self-FK than the parent table. Only one of the self-FK is found as a duplicate. Find in attachment

Re: Collation version tracking for macOS

2022-06-03 Thread Peter Eisentraut
On 07.05.22 02:31, Thomas Munro wrote: During development, I have been using the attached patch to simulate libc collation versions on macOS. It just uses the internal major OS version number. I don't know to what the extend the libc locales on macOS are maintained or updated at all, so I

Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread Daniel Gustafsson
> On 3 Jun 2022, at 13:19, tushar wrote: > This behavior was not there in earlier released versions, i guess. > Is it expected behavior now onwards? That's an unfortunate side effect which AFAICT was overlooked in the original thread. Having a predictable name was defined as important for

[v15 beta] pg_upgrade failed if earlier executed with -c switch

2022-06-03 Thread tushar
Hi, While performing pg_upgrade from v15Beta binaries/source, I got this error below error could not create directory "d2/pg_upgrade_output.d": File exists Failure, exiting *Steps to reproduce * v15 Beta sources initalize a cluster ( ./initdb -D d1) initalize another cluster ( ./initdb -D d2)

Re: Support logical replication of DDLs

2022-06-03 Thread Amit Kapila
On Thu, Jun 2, 2022 at 5:44 PM houzj.f...@fujitsu.com wrote: > > The main idea of replicating the CREATE TABLE AS is that we deprase the CREATE > TABLE AS into a simple CREATE TABLE(without subquery) command and WAL log it > after creating the table and before writing data into the table and

Re: Skipping schema changes in publication

2022-06-03 Thread vignesh C
On Tue, May 31, 2022 at 11:51 AM Peter Smith wrote: > > Here are my review comments for patch v7-0002. > > == > > 1. doc/src/sgml/logical-replication.sgml > > @@ -1167,8 +1167,9 @@ CONTEXT: processing remote data for replication > origin "pg_16395" during "INSER > > To add tables to

Re: Ignore heap rewrites for materialized views in logical replication

2022-06-03 Thread Amit Kapila
On Wed, Jun 1, 2022 at 10:39 AM Amit Kapila wrote: > > On Tue, May 31, 2022 at 8:28 PM Euler Taveira wrote: > > > > On Tue, May 31, 2022, at 11:13 AM, Amit Kapila wrote: > > > > I think we don't need the retry logical to check error, a simple > > wait_for_caught_up should be sufficient as we are

Re: Skipping schema changes in publication

2022-06-03 Thread vignesh C
'On Mon, May 30, 2022 at 1:51 PM Peter Smith wrote: > > Here are some minor review comments for v7-0001. > > == > > 1. General > > Probably the commit message and all the PG docs and code comments > should be changed to refer to "publication parameters" instead of > (currently) "publication

Re: Skipping schema changes in publication

2022-06-03 Thread vignesh C
On Thu, May 26, 2022 at 7:04 PM osumi.takami...@fujitsu.com wrote: > > On Monday, May 23, 2022 2:13 PM vignesh C wrote: > > Attached v7 patch which fixes the buildfarm warning for an unused warning in > > release mode as in [1]. > Hi, thank you for the patches. > > > I'll share several review

Re: [RFC] building postgres with meson

2022-06-03 Thread Aleksander Alekseev
Hi hackers, > See about line 300 in src/backend/Makefile. In any case, it's > easy to show by experiment that it does. `make maintainer-clean` did the trick, thanks. I suggest modifying meson.build accordingly: -run make distclean in the source tree. +run `make maintainer-clean` in the source

[PATCH] fix doc example of bit-reversed MAC address

2022-06-03 Thread Will Mortensen
Pretty trivial since this is documenting something that Postgres *doesn't* do, but it incorrectly reversed only the bits of each nibble, not the whole byte. See e.g. https://www.ibm.com/docs/en/csfdcd/7.1?topic=ls-bit-ordering-in-mac-addresses for a handy table. diff --git

Re: Proposal: adding a better description in psql command about large objects

2022-06-03 Thread Thibaud W.
On 6/2/22 23:46, Nathan Bossart wrote: On Thu, Jun 02, 2022 at 11:12:46AM +0200, Thibaud W. wrote: Attached is a small patch to add a description to the meta commands regarding large objects. This seems reasonable to me. Your patch wasn't applying for some reason, so I created a new one with

Re: NAMEDATALEN increase because of non-latin languages

2022-06-03 Thread John Naylor
Hi, I wanted to revive this thread to summarize what was discussed and get a sense of next steps we could take. The idea that gained the most traction is to make identifiers variable-length in the catalogs, which has the added benefit of reducing memory in syscaches in the common case. That