Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Tom Lane
Daniel Gustafsson writes: > On 12 Apr 2023, at 22:23, Tom Lane wrote: >> Plausible alternatives include: >> 2. Run a second BF animal that's intentionally pointed at the MacPorts >> environment, in hopes of testing what MacPorts users would see. >> >> #2 feels like it might not be a waste of

Re: pg_upgrade and logical replication

2023-04-12 Thread Peter Smith
Here are some review comments for the v4-0001 test code only. == 1. All the comments look alike, so it is hard to know what is going on. If each of the main test parts could be highlighted then the test code would be easier to read IMO. Something like below: # == # TEST CASE: Check

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Michael Paquier
On Wed, Apr 12, 2023 at 10:25:42PM -0400, Tom Lane wrote: > +1 for cleanup, if this is new code. It does us no good in the long > run for v16 to handle this differently from both earlier and later > versions. Okidoki. Let me know if anybody has an objection about what's been sent upthread. The

Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition

2023-04-12 Thread David Rowley
On Thu, 13 Apr 2023 at 15:30, Richard Guo wrote: > BTW, I wonder if we should elog an Error here. > > default: > - Assert(false); /* hmm? */ > - return PARTCLAUSE_UNSUPPORTED; > + elog(ERROR, "unrecognized booltesttype: %d", >

Re: Should we remove vacuum_defer_cleanup_age?

2023-04-12 Thread Amit Kapila
On Tue, Apr 11, 2023 at 11:50 PM Andres Freund wrote: > > On 2023-04-11 11:33:01 -0500, Justin Pryzby wrote: > > On Wed, Mar 22, 2023 at 10:00:48AM -0700, Andres Freund wrote: > > > I don't know whether others think we should apply it this release, given > > > the > > > "late submission", but I

Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition

2023-04-12 Thread Richard Guo
On Thu, Apr 13, 2023 at 10:39 AM Richard Guo wrote: > On Wed, Apr 12, 2023 at 7:13 PM David Rowley wrote: > >> There's already code to effectively handle <> operators. Just the >> PartClauseInfo.op_is_ne needs to be set to true. >> get_matching_list_bounds() then handles that by taking the

Re: pg_upgrade and logical replication

2023-04-12 Thread Julien Rouhaud
Hi, On Wed, Apr 12, 2023 at 09:48:15AM +, Hayato Kuroda (Fujitsu) wrote: > > Thank you for updating the patch. I checked yours. > Followings are general or non-minor questions: Thanks! > 1. > Feature freeze for PG16 has already come. So I think there is no reason to > rush > making the

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Yurii Rashkovskii
Hi Tom, On Thu, Apr 13, 2023 at 9:17 AM Tom Lane wrote: > Yurii Rashkovskii writes: > > Thank you all for the feedback. It's quite useful. I think it is > important > > to separate this into two concerns: > > > 1. Letting Postgres pick an unused port. > > 2. Retrieving the port it picked. > >

Re: pg_upgrade and logical replication

2023-04-12 Thread Peter Smith
Here are some review comments for patch v4-0001 (not the test code) (There are some overlaps here with what Kuroda-san already posted yesterday because we were looking at the same patch code. Also, a few of my comments might become moot points if refactoring will be done according to Kuroda-san's

Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition

2023-04-12 Thread Richard Guo
On Wed, Apr 12, 2023 at 7:13 PM David Rowley wrote: > There's already code to effectively handle <> operators. Just the > PartClauseInfo.op_is_ne needs to be set to true. > get_matching_list_bounds() then handles that by taking the inverse of > the partitions matching the equality operator. > >

Re: Non-superuser subscription owners

2023-04-12 Thread Amit Kapila
On Wed, Apr 12, 2023 at 5:50 PM Robert Haas wrote: > > On Tue, Apr 11, 2023 at 10:56 PM Amit Kapila wrote: > > Anyway, I don't think as such there is any problem > > with restarting the worker even when the subscription owner is a > > superuser, so adjusted the check accordingly. > > LGTM. >

Re: Add ps display while waiting for wal in read_local_xlog_page_guts

2023-04-12 Thread Tom Lane
sirisha chamarthi writes: > pg_create_logical_replication_slot can take longer than usual on a standby > when there is no activity on the primary. We don't have enough information > in the pg_stat_activity or process title to debug why this is taking so > long. Attached a small patch to update

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Tom Lane
Michael Paquier writes: > On Thu, Apr 13, 2023 at 12:53:51PM +1200, Thomas Munro wrote: >> and (2) I missed this when looking for manual memory >> management code that could be nuked, probably because it's hiding >> behind a few layers of functions call, but there are clearly comments >> that are

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Tom Lane
Yurii Rashkovskii writes: > Thank you all for the feedback. It's quite useful. I think it is important > to separate this into two concerns: > 1. Letting Postgres pick an unused port. > 2. Retrieving the port it picked. Yeah, those are distinguishable implementation concerns, but ... > The

Re: Direct I/O

2023-04-12 Thread Thomas Munro
Thanks both for looking, and thanks for the explanation Ilmari. Pushed with your improvements. The 4 CI systems run the tests (Windows and Mac by special always-expected-to-work case, Linux and FreeBSD by successful pre-flight perl test of O_DIRECT), and I also tested three unusual systems, two

Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-12 Thread Kyotaro Horiguchi
At Wed, 12 Apr 2023 23:39:29 +0900, Fujii Masao wrote in > BTW, you can reproduce the issue even when using a TCP connection > instead of a Unix domain socket by specifying a very large number > in the "keepalives" connection parameter for the foreign server. > Here is an example: > >

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Greg Stark
On Wed, Apr 12, 2023, 19:30 Daniel Gustafsson wrote: > > The issue we have is that we cannot get PGconn in > verify_cb so logging an error is tricky. Hm, the man page talks about a "ex_data mechanism" which seems to be referring to this Rube Goldberg device

Re: Bufmgr possible overflow

2023-04-12 Thread Kyotaro Horiguchi
Perhaps it's a good idea to seprate the patch for each issue. At Wed, 12 Apr 2023 09:36:14 -0300, Ranier Vilela wrote in> IMO I think that commit 31966b1 > > has an oversight. > > All the logic of the

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Michael Paquier
On Thu, Apr 13, 2023 at 12:53:51PM +1200, Thomas Munro wrote: > Up to the RMT of course, but it sounds a bit like (1) you potentially > had an open item already until last week (new code in 16 that could > leak regexes), Well, not really.. Note that HEAD does not leak regexes, because changes

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Thomas Munro
On Thu, Apr 13, 2023 at 12:16 PM Michael Paquier wrote: > The logic in hba.c that scans all the HBA and ident lines to any > regexps can be simplified a lot. Most of this code is new in 16~, so > I think that it is worth cleaning up this stuff now rather than wait > for 17 to open for business.

Re: Add LZ4 compression in pg_dump

2023-04-12 Thread Justin Pryzby
On Thu, Apr 13, 2023 at 09:37:06AM +0900, Michael Paquier wrote: > > If you don't insist on calling parse(NONE), the only change is to remove > > the empty #else, which was my original patch. > > Removing the empty else has as problem to create an empty if block, > which could be itself a cause

Re: Add LZ4 compression in pg_dump

2023-04-12 Thread Michael Paquier
On Wed, Apr 12, 2023 at 05:52:40PM -0500, Justin Pryzby wrote: > I don't think you need to call parse_compress_specification(NONE). > As you wrote it, if zlib is unavailable, there's no parse(NONE) call, > even for directory and custom formats. And there's no parse(NONE) call > for plan format

Re: Wrong results from Parallel Hash Full Join

2023-04-12 Thread Melanie Plageman
On Wed, Apr 12, 2023 at 6:50 PM Thomas Munro wrote: > > On Thu, Apr 13, 2023 at 9:48 AM Melanie Plageman > wrote: > > Attached patch includes the fix for ExecParallelHashTableInsert() as > > well as a test. I toyed with adapting one of the existing parallel full > > hash join tests to cover this

Clean up hba.c of code freeing regexps

2023-04-12 Thread Michael Paquier
Hi all, With db4f21e in place, there is no need to worry about explicitely freeing any regular expressions that may have been compiled when loading HBA or ident files because MemoryContextDelete() would be able to take care of that now that these are palloc'd (the definitions in regcustom.h

Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)

2023-04-12 Thread Andy Fan
On Thu, Apr 13, 2023 at 6:09 AM David Rowley wrote: > .On Thu, 13 Apr 2023 at 02:28, Andy Fan wrote: > > The concept of startup_tuples for a WindowAgg looks good to me, but I > > can't follow up with the below line: > > > > + return clamp_row_est(partition_tuples * DEFAULT_INEQ_SEL); > > > > #

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Daniel Gustafsson
> On 12 Apr 2023, at 23:46, Daniel Gustafsson wrote: >> On 12 Apr 2023, at 23:40, Tom Lane wrote: >> So this smells to me like a new OpenSSL bug: they should tolerate >> a missing certs dir like they used to. Who wants to file it? > > They are specifying that: "A missing default location is

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Yurii Rashkovskii
Tom, Robert, Greg, Andrew, On Thu, Apr 13, 2023 at 12:56 AM Tom Lane wrote: > Robert Haas writes: > > On Wed, Apr 12, 2023 at 1:31 PM Greg Stark wrote: > >> I don't object to using the pid file as the mechanism -- but it is a > >> bit of an awkward UI for shell scripting. I imagine it would

Re: Add LZ4 compression in pg_dump

2023-04-12 Thread Justin Pryzby
On Thu, Apr 13, 2023 at 07:23:48AM +0900, Michael Paquier wrote: > On Tue, Apr 11, 2023 at 08:19:59PM -0500, Justin Pryzby wrote: > > On Wed, Apr 12, 2023 at 10:07:08AM +0900, Michael Paquier wrote: > >> Yes, this comment gives no value as it stands. I would be tempted to > >> follow the

Re: Wrong results from Parallel Hash Full Join

2023-04-12 Thread Thomas Munro
On Thu, Apr 13, 2023 at 9:48 AM Melanie Plageman wrote: > Attached patch includes the fix for ExecParallelHashTableInsert() as > well as a test. I toyed with adapting one of the existing parallel full > hash join tests to cover this case, however, I think Richard's repro is > much more clear.

Add ps display while waiting for wal in read_local_xlog_page_guts

2023-04-12 Thread sirisha chamarthi
Hi, pg_create_logical_replication_slot can take longer than usual on a standby when there is no activity on the primary. We don't have enough information in the pg_stat_activity or process title to debug why this is taking so long. Attached a small patch to update the process title while waiting

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-12 Thread Michael Paquier
On Wed, Apr 12, 2023 at 03:30:03PM +0300, Aleksander Alekseev wrote: > Any objections if we remove the tests for "user"? Based on some rather-recent experience in this area with COERCE_SQL_SYNTAX, the relationship between the SQL keywords and the way they can handled internally could be tricky if

Re: Add LZ4 compression in pg_dump

2023-04-12 Thread Michael Paquier
On Tue, Apr 11, 2023 at 08:19:59PM -0500, Justin Pryzby wrote: > On Wed, Apr 12, 2023 at 10:07:08AM +0900, Michael Paquier wrote: >> Yes, this comment gives no value as it stands. I would be tempted to >> follow the suggestion to group the whole code block in a single ifdef, >> including the

Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)

