RE: Optionally automatically disable logical replication subscriptions on error

2021-11-15 Thread osumi.takami...@fujitsu.com
On Friday, November 12, 2021 1:09 PM vignesh C wrote: > On Thu, Nov 11, 2021 at 2:50 PM osumi.takami...@fujitsu.com > wrote: > Thanks for the updated patch, Few comments: > 1) tab completion should be added for disable_on_error: > /* Complete "CREATE SUBSCRIPTION ... WITH ( " */ else if >

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2021-11-15 Thread Masahiko Sawada
On Tue, Sep 7, 2021 at 12:02 AM wrote: > > Hi, > > ‐‐‐ Original Message ‐‐‐ > On Tuesday, August 24th, 2021 at 13:20, Ranier Vilela > wrote: > > > Em ter., 24 de ago. de 2021 às 03:11, Masahiko Sawada > > escreveu: > > > > > On Mon, Aug 23, 2021 at 10:46 AM Masahiko Sawada > > >

Re: Unnecessary global variable declared in xlog.c

2021-11-15 Thread Tom Lane
Michael Paquier writes: > On Tue, Nov 16, 2021 at 11:17:27AM +0530, Amul Sul wrote: >> The attached patch moves the "LastRec" variable declaration inside >> StartupXLOG() where it is supposed to be. > Yes, reading through the code, your suggestion makes sense. I'll > double-check and apply if

Re: Skipping logical replication transactions on subscriber side

2021-11-15 Thread Masahiko Sawada
On Mon, Nov 15, 2021 at 11:43 PM vignesh C wrote: > > On Mon, Nov 15, 2021 at 2:48 PM Masahiko Sawada wrote: > > > > On Mon, Nov 15, 2021 at 4:49 PM Greg Nancarrow wrote: > > > > > > On Mon, Nov 15, 2021 at 1:49 PM Masahiko Sawada > > > wrote: > > > > > > > > I've attached an updated patch

Re: Unnecessary global variable declared in xlog.c

2021-11-15 Thread Michael Paquier
On Tue, Nov 16, 2021 at 11:17:27AM +0530, Amul Sul wrote: > The attached patch moves the "LastRec" variable declaration inside > StartupXLOG() where it is supposed to be. Yes, reading through the code, your suggestion makes sense. I'll double-check and apply if there are no objections. --

Re: parallel vacuum comments

2021-11-15 Thread Masahiko Sawada
On Tue, Nov 16, 2021 at 11:38 AM houzj.f...@fujitsu.com wrote: > > On Thur, Nov 11, 2021 10:41 AM Masahiko Sawada wrote: > > I've attached a draft patch that refactors parallel vacuum and separates > > parallel-vacuum-related code to new file vacuumparallel.c. > > After discussion, I'll divide

Unnecessary global variable declared in xlog.c

2021-11-15 Thread Amul Sul
Hi, The attached patch moves the "LastRec" variable declaration inside StartupXLOG() where it is supposed to be. -- Regards, Amul Sul EDB: http://www.enterprisedb.com remove_global_declaration.patch Description: Binary data

Re: On login trigger: take three

2021-11-15 Thread Greg Nancarrow
On Thu, Nov 11, 2021 at 8:56 PM Daniel Gustafsson wrote: > > +This flag is used to avoid extra lookups on the pg_event_trigger > table during each backend startup. > This should be pg_event_trigger. Sorry, missed that > one at that last read-through. > Fixed. > > - dathaslogintriggers

Re: [Proposal] Add foreign-server health checks infrastructure

2021-11-15 Thread Shinya Kato
Hi, Thank you for the patch! On 2021-10-30 12:50, kuroda.hay...@fujitsu.com wrote: ## Background Currently there is no way to check the status of an foreign server in PostgreSQL. If an foreign server's postmaster goes down, or if the network between servers is lost, the backend process will

Re: Added schema level support for publication.

2021-11-15 Thread vignesh C
On Tue, Nov 9, 2021 at 2:51 PM Amit Kapila wrote: > > On Tue, Nov 9, 2021 at 7:20 AM Peter Smith wrote: > > > > FYI - I spotted a trivial SQL mistake (?) of the schema publication patch > > [1]. > > > > See the file describe.c, function describeOneTableDetails. > > The new SQL has a 3rd UNION

Add psql command to list constraints

2021-11-15 Thread David G. Johnston
On Monday, November 15, 2021, Tatsuro Yamada wrote: > > > I don't know if this is a good example, but if you look at StackOverflow, > it seems that people who want to see a list of constraints appear > regularly. https://stackoverflow.com/questions/62987794/how-to-list-all >

Re: Add psql command to list constraints

