Re: Add jsonlog log_destination for JSON server logs

2021-09-07 Thread Michael Paquier
On Wed, Sep 01, 2021 at 04:39:43PM -0400, Sehrope Sarkuni wrote: > That makes the elog.c changes in the JSON logging patch minimal as all it's > really doing is invoking the new write_jsonlog(...) function. Looking at 0001, to do things in order. > @@ -46,8 +46,8 @@ typedef struct > char

Re: PG Docs - CREATE SUBSCRIPTION option list order

2021-09-07 Thread Peter Smith
v2 --> v3 The subscription_parameter names are now split into 2 groups using Amit's suggestion [1] on how to categorise them. I also made some grammar improvements to their descriptions. PSA. -- [1] https://www.postgresql.org/message-id/CAA4eK1Kmu74xHk2jcHTmKq8HBj3xK6n%3DRfiJB6dfV5zVSqqiFg

Re: parallelizing the archiver

2021-09-07 Thread Julien Rouhaud
On Wed, Sep 8, 2021 at 6:36 AM Bossart, Nathan wrote: > > I'd like to gauge interest in parallelizing the archiver process. > [...] > Based on previous threads I've seen, I believe many in the community > would like to replace archive_command entirely, but what I'm proposing > here would build on

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

2021-09-07 Thread Michael Paquier
On Tue, Sep 07, 2021 at 02:43:15PM -0700, Rachel Heaton wrote: > Running check tests in the pg_upgrade folder fails for this reason. Thanks, rebased as attached. Andrew has posted another patch set that completely reworks the shape of the modules by moving them into a dedicated namespace, meaning

Re: Gather performance analysis

2021-09-07 Thread Andres Freund
Hi, On 2021-09-08 11:45:16 +0530, Dilip Kumar wrote: > On Wed, Sep 8, 2021 at 3:08 AM Andres Freund wrote: > > > > Looking at this profile made me wonder if this was a build without > > optimizations. The pg_atomic_read_u64()/pg_atomic_read_u64_impl() calls > > should > > be inlined. And while

Re: [BUG]Update Toast data failure in logical replication

2021-09-07 Thread Dilip Kumar
On Wed, Sep 8, 2021 at 11:26 AM Ajin Cherian wrote: > On Wed, Aug 11, 2021 at 10:45 PM Dilip Kumar > wrote: > > > Yeah we can avoid that by detecting any toasted replica identity key > > in HeapDetermineModifiedColumns, check the attached patch. > > > > I had a second look at this, and I just ha

Re: .ready and .done files considered harmful

2021-09-07 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 18:40:24 +, "Bossart, Nathan" wrote in > On 9/7/21, 11:31 AM, "Robert Haas" wrote: > > I guess we still have to pick one or the other, but I don't really > > know how to do that, since both methods seem to be relatively fine, > > and the scenarios where one is better than

Re: Gather performance analysis

2021-09-07 Thread Dilip Kumar
On Wed, Sep 8, 2021 at 3:08 AM Andres Freund wrote: > Looking at this profile made me wonder if this was a build without > optimizations. The pg_atomic_read_u64()/pg_atomic_read_u64_impl() calls > should > be inlined. And while perf can reconstruct inlined functions when using > --call-graph=dwa

Re: [UNVERIFIED SENDER] Re: Challenges preventing us moving to 64 bit transaction id (XID)?

2021-09-07 Thread Michael Paquier
On Tue, Sep 07, 2021 at 02:38:13PM +0800, Julien Rouhaud wrote: > On Tue, Sep 7, 2021 at 12:20 PM Michael Paquier wrote: >> And a couple of months later, the development cycle of 15 has begun. >> While re-reading the thread, I got the impression that there is no >> reason to not move on with at le

Re: Gather performance analysis

2021-09-07 Thread Dilip Kumar
On Tue, Sep 7, 2021 at 8:41 PM Tomas Vondra wrote: > Hi, > > The numbers presented in this thread seem very promising - clearly > there's significant potential for improvements. I'll run similar > benchmarks too, to get a better understanding of this. > Thanks for showing interest. > > Can you

Re: Allow escape in application_name

2021-09-07 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 11:30:27 +, "kuroda.hay...@fujitsu.com" wrote in > I attached the rebased version. Tests and descriptions were added. > In my understanding Ikeda-san's indication is included. I have some comments by a quick look. +* one have higher priority. See also th

Re: [BUG]Update Toast data failure in logical replication

2021-09-07 Thread Ajin Cherian
On Wed, Aug 11, 2021 at 10:45 PM Dilip Kumar wrote: > Yeah we can avoid that by detecting any toasted replica identity key > in HeapDetermineModifiedColumns, check the attached patch. > I had a second look at this, and I just had a small doubt. Since the convention is that for UPDATES, the old t

Re: Added schema level support for publication.