2023-04-12 Thread David Rowley
.On Thu, 13 Apr 2023 at 02:28, Andy Fan wrote: > The concept of startup_tuples for a WindowAgg looks good to me, but I > can't follow up with the below line: > > + return clamp_row_est(partition_tuples * DEFAULT_INEQ_SEL); > > # select count(*) over() from tenk1 limit 1; > count > --- >

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Michael Paquier
On Wed, Apr 12, 2023 at 02:24:30PM -0400, Tom Lane wrote: > I don't really want external code knowing that line 4 is the port, > because I foresee us breaking that someday --- what will happen > when we want to allow one postmaster to support multiple ports? > Maybe we'll decide that we don't have

Re: Wrong results from Parallel Hash Full Join

2023-04-12 Thread Melanie Plageman
On Wed, Apr 12, 2023 at 2:59 PM Melanie Plageman wrote: > > On Wed, Apr 12, 2023 at 2:14 PM Andres Freund wrote: > > > > Hi, > > > > On 2023-04-12 10:57:17 -0400, Melanie Plageman wrote: > > > HeapTupleHeaderHasMatch() checks if HEAP_TUPLE_HAS_MATCH is set. > > > > > > In htup_details.h, you

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Daniel Gustafsson
> On 12 Apr 2023, at 23:40, Tom Lane wrote: > > Peter Eisentraut writes: >> On 12.04.23 22:52, Jacob Champion wrote: >>> Does the test start passing if you create an empty certs directory? It >>> still wouldn't explain why Daniel's setup is succeeding... > >> After >> mkdir

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Tom Lane
Peter Eisentraut writes: > On 12.04.23 22:52, Jacob Champion wrote: >> Does the test start passing if you create an empty certs directory? It >> still wouldn't explain why Daniel's setup is succeeding... > After > mkdir /usr/local/etc/openssl@3/certs > the tests pass! Likewise, though MacPorts