2021-11-15 Thread Tatsuro Yamada
Hi David, Thanks for your comments. Okay, but you agree that there are DBAs and users who want to see the list of constraints, I think. My opinion is this doesn't exist because there isn't any demand for it. I don't know if this is a good example, but if you look at StackOverflow,

Re: pg_waldump stucks with options --follow or -f and --stats or -z

2021-11-15 Thread Bharath Rupireddy
On Tue, Nov 16, 2021 at 8:26 AM Michael Paquier wrote: > > On Mon, Nov 15, 2021 at 07:32:38PM +0530, Bharath Rupireddy wrote: > > pg_waldump options, --follow or -f(to keep polling once per second for > > new WAL to appear) and --stats or -z don't work well together i.e. the > > command stucks

Re: Add psql command to list constraints

2021-11-15 Thread Tatsuro Yamada
Hi Justin, Thanks for your comments! Currently, DBAs need the table name to see the constraint information. Or, they can query pg_constraint or information_schema: check_constraints, table_constraints. Yeah, right. If they can use the meta-command instead of a long query against

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-11-15 Thread Michael Paquier
On Mon, Nov 15, 2021 at 10:36:09PM +, Bossart, Nathan wrote: > +ereport(DEBUG1, > +(errmsg_internal("executing archive command \"%s\" for archving > %s", > + xlogarchcmd, xlog))); > > I wonder if it's necessary to include the "for archiving" part

Re: Frontend error logging style

2021-11-15 Thread Michael Paquier
On Mon, Nov 15, 2021 at 02:40:10PM -0500, Robert Haas wrote: > Having different frontend utilities each invent their own > slightly-different way of doing this makes it hard to reuse code, and > hard to understand code. We need to find ways to make it more uniform, > not just observe that it isn't

Re: pg_waldump stucks with options --follow or -f and --stats or -z

2021-11-15 Thread Michael Paquier
On Mon, Nov 15, 2021 at 07:32:38PM +0530, Bharath Rupireddy wrote: > pg_waldump options, --follow or -f(to keep polling once per second for > new WAL to appear) and --stats or -z don't work well together i.e. the > command stucks [1]. I think the pg_waldump should emit an error. Note > that the

Re: Add psql command to list constraints

2021-11-15 Thread David G. Johnston
On Monday, November 15, 2021, David G. Johnston wrote: > > If the only motivation for this is "feature completion" - since we have so > many other \d commands already implemented - I say we should pass. > If anything, doing this for triggers would be a much better feature. The other missing

Re: Anything I can contribute?

2021-11-15 Thread Bharath Rupireddy
Hi Kaisheng, Glad that you are interested in contributing to postgres. There are many ways one can contribute such as authoring a patch, reviewing others' patches, documentation, performance testing etc. If you would like to start with reviewing the pn-going features and their patches, the list

RE: parallel vacuum comments

2021-11-15 Thread houzj.f...@fujitsu.com
On Thur, Nov 11, 2021 10:41 AM Masahiko Sawada wrote: > I've attached a draft patch that refactors parallel vacuum and separates > parallel-vacuum-related code to new file vacuumparallel.c. > After discussion, I'll divide the patch into logical chunks. Hi. I noticed few minor issues in the

Re: support for MERGE

2021-11-15 Thread Amit Langote
Hi Álvaro, On Tue, Nov 16, 2021 at 6:01 AM Álvaro Herrera wrote: > On 2021-Nov-14, Amit Langote wrote: > > The only problem caused by the code block that follows the buggy if > > statement unconditionally executing is wasted cycles. Fortunately, > > there's no correctness issue, because

Re: RecoveryInProgress() has critical side effects

2021-11-15 Thread Michael Paquier
On Mon, Nov 15, 2021 at 10:09:17PM +, Bossart, Nathan wrote: > On 11/15/21, 1:30 PM, "Robert Haas" wrote: >> Here's a new version that does it that way. Any other opinions? > > LGTM Patch 0001 means that the startup process would set up the structures to be able to build WAL records before

Re: Printing backtrace of postgres processes

2021-11-15 Thread Bharath Rupireddy
On Tue, Nov 16, 2021 at 1:12 AM Justin Pryzby wrote: > > On Mon, Nov 15, 2021 at 09:12:49PM +0530, vignesh C wrote: > > The idea here is to implement & expose pg_print_backtrace function, > > internally > > This patch is closely related to this one > https://commitfest.postgresql.org/35/3142/ >

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-11-15 Thread Bharath Rupireddy
On Tue, Nov 16, 2021 at 3:06 AM Daniel Gustafsson wrote: > > > On 15 Nov 2021, at 19:42, Peter Eisentraut > > wrote: > > > > On 15.11.21 10:38, Bharath Rupireddy wrote: > >>> I still think that the v8 patch posted earlier is the better option, which > >>> increase granularity of error reporting