2021-09-07 Thread vignesh C
On Tue, Sep 7, 2021 at 5:10 PM Amit Kapila wrote: > > On Tue, Sep 7, 2021 at 12:45 PM vignesh C wrote: > > > > On Fri, Sep 3, 2021 at 4:49 PM Amit Kapila wrote: > > > > > > > > 5. > > > If I modify the search path to remove public schema then I get the > > > below error message: > > > postgres=#

Re: The Free Space Map: Problems and Opportunities

2021-09-07 Thread Peter Geoghegan
On Tue, Sep 7, 2021 at 5:25 AM Hannu Krosing wrote: > Are you speaking of just heap pages here or also index pages ? Mostly heap pages, but FWIW I think it could work for index tuples too, with retail index tuple deletion. Because that allows you to even remove would-be LP_DEAD item pointers. >

Re: automatically generating node support functions

2021-09-07 Thread Noah Misch
On Tue, Sep 07, 2021 at 10:57:02AM +0200, Peter Eisentraut wrote: > On 02.09.21 20:53, Jacob Champion wrote: > >>0004-Make-node-output-prefix-match-node-structure-name.patch > >> > >>Some nodes' output/read functions use a label that is slightly different > >>from their node name, e.g., "NOTIFY" in

Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead

2021-09-07 Thread Laurenz Albe
On Fri, 2021-09-03 at 17:04 -0700, Andres Freund wrote: > Here's how I think that would look like. While writing up this draft, I found > two more issues: > > - On windows / 32 bit systems, the session time would overflow if idle for >   longer than ~4300s. long is only 32 bit. Easy to fix obvious

Re: Postgres perl module namespace

2021-09-07 Thread Noah Misch
On Tue, Sep 07, 2021 at 07:43:47AM -0400, Andrew Dunstan wrote: > On 9/6/21 1:08 AM, Michael Paquier wrote: > > On Sat, Sep 04, 2021 at 09:58:08AM -0400, Andrew Dunstan wrote: > >> On 9/4/21 2:19 AM, Noah Misch wrote: > >>> plperl uses PostgreSQL:: as the first component of its Perl module > >>> n

Re: Estimating HugePages Requirements?

2021-09-07 Thread Michael Paquier
On Tue, Sep 07, 2021 at 05:08:43PM +, Bossart, Nathan wrote: > On 9/6/21, 9:00 PM, "Michael Paquier" wrote: >> + sprintf(buf, "%lu MB", size_mb); >> + SetConfigOption("shared_memory_size", buf, PGC_INTERNAL, PGC_S_OVERRIDE); >> One small-ish comment about 0002: there is no need to add the

RE: Added missing invalidations for all tables publication

2021-09-07 Thread houzj.f...@fujitsu.com
> From Mon, Sep 6, 2021 1:56 PM Amit Kapila wrote: > > On Tue, Aug 31, 2021 at 8:54 PM vignesh C wrote: > > > Thanks for the comments, the attached v3 patch has the changes for > > > the same. > > > > > > > I think this bug should be fixed in back branches (till v10). OTOH, as > > this is not rep

Re: Improve logging when using Huge Pages

2021-09-07 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 08:16:53 -0500, Justin Pryzby wrote in > On Tue, Sep 07, 2021 at 07:12:36PM +0900, Fujii Masao wrote: > > One big concern about the patch is that log message is always reported > > when shared memory fails to be allocated with huge pages enabled > > when huge_pages=try. Since

Re: Remove Value node struct

2021-09-07 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 11:22:24 +0200, Peter Eisentraut wrote in > On 30.08.21 04:13, Kyotaro Horiguchi wrote: > > + else if (IsA(obj, Integer)) > > + _outInteger(str, (Integer *) obj); > > + else if (IsA(obj, Float)) > > + _outFloat(str, (Float *) obj); > > I felt that the t

Re: Possible missing segments in archiving on standby

2021-09-07 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 17:03:06 +0900, Fujii Masao wrote in > > + if (XLogArchivingAlways()) > > + XLogArchiveNotify(xlogfilename, true); > > + else > > + XLogArchiveForceDone(xlogfilename); > > The path is used both for crash and archive recovery. If we pas

Re: The Free Space Map: Problems and Opportunities

2021-09-07 Thread Peter Geoghegan
On Tue, Sep 7, 2021 at 12:31 PM Robert Haas wrote: > Doing work in the background has some advantages, though. In > particular, it has the possibly-large advantage of not slowing down > foreground work. What I really like about the idea of doing the work in the foreground (when it's clearly not g

Re: Bug in query rewriter - hasModifyingCTE not getting set

2021-09-07 Thread Greg Nancarrow
On Wed, Sep 8, 2021 at 8:00 AM Tom Lane wrote: > > "tsunakawa.ta...@fujitsu.com" writes: > > The attached patch is based on your version. It includes cosmetic > > changes to use = instead of |= for boolean variable assignments. > > Now, we could potentially make this work if we wrote code to run

Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)