Re: Parallel Full Hash Join

2023-04-12 Thread Thomas Munro
On Mon, Apr 10, 2023 at 11:33 AM Michael Paquier wrote: > On Sat, Apr 08, 2023 at 02:19:54PM -0400, Melanie Plageman wrote: > > Another worker attached to the batch barrier, saw that it was in > > PHJ_BATCH_SCAN, marked it done and detached. This is fine. > > BarrierArriveAndDetachExceptLast() is

more elogs hit by sqlsmith (Re: amvalidate(): cache lookup failed for operator class 123)

2023-04-12 Thread Justin Pryzby
On Mon, Feb 13, 2023 at 07:50:53AM -0600, Justin Pryzby wrote: > On Thu, May 13, 2021 at 12:01:22PM -0500, Justin Pryzby wrote: > > postgres=# select amvalidate(123); > > ERROR: cache lookup failed for operator class 123 > > The usual expectation is that sql callable functions should return null

Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

2023-04-12 Thread David Rowley
On Thu, 13 Apr 2023 at 00:34, Tom Lane wrote: > Thanks for looking at this. After sleeping on it, I'm inclined > to use the v1 patch in the back branches and do the cost fixups > only in HEAD. I'm also fine with v1 for the back branches. David

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Peter Eisentraut
On 12.04.23 22:52, Jacob Champion wrote: It surprises me that you can get a successful test with a missing certs directory. If I remove the workaround in Cirrus, I get the following error, which looks the same to me: [20:40:00.253](0.000s) not ok 121 - sslrootcert=system does not connect