Re: Add psql command to list constraints

2021-11-15 Thread David G. Johnston
On Mon, Nov 15, 2021 at 5:23 PM Tatsuro Yamada < tatsuro.yamada...@nttcom.co.jp> wrote: > > > I'm not confident that if I would use this, so let's wait to see if > someone > > else wants to give a +1. > > Okay, but you agree that there are DBAs and users who want to see the > list of constraints,

Re: Add psql command to list constraints

2021-11-15 Thread Justin Pryzby
Thanks for updating the patch :) > Currently, DBAs need the table name to see the constraint information. Or, they can query pg_constraint or information_schema: check_constraints, table_constraints. > - success = listConversions(pattern, > show_verbose,

Re: Slow standby snapshot

2021-11-15 Thread Alexander Korotkov
On Wed, Nov 10, 2021 at 12:16 AM Michail Nikolaev wrote: > I updated the patch a little. KnownAssignedXidsGetAndSetXmin now > causes fewer cache misses because some values are stored in variables > (registers). I think it is better to not lean on the compiler here > because of `volatile` args. >

RE: Data is copied twice when specifying both child and parent table in publication

2021-11-15 Thread houzj.f...@fujitsu.com
On Friday, November 12, 2021 12:28 PM Amit Kapila wrote: > > On Thu, Nov 11, 2021 at 12:22 PM houzj.f...@fujitsu.com > wrote: > > > > On Friday, November 5, 2021 11:20 AM Greg Nancarrow > wrote: > > >On Thu, Nov 4, 2021 at 7:10 PM Amit Kapila > wrote: > > > >

RE: pg_get_publication_tables() output duplicate relid

2021-11-15 Thread houzj.f...@fujitsu.com
On Mon, Nov 15, 2021 9:42 PM Alvaro Herrera wrote: > > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > > wrote: > > > > create table tbl1 (a int) partition by range (a); create table > > > tbl1_part1 partition of tbl1 for values from (1) to (10); create > > > table tbl1_part2 partition

RE: pg_get_publication_tables() output duplicate relid

2021-11-15 Thread houzj.f...@fujitsu.com
On Mon, Nov 15, 2021 6:17 PM Bharath Rupireddy wrote: > On Mon, Nov 15, 2021 at 1:48 PM houzj.f...@fujitsu.com > wrote: > > > > Hi hackers, > > > > In another thread[1], we found the pg_get_publication_tables function > > will output duplicate partition relid when adding both child and > >

Re: Add psql command to list constraints

2021-11-15 Thread Tatsuro Yamada
Hi Justin, Thanks for your comments and review! Maybe it ought to be possible to choose the type of constraints to show. Similar to how \dt shows tables and \di shows indexes and \dti shows tables+inds, you could run \dcoc for check constraints and \dcof for foreign keys. But I think "\dco"

Add regression coverage for REVOKE ADMIN OPTION

2021-11-15 Thread Mark Dilger
Hackers, While working on a fix for dangling references to dropped roles in the pg_auth_members.grantor field, I happened to notice we entirely lack regression test coverage of the REVOKE ADMIN OPTION FOR form of the RevokeRoleStmt. I am unaware of any bugs in the current implementation, but

Anything I can contribute?

2021-11-15 Thread Deng Kaisheng
Hi, My name is Deng Kaisheng, a graduate student in National University of Sinapore (NUS) now major in computer science. I've read the introduction of your organization and I'm quite interested in what you're doing. I want to do something and contribute to the community, and I wonder if there

Re: PROXY protocol support

2021-11-15 Thread Jacob Champion
On Thu, 2021-11-04 at 12:03 +0100, Magnus Hagander wrote: > Thanks for the pointer, PFA a rebase. I think the Unix socket handling needs the same "success" fix that you applied to the TCP socket handling above it: > @@ -1328,9 +1364,23 @@ PostmasterMain(int argc, char *argv[]) >

Re: [RFC] building postgres with meson

2021-11-15 Thread Thomas Munro
On Tue, Nov 16, 2021 at 11:08 AM Thomas Munro wrote: > FWIW there's a free-as-in-beer edition of xlc for Linux (various > distros, POWER only) so you could use qemu, (It's also known to be possible to run AIX 7.2 on qemu, but the install media is not made available to developers for testing/CI

Re: [RFC] building postgres with meson

2021-11-15 Thread Andres Freund
Hi, On 2021-11-15 17:34:33 -0500, Tom Lane wrote: > Thomas Munro writes: > > ... The interesting thing about 16.1 is that you can invoke it > > as xlclang to get the new clang frontend and, I think, possibly use > > more clang/gcc-ish compiler switches[2]. > > [2] > >

Re: Time to drop plpython2?

2021-11-15 Thread Peter Eisentraut
On 15.11.21 20:26, Tom Lane wrote: * Our docs claim the minimum 3.x version for pl/python itself is 3.1, but this is unbacked by any testing; the oldest 3.x in the buildfarm is 3.4.3 (three such animals). I confirmed locally that 3.2.6 still works with PL/Python. I expect that Python 3.1

Re: support for MERGE

2021-11-15 Thread Alvaro Herrera
Thanks everyone for the feedback. I attach a version with the fixes that were submitted, as well as some additional changes: - I removed the restriction for tables inheritance and added the sample I showed to regression. - I added DO NOTHING support to the WHERE MATCHED case; it previously

Re: Write visibility map during CLUSTER/VACUUM FULL

2021-11-15 Thread Justin Pryzby
On Sun, Aug 29, 2021 at 07:26:42PM -0500, Justin Pryzby wrote: > On Mon, Jun 28, 2021 at 11:22:01AM +0300, Anna Akenteva wrote: > > On 2019-11-29 05:32, Michael Paquier wrote: > > > These comments are unanswered for more than 2 months, so I am marking > > > this entry as returned with feedback. >

Re: Support for NSS as a libpq TLS backend

2021-11-15 Thread Joshua Brindle
On Mon, Nov 15, 2021 at 4:44 PM Daniel Gustafsson wrote: > > > On 15 Nov 2021, at 20:51, Joshua Brindle > > wrote: > > > Apologies for the delay, this didn't go to my inbox and I missed it on list. > > > > The bitcode generation is still broken, this time for nspr.h: > > Interesting, I am

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-11-15 Thread Bossart, Nathan
On 11/14/21, 4:18 AM, "Bharath Rupireddy" wrote: > Thanks. Attaching the v2 to avoid that by directly using the message > in ereport instead of activitymsg. +ereport(DEBUG1, +(errmsg_internal("waiting for %s", xlogfname))); As a general comment, I think we

Re: [RFC] building postgres with meson

2021-11-15 Thread Tom Lane
Thomas Munro writes: > ... The interesting thing about 16.1 is that you can invoke it > as xlclang to get the new clang frontend and, I think, possibly use > more clang/gcc-ish compiler switches[2]. > [2] > https://www.ibm.com/docs/en/xl-c-and-cpp-aix/16.1?topic=new-clang-based-front-end Ho,

CREATE PUBLICATION should "See Also" CREATE SUBSCRIPTION

2021-11-15 Thread Peter Smith
Hi. I noticed recently that the CREATE PUBLICATION docs page [1] does not have any "See Also" reference to the CREATE SUBSCRIPTION docs page [2]. Perhaps it is deliberate (??) but IMO it just seemed like a strange/annoying omission that there was no easy way to jump both ways between those two

Re: [PATCH v2] use has_privs_for_role for predefined roles

2021-11-15 Thread Bossart, Nathan
On 11/12/21, 12:34 PM, "Joshua Brindle" wrote: > All of these and also adminpack.sgml updated. I think that is all of > them but docs broken across lines and irregular wording makes it > difficult. LGTM. I've marked this as ready-for-committer. Nathan

Re: RecoveryInProgress() has critical side effects

2021-11-15 Thread Bossart, Nathan
On 11/15/21, 1:30 PM, "Robert Haas" wrote: > Here's a new version that does it that way. Any other opinions? LGTM > The best thing I could come up with for a test case for this was to > try repeatedly making a new connection and running "SELECT > txid_current()", which will cause just one WAL

Re: [RFC] building postgres with meson

2021-11-15 Thread Thomas Munro
On Tue, Nov 16, 2021 at 8:23 AM Andres Freund wrote: > On 2021-11-15 14:11:25 -0500, Tom Lane wrote: > > Having said that, I don't plan to be the one trying to get meson > > to add xlc support ... > > It'd probably not be too hard. But given that it's quite hard to get access to > AIX + xlc, I'm

Re: Support for NSS as a libpq TLS backend

2021-11-15 Thread Daniel Gustafsson
> On 15 Nov 2021, at 20:51, Joshua Brindle > wrote: > Apologies for the delay, this didn't go to my inbox and I missed it on list. > > The bitcode generation is still broken, this time for nspr.h: Interesting, I am unable to replicate that in my tree but I'll investigate further tomorrow

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-11-15 Thread Daniel Gustafsson
> On 15 Nov 2021, at 19:42, Peter Eisentraut > wrote: > > On 15.11.21 10:38, Bharath Rupireddy wrote: >>> I still think that the v8 patch posted earlier is the better option, which >>> increase granularity of error reporting with a small code footprint. >> Thanks. Attaching the v8 here again. >

Re: RecoveryInProgress() has critical side effects

2021-11-15 Thread Robert Haas
On Fri, Nov 12, 2021 at 10:23 AM Bossart, Nathan wrote: > 0001 looks reasonable to me. Cool. > Unless there's a demonstrable performance benefit from adding the > branch, my preference is to leave it out. I could be off-base, but it > seems possible that future changes might end up depending

Re: Time to drop plpython2?

2021-11-15 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 15, 2021 at 3:30 PM Tom Lane wrote: >> The info I checked said that RHEL7 originally shipped with 3.3. > It'd only be an issue if they want to compile from source, right? > We're not speaking of changing the runtime prerequisites, IIUC. I'm not sure. Does it

Re: Time to drop plpython2?

2021-11-15 Thread Andres Freund
Hi, On November 15, 2021 12:36:11 PM PST, Robert Haas wrote: >It'd only be an issue if they want to compile from source, right? >We're not speaking of changing the runtime prerequisites, IIUC. Correct. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: Time to drop plpython2?

2021-11-15 Thread Andres Freund
Hi, On 2021-11-15 15:30:02 -0500, Tom Lane wrote: > > Is RHEL7 really an issue? I only have Centos 7 around, but that has python > > 3.6. > > The info I checked said that RHEL7 originally shipped with 3.3. > I'm not sure that Red Hat would've outright replaced that, but they > do have a notion of

Re: Improving psql's \password command

2021-11-15 Thread Tom Lane
"Bossart, Nathan" writes: > On 11/15/21, 10:13 AM, "Tom Lane" wrote: >> * I don't believe that this bit is necessary, or if it is, >> the comment fails to justify it: >> >> - initStringInfo(); >> + /* make sure buf is palloc'd so we don't lose changes after a >> longjmp */ >> +

Re: support for MERGE

2021-11-15 Thread Álvaro Herrera
On 2021-Nov-14, Amit Langote wrote: > The only problem caused by the code block that follows the buggy if > statement unconditionally executing is wasted cycles. Fortunately, > there's no correctness issue, because rootRelInfo is the same as the > input result relation in the cases where the

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-15 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Nov 15, 2021 at 2:51 PM Stephen Frost wrote: > > I get that just compressing the entire stream is simpler and easier and > > such, but it's surely cheaper and more efficient to not decompress and > > then recompress data that's

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-15 Thread Justin Pryzby
On Mon, Nov 15, 2021 at 03:23:17PM -0500, Robert Haas wrote: > On Mon, Nov 15, 2021 at 2:51 PM Stephen Frost wrote: > > I get that just compressing the entire stream is simpler and easier and > > such, but it's surely cheaper and more efficient to not decompress and > > then recompress data

Re: Time to drop plpython2?

2021-11-15 Thread Robert Haas
On Mon, Nov 15, 2021 at 3:30 PM Tom Lane wrote: > The info I checked said that RHEL7 originally shipped with 3.3. > I'm not sure that Red Hat would've outright replaced that, but they > do have a notion of add-on "software collections", and I'm certain > that they would have provided newer

Re: Time to drop plpython2?

2021-11-15 Thread Tom Lane
Andres Freund writes: > On 2021-11-15 14:26:55 -0500, Tom Lane wrote: >> * Meson only promises support back to python 3.6, but if that's >> accurate it's going to be a problem for us, because there are lots >> of live LTS distributions with older python3 (RHEL7, Solaris 11.3, >> AIX 7.2 for

Re: Schema variables - new implementation for Postgres 15

2021-11-15 Thread Justin Pryzby
On Mon, Nov 15, 2021 at 09:00:13PM +0100, Pavel Stehule wrote: > Thank you for review and fixes, I try to complete some version for next > work, and looks so your patch 0001 is broken > > gedit reports to me broken unicode \A0\A0\A0\A0\A0 > > my last patch has 276KB and your patch has 293KB? On

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-15 Thread Robert Haas
On Mon, Nov 15, 2021 at 2:51 PM Stephen Frost wrote: > I get that just compressing the entire stream is simpler and easier and > such, but it's surely cheaper and more efficient to not decompress and > then recompress data that's already compressed. Finding a way to pass > through data that's

Re: Test::More version

2021-11-15 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: Your MUA seems a bit MIME-deficient… >> Tom Lane writes: >>> Based on this, I'm inclined to think we should select 0.98 as the >>> minimum version. Anything later would inconvenience some people. >>> OTOH, it doesn't look

Re: Schema variables - new implementation for Postgres 15

2021-11-15 Thread Pavel Stehule
> > my last patch has 276KB and your patch has 293KB? > Please, can you resend your version of patch 0001? Thank you Pavel

Re: Schema variables - new implementation for Postgres 15

2021-11-15 Thread Pavel Stehule
Hi Justin so 6. 11. 2021 v 2:39 odesílatel Justin Pryzby napsal: > On Wed, Nov 03, 2021 at 02:05:02PM +0100, Tomas Vondra wrote: > > 3) I've reworded / tweaked a couple places in the docs, but this really > > needs a native speaker - I don't have a very good "feeling" for this > > technical

Re: Time to drop plpython2?

2021-11-15 Thread Andres Freund
Hi, Continuing the discussion from https://www.postgresql.org/message-id/2146739.1637004415%40sss.pgh.pa.us On 2021-11-15 14:26:55 -0500, Tom Lane wrote: > * Meson only promises support back to python 3.6, but if that's > accurate it's going to be a problem for us, because there are lots > of

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-15 Thread Stephen Frost
Greetings, * Daniel Gustafsson (dan...@yesql.se) wrote: > > On 15 Nov 2021, at 15:32, Robert Haas wrote: > > On Tue, Nov 9, 2021 at 9:12 AM Daniel Gustafsson wrote: > >> 2773: libpq compression > >> === > >> This patch intended to provide libpq connection compression to

Re: Support for NSS as a libpq TLS backend

2021-11-15 Thread Joshua Brindle
On Wed, Nov 10, 2021 at 8:49 AM Daniel Gustafsson wrote: > > > On 9 Nov 2021, at 22:22, Joshua Brindle > > wrote: > > On Tue, Nov 9, 2021 at 2:02 PM Joshua Brindle > > wrote: > >> > >> On Tue, Nov 9, 2021 at 1:59 PM Joshua Brindle > >> wrote: > > >>> Hello, I'm looking to help out with

Re: [RFC] building postgres with meson

2021-11-15 Thread Robert Haas
On Mon, Nov 15, 2021 at 2:23 PM Andres Freund wrote: > It's good to make sure we're not growing too reliant on some compiler(s), but > imo only really makes sense if the alternative compilers are meaningfully > available and maintained. That's a sensible position. I do worry that with this

Re: Frontend error logging style

2021-11-15 Thread Tom Lane
Peter Eisentraut writes: > Several programs wrap, say, pg_log_fatal() into a pg_fatal(), that does > logging, cleanup, and exit, as the case may be. I think that's a good > solution. I agree, and my draft patch formalized that by turning pg_log_fatal into exactly that. The question that I

Re: Printing backtrace of postgres processes

2021-11-15 Thread Justin Pryzby
On Mon, Nov 15, 2021 at 09:12:49PM +0530, vignesh C wrote: > The idea here is to implement & expose pg_print_backtrace function, internally This patch is closely related to this one https://commitfest.postgresql.org/35/3142/ | Logging plan of the currently running query I suggest to review that

Re: Frontend error logging style

2021-11-15 Thread Robert Haas
On Mon, Nov 15, 2021 at 2:15 PM Peter Eisentraut wrote: > This is specifically designed not to do any flow control. In the > backend, we have many instances, where log messages are issued with the > wrong log level because the stronger log level would have flow control > impact that is not

Re: Time to drop plpython2?

2021-11-15 Thread Tom Lane
Peter Eisentraut writes: > If we add this test first, then all we're going to learn is probably > that 60% of those who are currently using python2 don't have python3 > installed, and then we're still going to have to send that above email. I don't know what fraction don't have python3

Re: refactoring basebackup.c

2021-11-15 Thread Robert Haas
On Mon, Nov 15, 2021 at 11:25 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > Walsender tries to send a backup manifest, but crashes on the trottling sink: > > #2 0x560857b551af in ExceptionalCondition > (conditionName=0x560857d15d27 "sink->bbs_next != NULL", >

Re: [RFC] building postgres with meson

2021-11-15 Thread Andres Freund
Hi, On 2021-11-15 14:11:25 -0500, Tom Lane wrote: > Andres Freund writes: > > One important thing to call out: Meson has support for the AIX linker, but > > *not* the xlc compiler. I.e. one has to use gcc (or clang, but I didn't > > try). I don't know if we'd require adding support for xlc

Re: Frontend error logging style

2021-11-15 Thread Peter Eisentraut
On 10.11.21 16:28, Robert Haas wrote: What I think we ought to be driving towards is having pg_log_fatal() forcibly exit, and pg_log_error() do the same unless the error is somehow caught. This is specifically designed not to do any flow control. In the backend, we have many instances, where

Re: Test::More version

2021-11-15 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > Tom Lane writes: >> Based on this, I'm inclined to think we should select 0.98 as the >> minimum version. Anything later would inconvenience some people. >> OTOH, it doesn't look like there's any value in promising compatibility >> with 0.96

Re: [RFC] building postgres with meson

2021-11-15 Thread Tom Lane
Andres Freund writes: > One important thing to call out: Meson has support for the AIX linker, but > *not* the xlc compiler. I.e. one has to use gcc (or clang, but I didn't > try). I don't know if we'd require adding support for xlc to meson - xlc is > pretty buggy and it doesn't seem

Re: BUFFERS enabled by default in EXPLAIN (ANALYZE)

2021-11-15 Thread Justin Pryzby
On Fri, Nov 12, 2021 at 02:58:07PM -0800, Nikolay Samokhvalov wrote: > Re-reading the thread [1] (cannot answer there – don't have those emails in > my box anymore), I see that there was strong support for enabling BUFFERS > in EXPLAIN ANALYZE by default. And there were patches. Commitfest entry

Re: Frontend error logging style

2021-11-15 Thread Peter Eisentraut
On 09.11.21 23:20, Tom Lane wrote: 2. What is the preferred style for adding extra lines to log messages? I see a lot of direct prints to stderr: pg_log_error("missing required argument: database name"); fprintf(stderr, _("Try \"%s --help\" for more

Re: Frontend error logging style

2021-11-15 Thread Peter Eisentraut
On 09.11.21 23:20, Tom Lane wrote: 1. The distinction between "error" and "fatal" levels seems squishy to the point of uselessness. I think we should either get rid of it entirely, or make an effort to use "fatal" exactly for the cases that are going to give up and exit right away. Of the

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-15 Thread Daniel Gustafsson
> On 15 Nov 2021, at 15:32, Robert Haas wrote: > > On Tue, Nov 9, 2021 at 9:12 AM Daniel Gustafsson wrote: >> 2773: libpq compression >> === >> This patch intended to provide libpq connection compression to "replace SSL >> compression" which was doomed when the patch was

Re: Time to drop plpython2?

2021-11-15 Thread Peter Eisentraut
On 15.11.21 19:18, Tom Lane wrote: Andres Freund writes: On 2021-11-15 12:19:51 -0500, Tom Lane wrote: I was wondering about simply probing to see if python3 exists (and if so, what version it is exactly), as an additional configure test that doesn't hook into anything. That would give us

Re: Test::More version

2021-11-15 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Based on this, I'm inclined to think we should select 0.98 as the > minimum version. Anything later would inconvenience some people. > OTOH, it doesn't look like there's any value in promising compatibility > with 0.96 instead, especially since I see a couple of

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-11-15 Thread Peter Eisentraut
On 15.11.21 10:38, Bharath Rupireddy wrote: I still think that the v8 patch posted earlier is the better option, which increase granularity of error reporting with a small code footprint. Thanks. Attaching the v8 here again. I find the use of RelationUsesLocalBuffers() confusing in this

Re: [RFC] building postgres with meson

2021-11-15 Thread Andres Freund
Hi, FWIW, I tried building postgres on a few other operating systems using meson, after I got access to the gcc compile farm. Here's the results: - openbsd: Compiled fine. Hit one issue running tests: openbsd has *completely* broken $ORIGIN support. It uses CWD as $ORIGIN rpaths, which

Re: Time to drop plpython2?

2021-11-15 Thread Tom Lane
Andres Freund writes: > On 2021-11-15 12:19:51 -0500, Tom Lane wrote: >> I was wondering about simply probing to see if python3 exists (and if >> so, what version it is exactly), as an additional configure test that >> doesn't hook into anything. That would give us some information without >>

Re: Time to drop plpython2?

2021-11-15 Thread Andres Freund
Hi, On 2021-11-15 12:19:51 -0500, Tom Lane wrote: > I don't think that's warranted. The existing design is that we let > the user say which python is "python", and I do not think we should > change that in advance of actually dropping python2 support. Hm. I think it'd be ok, given that python 2

Re: Improving psql's \password command

2021-11-15 Thread Tom Lane
"Bossart, Nathan" writes: > Here is an attempt at adding control-C support for \password. With > this patch, we pass sigint_interrupt_jmp and sigint_interrupt_enabled > all the way down to pg_get_line_append(), which is admittedly a bit > more complicated than I think would be ideal. I see a

Re: Read access for pg_monitor to pg_replication_origin_status view

2021-11-15 Thread Martín Marqués
Hello, I wanted to resurface this thread. The original intention I had with this patch I sent over a year ago was to have the possibility for monitoring ROLEs like pg_monitor and pg_read_all_stats to have read access for the replication origin status. Seems the patch only got half way through

Re: Test::More version

2021-11-15 Thread Tom Lane
Andrew Dunstan writes: > Thanks. pushed a slightly more robust version. I think we have enough info now to draw conclusions. There are several buildfarm animals that are running TAP tests but haven't reported since this went in. However, I don't think any of them will yield surprises:

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2021-11-15 Thread Yugo NAGATA
Hello Daniel Gustafsson, On Mon, 15 Nov 2021 14:13:32 +0100 Daniel Gustafsson wrote: > > On 21 Jul 2021, at 03:49, Yugo NAGATA wrote: > > > I attached the updated patch v2, which includes a comment fix and a TAP > > test. > > This patch fails the TAP test for pgbench: Thank you for

Re: Time to drop plpython2?

2021-11-15 Thread Tom Lane
Andres Freund writes: > On 2021-11-14 21:24:31 -0500, Tom Lane wrote: >> (It's likely that some fraction of them do already have python3 installed, >> in which case the search order change Peter recommended would be enough to >> fix it. But I'm sure not all do.) > How about committing the order

Re: JIT doing duplicative optimization?

2021-11-15 Thread Andres Freund
Hi, On 2021-11-14 18:46:34 -0500, Tom Lane wrote: > BTW, I realized while working on this that I have little idea what the > "Functions:" count is. Nor does our documentation explain that (or any > other of these numbers), at least not anywhere I could find. That seems > like a pretty serious

Re: JIT doing duplicative optimization?

2021-11-15 Thread Andres Freund
Hi, On 2021-11-11 17:02:09 -0300, Alvaro Herrera wrote: > Recently I noticed extremely suspicious behavior from queries under JIT. > A query (details for which sadly I cannot disclose) had an EXPLAIN > looking like this: > > JIT: >Functions: 743 >Options: Inlining true, Optimization

Re: Time to drop plpython2?

2021-11-15 Thread Andres Freund
Hi, On 2021-11-14 21:24:31 -0500, Tom Lane wrote: > ... btw, there's a fairly critical gating factor for any plan to drop > python2 support: the buildfarm. I just counted, and there are exactly > as many members running python 2.x as 3.x (49 apiece), not counting > Windows machines that aren't

Re: enhance pg_log_backend_memory_contexts() to log memory contexts of auxiliary processes

2021-11-15 Thread Bharath Rupireddy
On Mon, Nov 15, 2021 at 10:04 PM vignesh C wrote: > > On Mon, Nov 15, 2021 at 7:47 AM Bharath Rupireddy > wrote: > > > > On Fri, Nov 5, 2021 at 11:12 AM Bharath Rupireddy > > wrote: > > > PSA v2 patch and review it. > > > > I've modified the docs part a bit, please consider v3 for review. > >

Re: enhance pg_log_backend_memory_contexts() to log memory contexts of auxiliary processes

2021-11-15 Thread vignesh C
On Mon, Nov 15, 2021 at 7:47 AM Bharath Rupireddy wrote: > > On Fri, Nov 5, 2021 at 11:12 AM Bharath Rupireddy > wrote: > > PSA v2 patch and review it. > > I've modified the docs part a bit, please consider v3 for review. Thanks for the update patch, Few comments: 1) Should we change

Re: refactoring basebackup.c

2021-11-15 Thread Dmitry Dolgov
> On Fri, Nov 05, 2021 at 11:50:01AM -0400, Robert Haas wrote: > On Tue, Nov 2, 2021 at 10:32 AM Robert Haas wrote: > > Meanwhile, I think it's probably OK for me to go ahead and commit > > 0001-0003 from my patches at this point, since it seems we have pretty > > good evidence that the

Re: Printing backtrace of postgres processes

2021-11-15 Thread vignesh C
On Mon, Nov 15, 2021 at 11:37 AM Dilip Kumar wrote: > > On Mon, Nov 15, 2021 at 10:34 AM vignesh C wrote: > > > > > Thanks for the comments, the attached v12 patch has the changes for the > > same. > > I have reviewed this patch and have some comments on v12-0001, > > 1. > +This feature

Re: Parallelize correlated subqueries that execute within each worker

2021-11-15 Thread Robert Haas
On Wed, Nov 3, 2021 at 1:34 PM James Coleman wrote: > As I understand the current code, parallel plans are largely chosen > based not on where it's safe to insert a Gather node but rather by > determining if a given path is parallel safe. Through that lens params > are a bit of an odd man out --

Re: Skipping logical replication transactions on subscriber side

2021-11-15 Thread vignesh C
On Mon, Nov 15, 2021 at 2:48 PM Masahiko Sawada wrote: > > On Mon, Nov 15, 2021 at 4:49 PM Greg Nancarrow wrote: > > > > On Mon, Nov 15, 2021 at 1:49 PM Masahiko Sawada > > wrote: > > > > > > I've attached an updated patch that incorporates all comments I got so > > > far. Please review it. >

  1   2   >