2021-09-07 Thread Fujii Masao
On 2021/09/08 7:46, Tom Lane wrote: Fujii Masao writes: Pushed 0001 patch. Thanks! The buildfarm shows that this test case isn't terribly reliable. Yes... Thanks for reporting this! TBH, I think you should just remove the test case altogether. It does not look useful enough to justify

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-07 Thread Julien Rouhaud
On Tue, Sep 7, 2021 at 10:08 PM Tom Lane wrote: > > Julien Rouhaud writes: > > > Yes, but even if we eventually fix that my impression is that we would > > still enforce a limit of 128 characters (or bytes) as this is the SQL > > specification. > > Probably not. I think SQL says that's the minim

Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)

2021-09-07 Thread Tom Lane
Fujii Masao writes: > Pushed 0001 patch. Thanks! The buildfarm shows that this test case isn't terribly reliable. TBH, I think you should just remove the test case altogether. It does not look useful enough to justify a permanent expenditure of testing cycles, never mind the amount of effort tha

Re: Column Filtering in Logical Replication

2021-09-07 Thread Euler Taveira
On Mon, Sep 6, 2021, at 2:51 PM, Alvaro Herrera wrote: > I pushed the clerical part of this -- namely the addition of > PublicationTable node and PublicationRelInfo struct. I attach the part > of your v4 patch that I didn't include. It contains a couple of small > corrections, but I didn't do any

parallelizing the archiver

2021-09-07 Thread Bossart, Nathan
Hi hackers, I'd like to gauge interest in parallelizing the archiver process. From a quick scan, I was only able to find one recent thread [0] that brought up this topic, and ISTM the conventional wisdom is to use a backup utility like pgBackRest that does things in parallel behind- the-scenes. M

Re: Bug in query rewriter - hasModifyingCTE not getting set

2021-09-07 Thread Tom Lane
"tsunakawa.ta...@fujitsu.com" writes: > The attached patch is based on your version. It includes cosmetic > changes to use = instead of |= for boolean variable assignments. I think that's less "cosmetic" than "gratuitous breakage". The point here is that we are combining two rtables, so the que

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

2021-09-07 Thread Rachel Heaton
Hello Michael, This patch needs the update from 201a76183 -- the function `get_new_node` no longer exists. Running check tests in the pg_upgrade folder fails for this reason. Thank you, Rachel On Tue, Sep 7, 2021 at 2:06 PM Michael Paquier wrote: > On Tue, May 18, 2021 at 10:49:39AM +0900, Mi

Re: Atomic rename feature for Windows.

2021-09-07 Thread Victor Spirin
Thank you, In this variant: 1) renamed file win10.manifest to windows.manifest 2) renamed function pgrename_win10 to pgrename_windows_posix_semantics 3) Function pgrename returns result of pgrename_windows_posix_semantics function and not contiue run old version of function. 4) Added call G

Re: Gather performance analysis

2021-09-07 Thread Andres Freund
Hi, On 2021-08-06 14:00:48 +0530, Dilip Kumar wrote: > --Setup > SET parallel_tuple_cost TO 0 -- to test parallelism in the extreme case > CREATE TABLE t (a int, b varchar); > INSERT INTO t SELECT i, repeat('a', 200) from generate_series(1,2) as > i; > ANALYZE t; > Test query: EXPLAIN A

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2021-09-07 Thread Melanie Plageman
On Fri, Aug 13, 2021 at 3:08 AM Andres Freund wrote: > > Hi, > > On 2021-08-11 16:11:34 -0400, Melanie Plageman wrote: > > On Tue, Aug 3, 2021 at 2:13 PM Andres Freund wrote: > > > > diff --git a/src/backend/catalog/system_views.sql > > > > b/src/backend/catalog/system_views.sql > > > > index 55

Re: Read-only vs read only vs readonly

2021-09-07 Thread Magnus Hagander
On Fri, Sep 3, 2021 at 8:10 AM Kyotaro Horiguchi wrote: > > At Thu, 2 Sep 2021 22:07:02 +, "Bossart, Nathan" > wrote in > > On 9/2/21, 11:30 AM, "Magnus Hagander" wrote: > > > I had a customer point out to me that we're inconsistent in how we > > > spell read-only. Turns out we're not as in

Re: [PATCH] Add tab-complete for backslash commands

2021-09-07 Thread Tom Lane
"tanghy.f...@fujitsu.com" writes: > On Sunday, September 5, 2021 1:42 AM, Tom Lane wrote: >> I particularly question why we'd offer both >> single- and multiple-character versions, as the single-character >> version seems entirely useless from a completion standpoint. > I generally agreed with y

Re: Don't clean up LLVM state when exiting in a bad way