Re: Documentation for building with meson

2023-04-12 Thread Peter Eisentraut
On 11.04.23 19:18, Andres Freund wrote: Subject: [PATCH v9 2/5] Add data layout options sub-section in installation docs This commit separates out blocksize, segsize and wal_blocksize options into a separate Data layout options sub-section in both the make and meson docs. They were earlier in

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Tom Lane
Oh! I was a little behind on MacPorts updates, and after pulling the latest (taking their openssl from 3.0.8 to 3.1.0) I can duplicate Peter's problem: # +++ tap check in src/test/ssl +++ t/001_ssltests.pl .. 120/? # Failed test 'sslrootcert=system does not connect with private CA: matches' #

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Jacob Champion
(Peter, your emails are being redirected to spam for me, FYI. Something about messagingengine.) On Wed, Apr 12, 2023 at 12:57 PM Daniel Gustafsson wrote: > > On 12 Apr 2023, at 21:43, Peter Eisentraut > > wrote: > > On 12.04.23 18:54, Jacob Champion wrote: > >> Peter, you should have a

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Daniel Gustafsson
> On 12 Apr 2023, at 22:23, Tom Lane wrote: > > Daniel Gustafsson writes: >> We don't have great coverage of macOS in the buildfarm sadly, I wonder if can >> get sifaka to run the SSL tests if we ask nicely? > > I was just looking into that, but it seems like it'd be a mess. > > I have a

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Tom Lane
Daniel Gustafsson writes: > We don't have great coverage of macOS in the buildfarm sadly, I wonder if can > get sifaka to run the SSL tests if we ask nicely? I was just looking into that, but it seems like it'd be a mess. I have a modern openssl installation from MacPorts, but if I try to

Re: Temporary tables versus wraparound... again

2023-04-12 Thread Greg Stark
On Wed, 5 Apr 2023 at 13:42, Andres Freund wrote: > > ISTM that the problem here really is that you're relying on RecentXmin, rather > than computing something more accurate. Why not use > GetOldestNonRemovableTransactionId(rel) - It's a bit more expensive, but I > don't think it'll matter

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Daniel Gustafsson
> On 12 Apr 2023, at 21:43, Peter Eisentraut > wrote: > > On 12.04.23 18:54, Jacob Champion wrote: >> Peter, you should have a .../etc/openssl@3/certs directory somewhere >> in your Homebrew installation prefix -- do you, or has Homebrew >> removed it by mistake? > > I don't have that, but I

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Peter Eisentraut
On 12.04.23 18:54, Jacob Champion wrote: Peter, you should have a .../etc/openssl@3/certs directory somewhere in your Homebrew installation prefix -- do you, or has Homebrew removed it by mistake? I don't have that, but I don't have it for openssl@1.1 either. I have ~$ ll