2021-09-07 Thread Justin Pryzby
On Tue, Sep 07, 2021 at 12:27:27PM -0700, Andres Freund wrote: > Hi, > > On 2021-08-18 15:00:59 +, Jelte Fennema wrote: > > I ran into some segfaults when using Postgres that was compiled with LLVM > > 7. According to the backtraces these crashes happened during the call to > > llvm_shutdown,

Re: The Free Space Map: Problems and Opportunities

2021-09-07 Thread Robert Haas
On Mon, Sep 6, 2021 at 8:29 PM Peter Geoghegan wrote: > On Mon, Sep 6, 2021 at 4:33 PM Hannu Krosing wrote: > > When I have been thinking of this type of problem it seems that the > > latest -- and correct :) -- place which should do all kinds of > > cleanup like removing aborted tuples, freezin

Re: Don't clean up LLVM state when exiting in a bad way

2021-09-07 Thread Andres Freund
Hi, On 2021-08-18 15:00:59 +, Jelte Fennema wrote: > I ran into some segfaults when using Postgres that was compiled with LLVM > 7. According to the backtraces these crashes happened during the call to > llvm_shutdown, during cleanup after another out of memory condition. It > seems that calls

Re: Correct handling of blank/commented lines in PSQL interactive-mode history

2021-09-07 Thread Tom Lane
[ this is a digression from the main point of the thread, but ... ] Alvaro Herrera writes: > I am particularly bothered by the uselessness > that M-# results in -- namely, inserting a # at the start of the buffer. Fixing that might be as simple as the attached. I've not beat on it hard though.

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-07 Thread Gavin Flower
On 8/09/21 2:08 am, Tom Lane wrote: Julien Rouhaud writes: On Tue, Sep 7, 2021 at 1:31 PM Michael Paquier wrote: Yeah. We should try to work toward removing the limits on NAMEDATALEN for the attribute names. Easier said than done :) Yes, but even if we eventually fix that my impression is

Re: CI/windows docker vs "am a service" autodetection on windows

2021-09-07 Thread Andres Freund
Hi, On 2021-08-16 15:34:51 +0200, Magnus Hagander wrote: > It wouldn't surprise me if it does break some *other* weird > cornercase, but based on the docs page you linked to it doesn't look > like it would break any of the normal/standard usecases. Yea, me neither... I do suspect that it'd have

Re: Correct handling of blank/commented lines in PSQL interactive-mode history

2021-09-07 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Sep-06, Laurenz Albe wrote: >> I agree with Greg that the current behavior is annoying and would >> welcome the change. This has bothered me before. > It has bothered me too. I'm not here to claim that the current behavior is perfect. However, AFAICT the patch

Re: CI/windows docker vs "am a service" autodetection on windows

2021-09-07 Thread Andres Freund
Hi, On 2021-08-15 11:25:01 -0300, Ranier Vilela wrote: > I found this function on the web, from OpenSSL, but I haven't tested it. > I think that there is one more way to test if a service is running > (SECURITY_INTERACTIVE_RID). I don't think that really addresses the issue. If a service starts p

Re: prevent immature WAL streaming

2021-09-07 Thread Bossart, Nathan
On 9/4/21, 10:26 AM, "Alvaro Herrera" wrote: > Attached are the same patches as last night, except I added a test for > XLOG_DEBUG where pertinent. (The elog(PANIC) is not made conditional on > that, since it's a cross-check rather than informative.) Also fixed the > silly pg_rewind mistake I ma

Re: .ready and .done files considered harmful

2021-09-07 Thread Bossart, Nathan
On 9/7/21, 11:31 AM, "Robert Haas" wrote: > I guess we still have to pick one or the other, but I don't really > know how to do that, since both methods seem to be relatively fine, > and the scenarios where one is better than the other all feel a little > bit contrived. I guess if no clear consens

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-07 Thread Tom Lane
torikoshia writes: > While working on [1], we found that EXPLAIN(VERBOSE) to CTE with SEARCH > BREADTH FIRST ends up ERROR. Yeah. It's failing here: * We're deparsing a Plan tree so we don't have a CTE * list. But the only place we'd see a Var directl

Re: .ready and .done files considered harmful

2021-09-07 Thread Robert Haas
On Tue, Sep 7, 2021 at 2:13 PM Bossart, Nathan wrote: > Right. The latest patch for that approach [0] does just that. In > fact, I think timeline files are the only files for which we need to > force an immediate directory scan in the multiple-files-per-scan > approach. For the keep-trying-the-

Re: .ready and .done files considered harmful

2021-09-07 Thread Bossart, Nathan
On 9/7/21, 10:54 AM, "Robert Haas" wrote: > I guess what I don't understand about the multiple-files-per-dirctory > scan implementation is what happens when something happens that would > require the keep-trying-the-next-file approach to perform a forced > scan. It seems to me that you still need

Re: VARDATA_COMPRESSED_GET_COMPRESS_METHOD comment?

2021-09-07 Thread Robert Haas
On Tue, Sep 7, 2021 at 11:56 AM Christoph Berg wrote: > In postgres.h, there are these macros for working with compressed > toast: > > > /* Decompressed size and compression method of an external compressed Datum */ > #define VARDATA_COMPR

Re: .ready and .done files considered harmful

2021-09-07 Thread Robert Haas
On Tue, Sep 7, 2021 at 1:28 PM Bossart, Nathan wrote: > Thanks for chiming in. The limit of 64 in the multiple-files-per- > directory-scan approach was mostly arbitrary. My earlier testing [0] > with different limits didn't reveal any significant difference, but > using a higher limit might yiel

Re: .ready and .done files considered harmful

2021-09-07 Thread Bossart, Nathan
On 9/7/21, 1:42 AM, "Kyotaro Horiguchi" wrote: > I was thinking that the multple-files approch would work efficiently > but the the patch still runs directory scans every 64 files. As > Robert mentioned it is still O(N^2). I'm not sure the reason for the > limit, but if it were to lower memory c

Re: Estimating HugePages Requirements?

2021-09-07 Thread Bossart, Nathan
On 9/6/21, 11:24 PM, "Kyotaro Horiguchi" wrote: > At Fri, 3 Sep 2021 17:46:05 +, "Bossart, Nathan" > wrote in >> On 9/2/21, 10:12 PM, "Kyotaro Horiguchi" wrote: >> > I noticed that postgres -C shared_memory_size showed 137 (= 144703488) >> > whereas the error message above showed 148897792

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

2021-09-07 Thread Tom Lane
Andrew Dunstan writes: > On 9/7/21 11:47 AM, Tom Lane wrote: >> so I'm coming around to the idea >> that we need to do something. I don't like the details of Thomas' >> proposal though; specifically I don't see a need to invent a new sslmode >> value. I think it should just be "if ~/.postgresql/

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

2021-09-07 Thread Andrew Dunstan
On 9/7/21 11:47 AM, Tom Lane wrote: > > This is not how I supposed it worked, That happens to me more than I usually admit -) > so I'm coming around to the idea > that we need to do something. I don't like the details of Thomas' > proposal though; specifically I don't see a need to invent a

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

2021-09-07 Thread Tom Lane
Andrew Dunstan writes: > You don't have to copy anything to achieve what you want. Just set the > sslrootcert parameter of your connection to point to the system file. e.g. > psql "sslmode=verify-full > sslrootcert=/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt ..." While that does wor

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-07 Thread Amul Sul
On Tue, 7 Sep 2021 at 8:43 PM, Mark Dilger wrote: > > > > On Aug 31, 2021, at 5:15 AM, Amul Sul wrote: > > > > Attached is the rebased version for the latest master head. > > Hi Amul! > > Could you please rebase again? > Ok will do that tomorrow, thanks. Regards, Amul

VARDATA_COMPRESSED_GET_COMPRESS_METHOD comment?

2021-09-07 Thread Christoph Berg
In postgres.h, there are these macros for working with compressed toast: /* Decompressed size and compression method of an external compressed Datum */ #define VARDATA_COMPRESSED_GET_EXTSIZE(PTR) \ (((varattrib_4b *) (PTR))->va_compres

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

2021-09-07 Thread Andrew Dunstan
On 9/7/21 10:57 AM, tho...@habets.se wrote: > On Tue, 7 Sep 2021 15:16:51 +0100, Andrew Dunstan said: >> can't you specify a CA cert in the system's >> CA store if necessary? e.g. on my Fedora system I think it's >> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt > I could, but that seem

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

2021-09-07 Thread Tom Lane
tho...@habets.se writes: > On Tue, 7 Sep 2021 15:16:51 +0100, Andrew Dunstan said: >> can't you specify a CA cert in the system's >> CA store if necessary? e.g. on my Fedora system I think it's >> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt > I could, but that seems more like a workar

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-07 Thread Mark Dilger
> On Aug 31, 2021, at 5:15 AM, Amul Sul wrote: > > Attached is the rebased version for the latest master head. Hi Amul! Could you please rebase again? — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Gather performance analysis

2021-09-07 Thread Tomas Vondra
Hi, The numbers presented in this thread seem very promising - clearly there's significant potential for improvements. I'll run similar benchmarks too, to get a better understanding of this. Can you share some basic details about the hardware you used? Particularly the CPU model - I guess this mi

Re: Parallelize correlated subqueries that execute within each worker

2021-09-07 Thread Zhihong Yu
On Tue, Sep 7, 2021 at 6:17 AM James Coleman wrote: > On Wed, Sep 1, 2021 at 7:06 AM Daniel Gustafsson wrote: > > > > > On 7 May 2021, at 18:30, James Coleman wrote: > > > > > ..here we are now, and I finally have this patch cleaned up > > > enough to share. > > > > This patch no longer applies

Re: [BUG?] SET TIME ZONE doesn't work with abbreviations