Re: Wrong results from Parallel Hash Full Join

2023-04-12 Thread Melanie Plageman
On Wed, Apr 12, 2023 at 2:14 PM Andres Freund wrote: > > Hi, > > On 2023-04-12 10:57:17 -0400, Melanie Plageman wrote: > > HeapTupleHeaderHasMatch() checks if HEAP_TUPLE_HAS_MATCH is set. > > > > In htup_details.h, you will see that HEAP_TUPLE_HAS_MATCH is defined as > > HEAP_ONLY_TUPLE > > /* >

Re: Direct I/O

2023-04-12 Thread Andrew Dunstan
On 2023-04-12 We 12:38, Dagfinn Ilmari Mannsåker wrote: Andrew Dunstan writes: On 2023-04-12 We 10:23, Dagfinn Ilmari Mannsåker wrote: Andrew Dunstan writes: On 2023-04-12 We 01:48, Thomas Munro wrote: On Wed, Apr 12, 2023 at 3:04 PM Thomas Munrowrote: On Wed, Apr 12, 2023 at 2:56 

Re: testing sepgsql in CI

2023-04-12 Thread Joe Conway
On 4/12/23 14:17, Andres Freund wrote: Hi, Forking of [1]. On 2023-04-12 14:11:10 -0400, Joe Conway wrote: On 4/12/23 13:44, Alvaro Herrera wrote: > Revert "Catalog NOT NULL constraints" and fallout > > This reverts commit e056c557aef4 and minor later fixes thereof. Seems 76c111a7f1 (as well

Re: postgres_fdw, dblink, and CREATE SUBSCRIPTION security

2023-04-12 Thread Jacob Champion
On 3/30/23 11:13, Stephen Frost wrote: >> Okay, but this is walking back from the network example you just >> described upthread. Do you still consider that in scope, or...? > > The concern around the network certainly needs to be in-scope overall. Sounds good! > Who are we trusting with what?

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Tom Lane
Robert Haas writes: > On Wed, Apr 12, 2023 at 1:56 PM Tom Lane wrote: >> Yeah. My main concern here is with limiting our ability to change >> the pidfile format in future. If we can keep the dependencies on that >> localized to code we control, it'd be much better. > I don't know if it's

Re: postgres_fdw, dblink, and CREATE SUBSCRIPTION security

2023-04-12 Thread Jacob Champion
On 3/30/23 05:58, Robert Haas wrote: > On Fri, Mar 24, 2023 at 5:47 PM Jacob Champion > wrote: >> Okay, but this is walking back from the network example you just >> described upthread. Do you still consider that in scope, or...? > > Sorry, I don't know which example you mean. The symmetrical

testing sepgsql in CI

2023-04-12 Thread Andres Freund
Hi, Forking of [1]. On 2023-04-12 14:11:10 -0400, Joe Conway wrote: > On 4/12/23 13:44, Alvaro Herrera wrote: > > Revert "Catalog NOT NULL constraints" and fallout > > > > This reverts commit e056c557aef4 and minor later fixes thereof. > > Seems 76c111a7f1 (as well as some other maybe) needs to

Re: Wrong results from Parallel Hash Full Join

2023-04-12 Thread Andres Freund
Hi, On 2023-04-12 10:57:17 -0400, Melanie Plageman wrote: > HeapTupleHeaderHasMatch() checks if HEAP_TUPLE_HAS_MATCH is set. > > In htup_details.h, you will see that HEAP_TUPLE_HAS_MATCH is defined as > HEAP_ONLY_TUPLE > /* > * HEAP_TUPLE_HAS_MATCH is a temporary flag used during hash joins.

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Robert Haas
On Wed, Apr 12, 2023 at 1:56 PM Tom Lane wrote: > Yeah. My main concern here is with limiting our ability to change > the pidfile format in future. If we can keep the dependencies on that > localized to code we control, it'd be much better. I don't know if it's considered officially supported,

Re: Allowing parallel-safe initplans

2023-04-12 Thread Robert Haas
On Wed, Apr 12, 2023 at 12:44 PM Tom Lane wrote: > Pursuant to the discussion at [1], here's a patch that removes our > old restriction that a plan node having initPlans can't be marked > parallel-safe (dating to commit ab77a5a45). That was really a special > case of the fact that we couldn't

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Tom Lane
Robert Haas writes: > On Wed, Apr 12, 2023 at 1:31 PM Greg Stark wrote: >> I don't object to using the pid file as the mechanism -- but it is a >> bit of an awkward UI for shell scripting. I imagine it would be handy >> if pg_ctl had an option to just print the port number so you could get >> it

Re: Adding argument names to aggregate functions

2023-04-12 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Hi hackers, > > I'm sure I'm not the only one who can never remember which way around > the value and delimiter arguments go for string_agg() and has to look it > up in the manual every time. To make it more convenient, here's a patch > that adds proargnames to

Re: Tab completion for AT TIME ZONE

2023-04-12 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Hi hackers, > > A while back we added support for completing time zone names after SET > TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. > Here's a trivial patch for that. Added to the 2023-07 commitfest:

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Robert Haas
On Wed, Apr 12, 2023 at 1:31 PM Greg Stark wrote: > I don't object to using the pid file as the mechanism -- but it is a > bit of an awkward UI for shell scripting. I imagine it would be handy > if pg_ctl had an option to just print the port number so you could get > it with a simple port=`pg_ctl

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Greg Stark
On Wed, 12 Apr 2023 at 11:02, Robert Haas wrote: > > I mostly just wanted to say that I disagreed with Tom about the > particular point on postmaster.pid, without really expressing an > opinion about anything else. I don't object to using the pid file as the mechanism -- but it is a bit of an

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-04-12 Thread Jacob Champion
On Wed, Apr 12, 2023 at 2:24 AM Daniel Gustafsson wrote: > > On 12 Apr 2023, at 09:11, Peter Eisentraut > > wrote: > > # Failed test 'sslrootcert=system does not connect with private CA: > > matches' > > # at t/001_ssltests.pl line 479. > > # 'psql: error: connection to

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Jacob Champion
On Fri, Apr 7, 2023 at 5:07 AM Andrew Dunstan wrote: > For TAP tests we have pretty much resolved the port collisions issue for TCP > ports too. See commit 9b4eafcaf4 The Cirrus config still has the following for the Windows tests: # Avoids port conflicts between concurrent tap test runs

Allowing parallel-safe initplans

2023-04-12 Thread Tom Lane
Pursuant to the discussion at [1], here's a patch that removes our old restriction that a plan node having initPlans can't be marked parallel-safe (dating to commit ab77a5a45). That was really a special case of the fact that we couldn't transmit subplans to parallel workers at all. We fixed that

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Jonathan S. Katz
On 4/12/23 12:22 PM, Stephen Frost wrote: Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost writes: Updated patch set attached. LGTM Great, thanks. I cleaned up the commit messages a bit more and added links to the discussion. If there isn't anything more then I'll plan

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Daniel Gustafsson
> On 12 Apr 2023, at 16:55, Stephen Frost wrote: > > Greetings, > > * Daniel Gustafsson (dan...@yesql.se) wrote: >>> On 12 Apr 2023, at 16:33, Stephen Frost wrote: >>> Sure, reworked that way and attached. >> >> While not changed in this hunk, does the comment regarding Heimdal still >>

Re: Direct I/O

2023-04-12 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 2023-04-12 We 10:23, Dagfinn Ilmari Mannsåker wrote: >> Andrew Dunstan writes: >> >>> On 2023-04-12 We 01:48, Thomas Munro wrote: On Wed, Apr 12, 2023 at 3:04 PM Thomas Munro wrote: > On Wed, Apr 12, 2023 at 2:56 PM Christoph Berg wrote: >> I'm

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Mark Dilger
> On Apr 12, 2023, at 8:01 AM, Robert Haas wrote: > > "hey, I'd like that too" I like the idea in principle. I have been developing a testing infrastructure in my spare time and would rather not duplicate Andrew's TAP logic. If we get this pushed down into the server itself, all the test

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Updated patch set attached. > > LGTM Great, thanks. I cleaned up the commit messages a bit more and added links to the discussion. If there isn't anything more then I'll plan to push these later today or tomorrow.

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Andrew Dunstan
On 2023-04-12 We 11:01, Robert Haas wrote: On Tue, Apr 11, 2023 at 10:17 PM Yurii Rashkovskii wrote: I appreciate your support on the pid file concern. What questions do you have about this feature with regard to its desirability and/or implementation? I'd love to learn from your insight

Add two missing tests in 035_standby_logical_decoding.pl

2023-04-12 Thread Drouvot, Bertrand
hi hackers, In the logical decoding on standby thread [1], Andres proposed 2 new tests (that I did not find the time to complete before the finish line): - Test that we can subscribe to the standby (with the publication created on the primary) - Verify that invalidated logical slots do not

Re: Direct I/O

2023-04-12 Thread Andrew Dunstan
On 2023-04-12 We 10:23, Dagfinn Ilmari Mannsåker wrote: Andrew Dunstan writes: On 2023-04-12 We 01:48, Thomas Munro wrote: On Wed, Apr 12, 2023 at 3:04 PM Thomas Munro wrote: On Wed, Apr 12, 2023 at 2:56 PM Christoph Berg wrote: I'm hitting a panic in t_004_io_direct. The build is

Re: refactoring basebackup.c

2023-04-12 Thread Robert Haas
On Wed, Apr 12, 2023 at 10:57 AM Justin Pryzby wrote: > I think these maybe got forgotten ? Committed. -- Robert Haas EDB: http://www.enterprisedb.com

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Tom Lane
Stephen Frost writes: > Updated patch set attached. LGTM regards, tom lane

Re: meson documentation build open issues

2023-04-12 Thread Peter Eisentraut
On 07.04.23 16:39, Andrew Dunstan wrote: 5. There doesn't appear to be an equivalent of "make world" and "make install-world" that includes documentation builds. This has been addressed with the additional meson auto options.  But it seems that these options only control building, not

Re: is_superuser is not documented

2023-04-12 Thread Fujii Masao
On 2023/04/12 5:41, Joseph Koshakow wrote: Having said all that I actually think this is the best place for is_superuser since it doesn't seem to fit in anywhere else. Yeah, I also could not find more appropriate place for is_superuser than there. I was implying that I thought it would

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-12 Thread Robert Haas
On Tue, Apr 11, 2023 at 10:17 PM Yurii Rashkovskii wrote: > I appreciate your support on the pid file concern. What questions do you have > about this feature with regard to its desirability and/or implementation? I'd > love to learn from your insight and address any of those if I can. I don't

Re: Improve the performance of nested loop join in the case of partitioned inner table

2023-04-12 Thread Alexandr Nikulin
The following tests demonstrate the speedup which may be achieved with my patch: 1. Add to postgresql.conf enable_hashjoin = OFF enable_mergejoin = OFF enable_material = OFF enable_bitmapscan = OFF enable_nestloop = ON max_parallel_workers_per_gather = 0 enable_memoize = OFF 2. create test

Re: refactoring basebackup.c

2023-04-12 Thread Justin Pryzby
On Fri, Mar 24, 2023 at 10:46:37AM -0400, Robert Haas wrote: > On Thu, Mar 23, 2023 at 4:11 PM Robert Haas wrote: > > On Wed, Mar 22, 2023 at 10:09 PM Thomas Munro > > wrote: > > > > BaseBackupSync is not documented > > > > BaseBackupWrite is not documented > > > > > > [Resending with trimmed

Re: Wrong results from Parallel Hash Full Join

2023-04-12 Thread Melanie Plageman
On Wed, Apr 12, 2023 at 7:36 AM Richard Guo wrote: > > I came across $subject and reduced the repro query as below. > > create table a (i int); > create table b (i int); > insert into a values (1); > insert into b values (2); > update b set i = 2; > > set min_parallel_table_scan_size to 0; > set

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Stephen Frost
Greetings, * Daniel Gustafsson (dan...@yesql.se) wrote: > > On 12 Apr 2023, at 16:33, Stephen Frost wrote: > > Sure, reworked that way and attached. > > While not changed in this hunk, does the comment regarding Heimdal still > apply? > > @@ -918,6 +919,7 @@ pg_GSS_recvauth(Port *port) >

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Jonathan S. Katz
On 4/12/23 10:47 AM, Stephen Frost wrote: Greetings, * Jonathan S. Katz (jk...@postgresql.org) wrote: On 4/12/23 10:33 AM, Stephen Frost wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost writes: Understood. Please find attached the updated patch with changes to the commit

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Stephen Frost
Greetings, * Jonathan S. Katz (jk...@postgresql.org) wrote: > On 4/12/23 10:33 AM, Stephen Frost wrote: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > > Stephen Frost writes: > > > > Understood. Please find attached the updated patch with changes to the > > > > commit message to indicate that

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Daniel Gustafsson
> On 12 Apr 2023, at 16:33, Stephen Frost wrote: > Sure, reworked that way and attached. While not changed in this hunk, does the comment regarding Heimdal still apply? @@ -918,6 +919,7 @@ pg_GSS_recvauth(Port *port) int mtype; StringInfoData buf;

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Jonathan S. Katz
On 4/12/23 10:33 AM, Stephen Frost wrote: Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost writes: Understood. Please find attached the updated patch with changes to the commit message to indicate that we now require MIT Kerberos, an additional explicit check for gssapi_ext.h

Note new NULLS NOT DISTINCT on unique index tutorial page

2023-04-12 Thread David Gilman
The SQL Language part of the docs has a brief page on unique indexes. It doesn't mention the new NULLS NOT DISTINCT functionality on unique indexes and this is a good place to mention it, as it already warns the user about the old/default behavior. -- David Gilman :DG< From

Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-12 Thread Fujii Masao
On 2023/04/12 12:00, Kyotaro Horiguchi wrote: At Wed, 12 Apr 2023 03:36:01 +0900, Fujii Masao wrote in Attached patch fixes this issue. It ensures that postgres_fdw only waits for a reply if a cancel request is actually issued. Additionally, it improves PQgetCancel() to set error messages

Re: longfin missing gssapi_ext.h

2023-04-12 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Understood. Please find attached the updated patch with changes to the > > commit message to indicate that we now require MIT Kerberos, an > > additional explicit check for gssapi_ext.h in configure.ac/configure, > >

Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)

2023-04-12 Thread Andy Fan
On Wed, Apr 12, 2023 at 5:04 PM David Rowley wrote: > > With the attached patch, that turns into: > The concept of startup_tuples for a WindowAgg looks good to me, but I can't follow up with the below line: + return clamp_row_est(partition_tuples * DEFAULT_INEQ_SEL); # select count(*) over()

Re: Direct I/O

2023-04-12 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 2023-04-12 We 01:48, Thomas Munro wrote: >> On Wed, Apr 12, 2023 at 3:04 PM Thomas Munro wrote: >>> On Wed, Apr 12, 2023 at 2:56 PM Christoph Berg wrote: I'm hitting a panic in t_004_io_direct. The build is running on overlayfs on tmpfs/ext4 (upper/lower)

Re: Direct I/O

2023-04-12 Thread Dagfinn Ilmari Mannsåker
Thomas Munro writes: > I think I have that working OK. Any Perl hackers want to comment on > my use of IO::File (copied from examples on the internet that showed > how to use O_DIRECT)? I am not much of a perl hacker but according to > my package manager, IO/File.pm came with perl itself.

Re: Infinite Interval

2023-04-12 Thread Ashutosh Bapat
On Sat, Apr 8, 2023 at 8:54 PM Joseph Koshakow wrote: > > I was also unable to find a definition of oscillating or monotonically > increasing in this context. I used the existing timestamps and dates > code to form my own definition: > > If there exists an two intervals with the same sign, such

Re: Direct I/O

2023-04-12 Thread Andrew Dunstan
On 2023-04-12 We 01:48, Thomas Munro wrote: On Wed, Apr 12, 2023 at 3:04 PM Thomas Munro wrote: On Wed, Apr 12, 2023 at 2:56 PM Christoph Berg wrote: I'm hitting a panic in t_004_io_direct. The build is running on overlayfs on tmpfs/ext4 (upper/lower) which is probably a weird combination

Bufmgr possible overflow

2023-04-12 Thread Ranier Vilela
Hi, IMO I think that commit 31966b1 has an oversight. All the logic of the changes are based on the "extend_by" variable, which is a uint32, but in some places it is using "int", which can lead to an overflow

Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

2023-04-12 Thread Tom Lane
Richard Guo writes: > On Wed, Apr 12, 2023 at 3:59 AM Tom Lane wrote: >> The v1 patch attached is enough to fix the immediate issue, >> but there's another thing not to like, which is that we're also >> discarding the costs associated with the initplans. That's >> strictly cosmetic given that

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-12 Thread Aleksander Alekseev
Hi, > Whether we need to have a test for this at all is perhaps a > more interesting argument. This was my initial thought but since somebody put it there I assumed this is a very important test. Any objections if we remove the tests for "user"? -- Best regards, Aleksander Alekseev

Re: Add index scan progress to pg_stat_progress_vacuum

2023-04-12 Thread Imseih (AWS), Sami
> This should be OK (also checked the code paths where the reports are > added). Note that the patch needed a few adjustments for its > indentation. Thanks for the formatting corrections! This looks good to me. -- Sami

  1   2   >