2021-09-07 Thread Aleksander Alekseev
David, Tom, > Well, given that the limitation is documented I’d have to say it is > intentional: > [...] > That's intentional, per the fine manual: > [...] My bad, I missed this. Many thanks! -- Best regards, Aleksander Alekseev

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

2021-09-07 Thread thomas
On Tue, 7 Sep 2021 15:16:51 +0100, Andrew Dunstan said: > can't you specify a CA cert in the system's > CA store if necessary? e.g. on my Fedora system I think it's > /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt I could, but that seems more like a workaround, where I have to change thi

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

2021-09-07 Thread Andrew Dunstan
On 9/6/21 6:21 PM, tho...@habets.se wrote: > On Mon, 6 Sep 2021 20:47:37 +0100, Tom Lane said: >> I'm confused by your description of this patch. AFAIK, OpenSSL verifies >> against the system-wide CA pool by default. Why do we need to do >> anything? > Experimentally, no it doesn't. Or if it d

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-07 Thread Tom Lane
Julien Rouhaud writes: > On Tue, Sep 7, 2021 at 1:31 PM Michael Paquier wrote: >> Yeah. We should try to work toward removing the limits on NAMEDATALEN >> for the attribute names. Easier said than done :) > Yes, but even if we eventually fix that my impression is that we would > still enforce

Re: [BUG?] SET TIME ZONE doesn't work with abbreviations

2021-09-07 Thread Tom Lane
Aleksander Alekseev writes: > I noticed that `SET TIME ZONE` / `SET timezone TO` don't work with > abbreviations: That's intentional, per the fine manual: A time zone abbreviation, for example PST. Such a specification merely defines a particular offset from UTC, in cont

Re: [BUG?] SET TIME ZONE doesn't work with abbreviations

2021-09-07 Thread David G. Johnston
On Tuesday, September 7, 2021, Aleksander Alekseev wrote: > Hi hackers, > > I noticed that `SET TIME ZONE` / `SET timezone TO` don't work with > abbreviations: > > Is it a bug or this behavior is intentional (something to do with SQL > standard, perhaps)? > > Well, given that the limitation is do

Re: Use "superuser" instead of "super user" in code comments

2021-09-07 Thread Bharath Rupireddy
On Tue, Sep 7, 2021 at 6:40 PM Daniel Gustafsson wrote: > > > On 7 Sep 2021, at 14:44, Bharath Rupireddy > > wrote: > > > It seems like we use "superuser" as a standard term across the entire > > code base i.e. error messages, docs, code comments. But there are > > still a few code comments that

Re: Parallelize correlated subqueries that execute within each worker

2021-09-07 Thread James Coleman
On Wed, Sep 1, 2021 at 7:06 AM Daniel Gustafsson wrote: > > > On 7 May 2021, at 18:30, James Coleman wrote: > > > ..here we are now, and I finally have this patch cleaned up > > enough to share. > > This patch no longer applies to HEAD, can you please submit a rebased version? See attached. Tha

Re: Improve logging when using Huge Pages

2021-09-07 Thread Justin Pryzby
On Tue, Sep 07, 2021 at 07:12:36PM +0900, Fujii Masao wrote: > One big concern about the patch is that log message is always reported > when shared memory fails to be allocated with huge pages enabled > when huge_pages=try. Since huge_pages=try is the default setting, > many users would see this ne

Increase log level in xlogreader.c ?

2021-09-07 Thread Jesper Pedersen
Hi, I have a 13.4 based setup (physical streaming replication) where the replica does the attach log upon startup, and when the first message is sent from the primary. There is the FATAL from when the WAL receiver shuts down, but I think it would be a benefit to have report_invalid_record()

Re: Use "superuser" instead of "super user" in code comments

2021-09-07 Thread Daniel Gustafsson
> On 7 Sep 2021, at 14:44, Bharath Rupireddy > wrote: > It seems like we use "superuser" as a standard term across the entire > code base i.e. error messages, docs, code comments. But there are > still a few code comments that use the term "super user". Can we > replace those with "superuser"? A

Use "superuser" instead of "super user" in code comments

2021-09-07 Thread Bharath Rupireddy
Hi, It seems like we use "superuser" as a standard term across the entire code base i.e. error messages, docs, code comments. But there are still a few code comments that use the term "super user". Can we replace those with "superuser"? Attaching a tiny patch to do that. Thoughts? Regards, Bhara

Re: Diagnostic comment in LogicalIncreaseXminForSlot

2021-09-07 Thread Ashutosh Bapat
Thanks Amit. On Tue, Sep 7, 2021 at 11:14 AM Amit Kapila wrote: > > On Mon, Sep 6, 2021 at 5:29 PM Ashutosh Bapat > wrote: > > > > Yeah, I agree. Sorry for missing that. > > > > The updated patch looks good to me. > > > > Pushed! > > -- > With Regards, > Amit Kapila. -- Best Wishes, Ashutosh

Re: The Free Space Map: Problems and Opportunities

2021-09-07 Thread Hannu Krosing
On Tue, Sep 7, 2021 at 2:29 AM Peter Geoghegan wrote: > > On Mon, Sep 6, 2021 at 4:33 PM Hannu Krosing wrote: > > When I have been thinking of this type of problem it seems that the > > latest -- and correct :) -- place which should do all kinds of > > cleanup like removing aborted tuples, freez

Re: OpenSSL 3.0.0 compatibility

2021-09-07 Thread Daniel Gustafsson
> On 10 Aug 2021, at 15:27, Daniel Gustafsson wrote: > These have now been committed, when OpenSSL 3.0.0 ships and there is coverage > in the buildfarm I’ll revisit this for the backbranches. As an update to this, I’ve tested the tree frozen for the upcoming 3.0.0 release (scheduled for today AF

Re: Small documentation improvement for ALTER SUBSCRIPTION

2021-09-07 Thread Daniel Gustafsson
> On 7 Sep 2021, at 13:36, Peter Eisentraut > wrote: > > On 12.08.21 04:52, Masahiko Sawada wrote: >> On Wed, Aug 11, 2021 at 5:42 PM Daniel Gustafsson wrote: >>> On 11 Aug 2021, at 09:57, Masahiko Sawada wrote: >>> Additionally, refresh options as described in refresh_option

Re: Non-decimal integer literals

2021-09-07 Thread Zhihong Yu
On Tue, Sep 7, 2021 at 4:13 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 16.08.21 17:32, John Naylor wrote: > > The one thing that jumped out at me on a cursory reading is > > the {integer} rule, which seems to be used nowhere except to > > call process_integer_literal, whi

Re: when the startup process doesn't (logging startup delays)

2021-09-07 Thread Justin Pryzby
On Tue, Sep 07, 2021 at 03:07:15PM +0530, Nitin Jadhav wrote: > > Looking over this version, I realized something I (or you) should have > > noticed sooner: you've added the RegisterTimeout call to > > InitPostgres(), but that's for things that are used by all backends, > > and this is only used by

Re: Postgres perl module namespace

2021-09-07 Thread Andrew Dunstan
On 9/6/21 1:08 AM, Michael Paquier wrote: > On Sat, Sep 04, 2021 at 09:58:08AM -0400, Andrew Dunstan wrote: >> On 9/4/21 2:19 AM, Noah Misch wrote: >>> plperl uses PostgreSQL:: as the first component of its Perl module >>> namespace. >>> We shouldn't use both PostgreSQL:: and Postgres:: in the s

Re: Added schema level support for publication.

2021-09-07 Thread Amit Kapila
On Tue, Sep 7, 2021 at 12:45 PM vignesh C wrote: > > On Fri, Sep 3, 2021 at 4:49 PM Amit Kapila wrote: > > > > > 5. > > If I modify the search path to remove public schema then I get the > > below error message: > > postgres=# Create publication mypub for all tables in schema current_schema; > >

Re: Small documentation improvement for ALTER SUBSCRIPTION

2021-09-07 Thread Peter Eisentraut
On 12.08.21 04:52, Masahiko Sawada wrote: On Wed, Aug 11, 2021 at 5:42 PM Daniel Gustafsson wrote: On 11 Aug 2021, at 09:57, Masahiko Sawada wrote: Additionally, refresh options as described in refresh_option of REFRESH PUBLICATION may be specified, except in the case of DROP PUBLICATION.

RE: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)

2021-09-07 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, Ikeda-san, > Pushed 0001 patch. Thanks! I confirmed your commit. Thanks! I attached the rebased version. Tests and descriptions were added. In my understanding Ikeda-san's indication is included. Best Regards, Hayato Kuroda FUJITSU LIMITED v10_0002_allow_escapes.patch Descript

Re: psql: \dl+ to list large objects privileges

2021-09-07 Thread Pavel Luzanov
Hi, On 06.09.2021 14:39, gkokola...@pm.me wrote: Thanks! The tests look good. A minor nitpick would be to also add a comment on the large object to verify that it is picked up correctly. Also: +\lo_unlink 42 +DROP ROLE lo_test; + That last empty line can be removed. The new ve

Re: What are exactly bootstrap processes, auxiliary processes, standalone backends, normal backends(user sessions)?

2021-09-07 Thread Bharath Rupireddy
On Tue, Sep 7, 2021 at 5:48 AM Alvaro Herrera wrote: > > On 2021-Aug-14, Justin Pryzby wrote: > > > I elaborated on your definition and added here. > > https://commitfest.postgresql.org/34/3285/ > > Thanks! This works for me. After looking at it, it seemed to me that > listing the autovacuum lau

Re: UNIQUE null treatment option

2021-09-07 Thread Peter Eisentraut
On 27.08.21 14:44, Marko Tiikkaja wrote: On Fri, Aug 27, 2021 at 3:38 PM Peter Eisentraut > wrote: In the SQL:202x draft, this has been formalized by making this implementation-defined and adding an option on unique constraint definitions UN

Re: Non-decimal integer literals

2021-09-07 Thread Peter Eisentraut
On 16.08.21 17:32, John Naylor wrote: The one thing that jumped out at me on a cursory reading is the {integer} rule, which seems to be used nowhere except to call process_integer_literal, which must then inspect the token text to figure out what type of integer it is. Maybe consider 4 separate

Re: Patching documentation of ALTER TABLE re column type changes on binary-coercible fields

2021-09-07 Thread Michael Banck
Hi, I've stumbled over this topic today, and found your patch. On Thu, Jan 23, 2020 at 11:01:36PM -0800, Mike Lissner wrote: > Enclosed please find a patch to tweak the documentation of the ALTER TABLE > page. I believe this patch is ready to be applied to master and backported > all the way to 9

Re: PROXY protocol support

2021-09-07 Thread Magnus Hagander
On Wed, Jul 14, 2021 at 8:24 PM Jacob Champion wrote: > > On Mon, 2021-07-12 at 18:28 +0200, Magnus Hagander wrote: > > Yeah, I have no problem being stricter than necessary, unless that > > actually causes any interop problems. It's a lot worse to not be > > strict enough.. > > Agreed. Haven't he

Re: Improve logging when using Huge Pages

2021-09-07 Thread Fujii Masao
On 2021/09/07 13:09, Shinoda, Noriyoshi (PN Japan FSIP) wrote: Hello, Thank you everyone for comments. In the thread [1] that Horiguchi told me about, there is already a review going on about GUC for HugePages memory. For this reason, I have removed the new GUC implementation and attached a

Re: when the startup process doesn't (logging startup delays)

2021-09-07 Thread Nitin Jadhav
> Looking over this version, I realized something I (or you) should have > noticed sooner: you've added the RegisterTimeout call to > InitPostgres(), but that's for things that are used by all backends, > and this is only used by the startup process. So it seems to me that > the right place is Star

Re: Avoid stuck of pbgench due to skipped transactions

2021-09-07 Thread Fabien COELHO
Hello Fujii-san, Stop counting skipped transactions under -T as soon as the timer is exceeded. Because otherwise it can take a very long time to count all of them especially when quite a lot of them happen with unrealistically high rate setting in -R, which would prevent pgbench from ending

Re: Remove Value node struct

2021-09-07 Thread Peter Eisentraut
On 30.08.21 04:13, Kyotaro Horiguchi wrote: However, the patch adds: +typedef struct Null +{ + NodeTag type; + char *val; +} Null; which doesn't seem to be used anywhere. Is that a leftoverf from an intermediate development stage? +1 Looks like so, it can be simply

RE: Added missing invalidations for all tables publication

2021-09-07 Thread houzj.f...@fujitsu.com
From Mon, Sep 6, 2021 1:56 PM Amit Kapila wrote: > On Tue, Aug 31, 2021 at 8:54 PM vignesh C wrote: > > Thanks for the comments, the attached v3 patch has the changes for the > > same. > > > > I think this bug should be fixed in back branches (till v10). OTOH, as this > is not > reported by an

Re: Add statistics refresh materialized view

2021-09-07 Thread Seino Yuki
On 2021-09-01 23:15, Fujii Masao wrote: Why do you want to treat only REFRESH MATERIALIZED VIEW command special? What about other utility commands like TRUNCATE, CLUSTER, etc? First of all, knowing the update date and time of the MATVIEW is essential for actual operation. Without that inform

Re: automatically generating node support functions

2021-09-07 Thread Peter Eisentraut
On 02.09.21 20:53, Jacob Champion wrote: 0004-Make-node-output-prefix-match-node-structure-name.patch Some nodes' output/read functions use a label that is slightly different from their node name, e.g., "NOTIFY" instead of "NOTIFYSTMT". This cleans that up so that an automated approach doesn't

Re: .ready and .done files considered harmful

2021-09-07 Thread Kyotaro Horiguchi
At Fri, 3 Sep 2021 18:31:46 +0530, Dipesh Pandit wrote in > Hi, > > Thanks for the feedback. > > > Which approach do you think we should use? I think we have decent > > patches for both approaches at this point, so perhaps we should see if > > we can get some additional feedback from the comm

Re: Support tab completion for upper character inputs in psql

2021-09-07 Thread Peter Eisentraut
On 23.06.21 14:43, tanghy.f...@fujitsu.com wrote: I've updated the patch to V8 since Tom, Kyotaro and Laurenz discussed the lower case issue of German/Turkish language at [1]. Differences from V7 are: * Add a function valid_input_text which checks the input text to see if it only contains alph

  1   2   >