Re: Allow file inclusion in pg_hba and pg_ident files

2022-02-28 Thread Michael Paquier
On Mon, Feb 28, 2022 at 07:42:17PM +0800, Julien Rouhaud wrote: > Done in attached v2. I did the split in a separate commit, as the diff is > otherwise unreadable. While at it I also fixed a few minor issues (I missed a > MemoryContextDelete, and now avoid relying on inet_net_pton which

Re: Allow async standbys wait for sync replication

2022-02-28 Thread Kyotaro Horiguchi
(Now I understand what "async" mean here..) At Mon, 28 Feb 2022 22:05:28 -0800, Nathan Bossart wrote in > On Tue, Mar 01, 2022 at 11:10:09AM +0530, Bharath Rupireddy wrote: > > On Tue, Mar 1, 2022 at 12:27 AM Nathan Bossart > > wrote: > >> My feedback is specifically about this behavior. I

Re: BufferAlloc: don't take two simultaneous locks

2022-02-28 Thread Yura Sokolov
В Пт, 25/02/2022 в 09:38 +, Simon Riggs пишет: > On Fri, 25 Feb 2022 at 09:24, Yura Sokolov wrote: > > > > This approach is cleaner than v1, but should also perform better > > > because there will be a 1:1 relationship between a buffer and its > > > dynahash entry, most of the time. > > > >

Re: Failed transaction statistics to measure the logical replication progress

2022-02-28 Thread Peter Smith
Please see below my review comments for v25. == 1. Commit message Introduce cumulative columns of transactions of logical replication subscriber to the pg_stat_subscription_stats view. "cumulative columns of transactions" sounds a bit strange to me. SUGGESTED Introduce 2 new subscription

Re: [Proposal] Global temporary tables

2022-02-28 Thread Wenjing Zeng
> 2022年2月27日 08:21,Justin Pryzby 写道: > > I read through this. > Find attached some language fixes. You should be able to apply each "fix" > patch on top of your own local branch with git am, and then squish them > together. Let me know if you have trouble with that. > > I think

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

2022-02-28 Thread Yugo NAGATA
Hi Horiguchi-san, On Thu, 27 Jan 2022 17:50:25 +0900 (JST) Kyotaro Horiguchi wrote: > At Tue, 16 Nov 2021 02:26:43 +0900, Yugo NAGATA wrote > in > > Thank you for pointing it out! > > I attached the updated patch. > > I think we want more elabolative comment for the new place of > preparing

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

2022-02-28 Thread Michael Paquier
On Mon, Feb 28, 2022 at 04:00:36PM -0500, Stephen Frost wrote: > * Jacob Champion (pchamp...@vmware.com) wrote: >> On Fri, Feb 25, 2022 at 01:23:49PM -0800, Andres Freund wrote: >>> Looks to me like authn_id isn't synchronized to parallel workers right now. >>> So >>> the function will return the

RE: logical replication restrictions

2022-02-28 Thread osumi.takami...@fujitsu.com
On Tuesday, March 1, 2022 9:19 AM Euler Taveira wrote: > Long time, no patch. Here it is. I will provide documentation in the next > > version. I would appreciate some feedback. Hi, thank you for posting the patch ! $ git am v1-0001-Time-delayed-logical-replication-subscriber.patch Applying:

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Michael Paquier
On Mon, Feb 28, 2022 at 04:42:55PM -0500, Stephen Frost wrote: > Keeping it around will just push out the point at which everyone will > finally be done with it, as there's really only two groups: those who > have already moved to scram, and those who won't move until they want to > upgrade to a

pipeline mode and commands not allowed in a transaction block

2022-02-28 Thread Yugo NAGATA
Hi, I found that when we use pipeline mode, we can execute commands which is not allowed in a transaction block, for example CREATE DATABASE, in the same transaction with other commands. In extended query protocol, a transaction starts when Parse, Bind, Executor, or Describe message is

Re: Allow async standbys wait for sync replication (was: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers)

2022-02-28 Thread Nathan Bossart
On Tue, Mar 01, 2022 at 11:10:09AM +0530, Bharath Rupireddy wrote: > On Tue, Mar 1, 2022 at 12:27 AM Nathan Bossart > wrote: >> My feedback is specifically about this behavior. I don't think we should >> spin in XLogSend*() waiting for an LSN to be synchronously replicated. I >> think we

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-28 Thread Nathan Bossart
On Sat, Feb 26, 2022 at 02:06:14PM -0800, Nathan Bossart wrote: > On Sat, Feb 26, 2022 at 04:48:52PM +, Chapman Flack wrote: >> Assuming the value is false, so no error is thrown, is it practical to >> determine >> from flinfo->fn_expr whether the value was defaulted or supplied? If so, I >>

Re: Separate the result of \watch for each query execution (psql)

2022-02-28 Thread Pavel Stehule
po 28. 2. 2022 v 23:46 odesílatel Tom Lane napsal: > Noboru Saito writes: > > I have created a patch that allows you to turn it on and off in \pset. > > The attached patch adds the following features. > > Formfeed can be turned on with the command line option or \pset. > > Formfeed (\f\n) is

RE: Optionally automatically disable logical replication subscriptions on error

2022-02-28 Thread osumi.takami...@fujitsu.com
On Tuesday, March 1, 2022 9:49 AM Peter Smith wrote: > Please see below my review comments for v22. > > == > > 1. Commit message > > "table sync worker" -> "tablesync worker" Fixed. > ~~~ > > 2. doc/src/sgml/catalogs.sgml > > + > + If true, the subscription will be disabled

Re: Allow async standbys wait for sync replication (was: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers)

2022-02-28 Thread Bharath Rupireddy
On Tue, Mar 1, 2022 at 12:27 AM Nathan Bossart wrote: > > On Mon, Feb 28, 2022 at 06:45:51PM +0530, Bharath Rupireddy wrote: > > On Sat, Feb 26, 2022 at 9:37 PM Nathan Bossart > > wrote: > >> For > >> this feature, I think we always need to consider what the primary considers > >> synchronously

Re: In-placre persistance change of a relation

2022-02-28 Thread Kyotaro Horiguchi
Rebased on a recent xlog refactoring. No functional changes have been made. - Removed the default case in smgr_desc since it seems to me we don't assume out-of-definition values in xlog records elsewhere. - Simplified some added to storage.c. - Fix copy-pasto'ed comments in extractPageInfo().

Re: logical replication empty transactions

2022-02-28 Thread Ajin Cherian
On Fri, Feb 25, 2022 at 9:17 PM Peter Smith wrote: > > Hi. Here are my review comments for the v19 patch. > > == > > 1. Commit message > > The current logical replication behavior is to send every transaction to > subscriber even though the transaction is empty (because it does not > contain

Re: definition of CalculateMaxmumSafeLSN

2022-02-28 Thread Julien Rouhaud
Hi, On Tue, Mar 01, 2022 at 10:11:03AM +0900, Kyotaro Horiguchi wrote: > At Mon, 28 Feb 2022 17:01:10 +0300, Sergei Kornilov wrote in > > Hello > > I just spotted in src/include/access/xlog.h: > > extern XLogRecPtr CalculateMaxmumSafeLSN(void); > > > > This function doesn't seem to be used

Re: range_agg with multirange inputs

2022-02-28 Thread Paul Jungwirth
On 2/26/22 17:13, Chapman Flack wrote: This applies (with some fuzz) and passes installcheck-world, but a rebase is needed, because 3 lines of context aren't enough to get the doc changes in the right place in the aggregate function table. (I think generating the patch with 4 lines of context

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-28 Thread Michael Paquier
On Mon, Feb 28, 2022 at 08:48:23PM +0100, Gunnar "Nick" Bluth wrote: > So, how should we call the global "find the * 'postgres' executable and > boil out if that fails" function? > char postgres_exec_path[MAXPGPATH] = findPostgresExec(); > ? That would mean only a couple of lines gained,

Re: Allow root ownership of client certificate key

2022-02-28 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> I'd be more eager to do that if we had some field complaints >> about it. Since we don't, my inclination is not to, but I'm >> only -0.1 or so; anybody else want to vote? > This patch was specifically developed in response to

Re: Removing unneeded self joins

2022-02-28 Thread Greg Stark
I don't think the benchmarking that's needed is to check whether pruning unnecessary joins is helpful. Obviously it's going to be hard to measure on simple queries and small tables. But the resulting plan is unambiguously superior and in more complex cases could extra i/o. The benchmarking people

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

2022-02-28 Thread Masahiko Sawada
On Wed, Jan 19, 2022 at 5:52 PM Julien Rouhaud wrote: > > Hi, > > On Tue, Nov 16, 2021 at 04:37:44PM +0900, Masahiko Sawada wrote: > > > > I've attached an updated patch. Please review it. > > It seems that the regression tests aren't entirely stable, per cfbot: >

RE: Optionally automatically disable logical replication subscriptions on error

2022-02-28 Thread osumi.takami...@fujitsu.com
On Friday, February 25, 2022 9:45 PM osumi.takami...@fujitsu.com wrote: > Kindly have a look at attached the v22. > It has incorporated other improvements of TAP test, refinement of the > DisableSubscriptionOnError function and so on. The recent commit(7a85073) has changed the subscription

RE: Failed transaction statistics to measure the logical replication progress

2022-02-28 Thread osumi.takami...@fujitsu.com
On Friday, February 25, 2022 7:58 AM osumi.takami...@fujitsu.com wrote: > Kindly have a look at v24. Hi. The recent commit(7a85073) has redesigned the view pg_stat_subscription_workers and now we have pg_stat_subscription_stats. Therefore, I rebased my patch so that my statistics patch can be

Re: Kerberos delegation support in libpq and postgres_fdw

2022-02-28 Thread Stephen Frost
Greetings, (Dropping the original poster as their email address apparently no longer works) * Peter Eisentraut (peter.eisentr...@enterprisedb.com) wrote: > On 22.07.21 10:39, Peifeng Qiu wrote: > >I've slightly modified the patch to support "gssencmode" and added TAP > >tests. > > For the TAP

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-02-28 Thread Kyotaro Horiguchi
At Mon, 28 Feb 2022 21:03:07 +0530, Bharath Rupireddy wrote in > Hi, > > It looks like we use "log segment" in various user-facing messages. > The term "log" can mean server logs as well. The "WAL segment" suits > well here and it is consistently used across the other user-facing > messages

Re: definition of CalculateMaxmumSafeLSN

2022-02-28 Thread Kyotaro Horiguchi
At Mon, 28 Feb 2022 17:01:10 +0300, Sergei Kornilov wrote in > Hello > I just spotted in src/include/access/xlog.h: > extern XLogRecPtr CalculateMaxmumSafeLSN(void); > > This function doesn't seem to be used anywhere or even defined? "git grep > CalculateMaxmumSafeLSN" shows only this line. >

Re: Optionally automatically disable logical replication subscriptions on error

2022-02-28 Thread Peter Smith
Please see below my review comments for v22. == 1. Commit message "table sync worker" -> "tablesync worker" ~~~ 2. doc/src/sgml/catalogs.sgml + + If true, the subscription will be disabled when subscription + workers detect any errors + It felt a bit strange to

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

2022-02-28 Thread Masahiko Sawada
Hi, Sorry for the late reply. On Fri, Nov 19, 2021 at 7:24 AM Melanie Plageman wrote: > > On Sun, Aug 22, 2021 at 9:47 PM Masahiko Sawada wrote: > > > > On Thu, Aug 19, 2021 at 10:52 PM Ranier Vilela wrote: > > > > > > Em qui., 19 de ago. de 2021 às 09:21, Masahiko Sawada > > > escreveu: >

Re: Allow root ownership of client certificate key

2022-02-28 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > David Steele writes: > > Any thoughts on back-patching at least the client portion of this? > > Probably hard to argue that it's a bug, but it is certainly painful. > > I'd be more eager to do that if we had some field complaints > about it.

Re: logical replication restrictions

2022-02-28 Thread Euler Taveira
On Wed, Sep 22, 2021, at 1:57 PM, Euler Taveira wrote: > On Wed, Sep 22, 2021, at 1:18 AM, Amit Kapila wrote: >> On Tue, Sep 21, 2021 at 4:21 PM Marcos Pegoraro wrote: >>> No, I´m talking about that configuration you can have on standby servers >>> recovery_min_apply_delay = '8h' >>> >> >> oh

Re: Allow root ownership of client certificate key

2022-02-28 Thread Tom Lane
David Steele writes: > Any thoughts on back-patching at least the client portion of this? > Probably hard to argue that it's a bug, but it is certainly painful. I'd be more eager to do that if we had some field complaints about it. Since we don't, my inclination is not to, but I'm only -0.1 or

Re: Removing unneeded self joins

2022-02-28 Thread Jaime Casanova
On Thu, Jul 15, 2021 at 05:49:11PM +0300, Andrey Lepikhov wrote: > On 6/7/21 13:49, Hywel Carver wrote: > > On Mon, Jul 5, 2021 at 2:20 PM Andrey Lepikhov > > mailto:a.lepik...@postgrespro.ru>> wrote: > > Looking through the email chain, a previous version of this patch added > > ~0.6% to planning

Re: Allow root ownership of client certificate key

2022-02-28 Thread David Steele
On 2/28/22 13:20, Tom Lane wrote: David Steele writes: [ client-key-perm-003.patch ] Pushed with a bit of copy-editing of the comments. Thank you! Any thoughts on back-patching at least the client portion of this? Probably hard to argue that it's a bug, but it is certainly painful.

Re: Overflow of attmissingval is not handled gracefully

2022-02-28 Thread Tom Lane
Andrew Dunstan writes: > On 2/28/22 18:21, Tom Lane wrote: >> regression=# create table foo(f1 int); >> CREATE TABLE >> regression=# alter table foo add column bar text default repeat('xyzzy', >> 100); >> ERROR: row is too big: size 57416, maximum size 8160 >> >> I think the simplest

Re: Overflow of attmissingval is not handled gracefully

2022-02-28 Thread Andrew Dunstan
On 2/28/22 18:21, Tom Lane wrote: > Consider this admittedly-rather-contrived example: > > regression=# create table foo(f1 int); > CREATE TABLE > regression=# alter table foo add column bar text default repeat('xyzzy', > 100); > ERROR: row is too big: size 57416, maximum size 8160 > >

Overflow of attmissingval is not handled gracefully

2022-02-28 Thread Tom Lane
Consider this admittedly-rather-contrived example: regression=# create table foo(f1 int); CREATE TABLE regression=# alter table foo add column bar text default repeat('xyzzy', 100); ERROR: row is too big: size 57416, maximum size 8160 Since the table contains no rows at all, this is a

Re: [PATCH] Add TOAST support for several system tables

2022-02-28 Thread Tom Lane
=?UTF-8?B?U29maWEgS29waWtvdmE=?= writes: > ACL lists in tables may potentially be large in size. I suggest adding TOAST > support for system tables, namely pg_class, pg_attribute and > pg_largeobject_metadata, for they include ACL columns. TBH, the idea of adding a toast table to pg_class

MSVC build system installs extra executables

2022-02-28 Thread Andrew Dunstan
I don't know if this has been discussed before, but I mentioned recently () that I think the MSVC build system is too eager about installing executables it builds. In particular, it installs these binaries

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-02-28 Thread Cary Huang
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Hi I am glad to find this patch here because it helps with

stale statistics on postgres 14

2022-02-28 Thread Jaime Casanova
Hi everyone, I have been doing some tests on a little server (at least compared to some others around). It have 128 cores (64 physical), 128GB of RAM and against my will a 4-disk (10k RPM) RAID5. I have been using hammerdb testing from 9.6 to 14, currently on windows 10. Obviously, I have been

Re: real/float example for testlibpq3

2022-02-28 Thread Tom Lane
Chapman Flack writes: > This stimulates a question for me. > Not just libpq, but all drivers implemented in whatever language, if they > wish to support binary protocol, depend on knowing what the committed > send/recv wire formats are for whichever types they mean to support. > In the current

Re: Separate the result of \watch for each query execution (psql)

2022-02-28 Thread Tom Lane
Noboru Saito writes: > I have created a patch that allows you to turn it on and off in \pset. > The attached patch adds the following features. > Formfeed can be turned on with the command line option or \pset. > Formfeed (\f\n) is output after the query execution result by \watch. Hmm ... I

Re: real/float example for testlibpq3

2022-02-28 Thread Chapman Flack
On 02/28/22 10:19, Tom Lane wrote: >> That will standardize the >> way to fetch real typed values in libpq. That leads to the next >> question. Do we need to introduce different PQget*value() for standard >> C/SQL data types. > > ... I do not want to go here. Where would you stop? How would you

Re: Removing unneeded self joins

2022-02-28 Thread Greg Stark
On Thu, 1 Jul 2021 at 02:38, Ronan Dunklau wrote: > > Well in some cases they can't, when the query is not emitting redundant > predicates by itself but they are added by something else like a view or a RLS > policy. > Maybe it would be worth it to allow spending a bit more time planning for >

Re: Patch: Code comments: why some text-handling functions are leakproof

2022-02-28 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 11, 2022 at 2:07 AM Gurjeet Singh wrote: >> This is more or less a verbatim copy of Tom's comment in email thread at [1]. >> >> I could not find an appropriate spot to place these comments, so I placed >> them on bttextcmp() function, The only other place that

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

2022-02-28 Thread Jacob Champion
On Mon, 2022-02-28 at 16:00 -0500, Stephen Frost wrote: > > commit efec9f040843d1de2fc52f5ce0d020478a5bc75d > > Author: Jacob Champion > > Date: Mon Feb 28 10:28:51 2022 -0800 > > > > squash! Add API to retrieve authn_id from SQL > > Bleh. :) Squash indeed. Ha, I wasn't sure if anyone

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > md5 should be removed. > > Really? I've always thought that the arguments against it were > overblown for our use-case. At any rate, it's likely to be > years before we could practically do that, since it's the best

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Tom Lane
Stephen Frost writes: > md5 should be removed. Really? I've always thought that the arguments against it were overblown for our use-case. At any rate, it's likely to be years before we could practically do that, since it's the best that older client libraries can manage.

Re: Missed condition-variable wakeups on FreeBSD

2022-02-28 Thread Thomas Munro
On Sun, Feb 27, 2022 at 9:44 AM Andres Freund wrote: > > (gdb) p debug_query_string > > $1 = 0x21873090 "select count(*) from simple r join simple s using (id);" > > (gdb) bt > > #0 _poll () at _poll.S:4 > > #1 0x21701361 in __thr_poll (fds=0x219dc170, nfds=2, timeout=-1) at > >

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

2022-02-28 Thread Stephen Frost
Greetings, * Jacob Champion (pchamp...@vmware.com) wrote: > On Fri, Feb 25, 2022 at 01:23:49PM -0800, Andres Freund wrote: > > Looks to me like authn_id isn't synchronized to parallel workers right now. > > So > > the function will return the wrong thing when executed as part of a parallel > >

Re: Adding CI to our tree

2022-02-28 Thread Justin Pryzby
On Sat, Feb 26, 2022 at 08:08:38PM -0800, Andres Freund wrote: > On 2022-02-26 21:10:57 -0600, Justin Pryzby wrote: > > If someone renames or removes an xref target, shouldn't CI fail on its next > > run for a patch which tries to reference it ? > > Why wouldn't it? I suppose you're right - I

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Stephen Frost
Greetings, * Jeff Davis (pg...@j-davis.com) wrote: > On Fri, 2022-02-25 at 14:10 -0500, Tom Lane wrote: > > I also have in mind here that there has been discussion of giving > > libpq a feature to refuse, on the client side, to send cleartext > > passwords. > > I am generally in favor of that

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Stephen Frost
Greetings, * Jonathan S. Katz (jk...@postgresql.org) wrote: > On 2/25/22 12:39 PM, Tom Lane wrote: > >Jeff Davis writes: > >>On Thu, 2022-02-24 at 20:47 -0500, Tom Lane wrote: > >>>... and, since we can't readily enforce that the client only sends > >>>those cleartext passwords over

Re: Fix overflow in justify_interval related functions

2022-02-28 Thread Tom Lane
Joseph Koshakow writes: > [ v4-0001-Check-for-overflow-in-justify_interval-functions.patch ] Pushed. I added a comment explaining why the one addition in interval_justify_interval doesn't require an overflow check. regards, tom lane

Re: [PATCH] Enable SSL library detection via PQsslAttribute

2022-02-28 Thread Jacob Champion
On Wed, 2022-02-23 at 23:20 +, Jacob Champion wrote: > First stab in v2-0002. Though I see that Andres is overhauling the > tests in this folder today [1], so I'll need to watch that thread. :) v3 rebases over Andres' changes and actually adds the Perl driver that I missed the git-add for.

Re: Add id's to various elements in protocol.sgml

2022-02-28 Thread Chapman Flack
On 02/28/22 14:41, Brar Piening wrote: > Attached is an extended version of the patch that changes the XSL and > CSS stylesheets to add links to the ids that are visible when hovering. That works nicely over here. I think that in other recent examples I've seen, there might be (something like a)

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-28 Thread Gunnar "Nick" Bluth
Am 28.02.22 um 12:56 schrieb Michael Paquier: On Sun, Feb 27, 2022 at 02:30:33PM +0100, Gunnar "Nick" Bluth wrote: That's universally true ;-) -# Internal routine to enable archive recovery command on a standby node +# Internal routine to enable archive recovery command on a standby node. +#

Re: Add id's to various elements in protocol.sgml

2022-02-28 Thread Brar Piening
On Feb 25, 2022 at 06:36, Brar Piening wrote: The major problem in that regard would probably be my lack of XSLT/docbook skills but if no one can jump in here, I can see if I can make it work. Ok, I've figured it out. Attached is an extended version of the patch that changes the XSL and CSS

Re: Allow root ownership of client certificate key

2022-02-28 Thread Tom Lane
David Steele writes: > [ client-key-perm-003.patch ] Pushed with a bit of copy-editing of the comments. > So, to test the new functionality, just add this snippet on line 57 of > 001_ssltests.pl: > chmod 0640, "$cert_tempdir/client.key" > or die "failed to change permissions on

Re: CREATEROLE and role ownership hierarchies

2022-02-28 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > 1. Don't allow a CREATEROLE user to give out membership in groups > which that user does not possess. Leaving aside the details of any > previously-proposed patches and just speaking theoretically, how can > this be implemented? I can

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

2022-02-28 Thread Jacob Champion
On Fri, Feb 25, 2022 at 01:23:49PM -0800, Andres Freund wrote: > Looks to me like authn_id isn't synchronized to parallel workers right now. So > the function will return the wrong thing when executed as part of a parallel > query. Thanks for the catch. It looks like MyProcPort is left empty, and

Re: Allow async standbys wait for sync replication (was: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers)

2022-02-28 Thread Nathan Bossart
On Mon, Feb 28, 2022 at 06:45:51PM +0530, Bharath Rupireddy wrote: > On Sat, Feb 26, 2022 at 9:37 PM Nathan Bossart > wrote: >> For >> this feature, I think we always need to consider what the primary considers >> synchronously replicated. My suggested approach doesn't change that. I'm >>

Re: parse/analyze API refactoring

2022-02-28 Thread Nathan Bossart
On Mon, Feb 28, 2022 at 07:46:40AM +0100, Peter Eisentraut wrote: > You set this commit fest entry to Waiting on Author, but there were no > reviews posted and the patch still applies and builds AFAICT, so I don't > know what you meant by that. Apologies for the lack of clarity. I believe my

CommitFest begins tomorrow... Get your patches in

2022-02-28 Thread Greg Stark
28 days has February ... So the March commitfest begins tomorrow. Meet your friendly neighbourhood Commitfest Manager for March. Greetings! If you have a patch you're hoping to get feedback on or you're expecting to get committed this month make sure it's in the commitfest at

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-28 Thread Julien Rouhaud
On Mon, Feb 28, 2022 at 05:00:05PM +0100, Peter Eisentraut wrote: > On 25.02.22 14:06, Magnus Hagander wrote: > > +OUT jit_generation_time float8, > > +OUT jit_inlining_time float8, > > +OUT jit_optimization_time float8, > > +OUT jit_emission_time float8 > > Perhaps those should

Re: Readd use of TAP subtests

2022-02-28 Thread Peter Eisentraut
On 25.02.22 17:26, Andres Freund wrote: Ok that's good to know. What exactly happens when it tries to parse them? Does it not count them or does it fail somehow? The way the output is structured Says that it can't pase a line of the tap output: Ok, then I suppose I'm withdrawing this.

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-28 Thread Peter Eisentraut
On 25.02.22 14:06, Magnus Hagander wrote: +OUT jit_generation_time float8, +OUT jit_inlining_time float8, +OUT jit_optimization_time float8, +OUT jit_emission_time float8 Perhaps those should be of type interval?

Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-02-28 Thread Bharath Rupireddy
Hi, It looks like we use "log segment" in various user-facing messages. The term "log" can mean server logs as well. The "WAL segment" suits well here and it is consistently used across the other user-facing messages [1]. Here's a small patch attempting to consistently use the "WAL segment".

Re: real/float example for testlibpq3

2022-02-28 Thread Tom Lane
Ashutosh Bapat writes: > I am wondering whether we should provide PQgetfloatvalue() which does > what that example shows but transparently. It will return a float > value of the given field instead of char *. I'm against that, precisely because ... > That will standardize the > way to fetch

Re: psql: Make SSL info display more compact

2022-02-28 Thread Tom Lane
Daniel Gustafsson writes: > On 28 Feb 2022, at 12:56, Peter Eisentraut > wrote: >> On 28.02.22 11:50, Dagfinn Ilmari Mannsåker wrote: >>> How about making it show "compression: on" if compression is on, but >>> nothing in the common "off" case? >> That would work for me. > On POLA grounds I

definition of CalculateMaxmumSafeLSN

2022-02-28 Thread Sergei Kornilov
Hello I just spotted in src/include/access/xlog.h: extern XLogRecPtr CalculateMaxmumSafeLSN(void); This function doesn't seem to be used anywhere or even defined? "git grep CalculateMaxmumSafeLSN" shows only this line. Was added in c6550776394e25c1620bc8258427c8f1d448080d "Allow users to limit

Re: create_index test fails when synchronous_commit = off @ master

2022-02-28 Thread Aleksander Alekseev
Hi Andres, > So it might be reasonable to use synchronous_commit=on in test_setup.sql? > It's not super satisfying, but I don't immediately see what else could prevent > all-visible to be set in this case? I don't see what else can be done either. Here is the corresponding patch. -- Best

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-02-28 Thread Amit Kapila
On Mon, Feb 28, 2022 at 5:46 PM Masahiko Sawada wrote: > > We've added some information such as the command and the timestamp to > the error context message by commit abc0910e2. This patch adds further > information to it: replication origin name and commit-LSN. > > This will be helpful for users

Re: Allow async standbys wait for sync replication (was: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers)

2022-02-28 Thread Bharath Rupireddy
On Sat, Feb 26, 2022 at 9:37 PM Nathan Bossart wrote: > > On Sat, Feb 26, 2022 at 02:17:50PM +0530, Bharath Rupireddy wrote: > > A global min LSN of SendRqstPtr of all the sync standbys can be > > calculated and the async standbys can send WAL up to global min LSN. > > This is unlike what the v1

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-02-28 Thread Matthias van de Meent
On Sun, 27 Feb 2022 at 16:14, Bharath Rupireddy wrote: > 3) Why do we need this extra calculation for start_lsn? > Do you ever see a negative LSN or something here? > +('0/0'::pg_lsn + ( > +CASE > +WHEN (s.param3 < 0) THEN pow((2)::numeric, (64)::numeric) > +

Re: real/float example for testlibpq3

2022-02-28 Thread Ashutosh Bapat
Hi Mark, Fetching a "real" type field from libpq doesn't look that intuitive. So this example is super helpful. Thanks. I am wondering whether we should provide PQgetfloatvalue() which does what that example shows but transparently. It will return a float value of the given field instead of char

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-02-28 Thread Julien Rouhaud
On Mon, Feb 28, 2022 at 06:03:54PM +0530, Bharath Rupireddy wrote: > On Mon, Feb 28, 2022 at 12:02 PM Julien Rouhaud wrote: > > > > I suggested upthread to store the starting timeline instead. This way you > > can > > deduce whether it's a restartpoint or a checkpoint, but you can also deduce >

Re: psql: Make SSL info display more compact

2022-02-28 Thread Daniel Gustafsson
> On 28 Feb 2022, at 12:56, Peter Eisentraut > wrote: > On 28.02.22 11:50, Dagfinn Ilmari Mannsåker wrote: >> Daniel Gustafsson writes: >>> This was originally done, but all client side changes reverted as there >>> still >>> are server versions in production which allow compression. >> How

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-02-28 Thread Bharath Rupireddy
On Mon, Feb 28, 2022 at 12:02 PM Julien Rouhaud wrote: > > Hi, > > On Mon, Feb 28, 2022 at 10:21:23AM +0530, Bharath Rupireddy wrote: > > > > Another thought for my review comment: > > > 1) Can't we use pg_is_in_recovery to determine if it's a restartpoint > > > or checkpoint instead of having a

Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-02-28 Thread Masahiko Sawada
Hia, We've added some information such as the command and the timestamp to the error context message by commit abc0910e2. This patch adds further information to it: replication origin name and commit-LSN. This will be helpful for users to set the origin name and LSN to

Re: [Proposal] Global temporary tables

2022-02-28 Thread Wenjing Zeng
> 2022年2月25日 15:45,Andres Freund 写道: > > Hi, > > > This is a huge thread. Realistically reviewers and committers can't reread > it. I think there needs to be more of a description of how this works included > in the patchset and *why* it works that way. The readme does a bit of that, > but

Re: psql: Make SSL info display more compact

2022-02-28 Thread Peter Eisentraut
On 28.02.22 12:21, Michael Paquier wrote: What about that making the information shown version-aware? I would choose to show the compression part only for server versions where it is settable. That might lead to confusing results if you are not connecting to something that is a stock

Re: psql: Make SSL info display more compact

2022-02-28 Thread Peter Eisentraut
On 28.02.22 11:50, Dagfinn Ilmari Mannsåker wrote: Daniel Gustafsson writes: On 28 Feb 2022, at 10:02, Peter Eisentraut wrote: Since support for SSL compression has been removed from PostgreSQL, it doesn't seem sensible to display it anymore. This was originally done, but all client

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-28 Thread Michael Paquier
On Sun, Feb 27, 2022 at 02:30:33PM +0100, Gunnar "Nick" Bluth wrote: > That's universally true ;-) -# Internal routine to enable archive recovery command on a standby node +# Internal routine to enable archive recovery command on a standby node. +# Returns generated restore_command. sub

Re: logical decoding and replication of sequences

2022-02-28 Thread Amit Kapila
On Sat, Feb 12, 2022 at 6:04 AM Tomas Vondra wrote: > > On 2/10/22 19:17, Tomas Vondra wrote: > > I've polished & pushed the first part adding sequence decoding > > infrastructure etc. Attached are the two remaining parts. > > > > I plan to wait a day or two and then push the test_decoding part.

Re: Allow file inclusion in pg_hba and pg_ident files

2022-02-28 Thread Julien Rouhaud
Hi, On Wed, Feb 23, 2022 at 09:44:58AM -0800, Nathan Bossart wrote: > > > Finally I also added 0003, which is a POC for a new pg_hba_matches() > > function, > > that can help DBA to understand why their configuration isn't working as > > they > > expect. This only to start the discussion on

Re: psql: Make SSL info display more compact

2022-02-28 Thread Michael Paquier
On Mon, Feb 28, 2022 at 10:50:01AM +, Dagfinn Ilmari Mannsåker wrote: > Daniel Gustafsson writes: >> On 28 Feb 2022, at 10:02, Peter Eisentraut >> wrote: >> This was originally done, but all client side changes reverted as there still >> are server versions in production which allow

Re: Add id's to various elements in protocol.sgml

2022-02-28 Thread Brar Piening
On 28.02.2022 at 10:24, Peter Eisentraut wrote: On 28.02.22 09:41, Brar Piening wrote: On Feb 25, 2022 at 14:31, Peter Eisentraut wrote: I think that kind of stuff would be added in via the web site stylesheets, so you wouldn't have to deal with XSLT at all. True for the CSS but  adding the

Re: Missed condition-variable wakeups on FreeBSD

2022-02-28 Thread Thomas Munro
On Sun, Feb 27, 2022 at 11:18 AM Melanie Plageman wrote: > How could it be that worker 2 is waiting on the build barrier in > PHJ_BUILD_HASHING_INNER and worker 1 and the leader are waiting on it > with it supposedly in PHJ_BUILD_HASHING_OUTER? That'd be consistent with a wakeup going missing,

RE: Logical replication timeout problem

2022-02-28 Thread kuroda.hay...@fujitsu.com
Dear Wang, > Attached a new patch that addresses following improvements I have got so far > as > comments: > 1. Consider other changes that need to be skipped(truncate, DDL and function > calls pg_logical_emit_message). [suggestion by Ajin, Amit] > (Add a new function SendKeepaliveIfNecessary

Re: psql: Make SSL info display more compact

2022-02-28 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: >> On 28 Feb 2022, at 10:02, Peter Eisentraut >> wrote: > >> Since support for SSL compression has been removed from PostgreSQL, it >> doesn't seem sensible to display it anymore. > > This was originally done, but all client side changes reverted as there still > are

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Peter Eisentraut
On 17.02.22 20:25, samay sharma wrote: A use case where this is useful are environments where you want authentication to be centrally managed across different services. This is a common deployment model for cloud providers where customers like to use single sign on and authenticate across

Re: Proposal: Support custom authentication methods using hooks

2022-02-28 Thread Peter Eisentraut
On 28.02.22 00:17, Jeff Davis wrote: I also have in mind here that there has been discussion of giving libpq a feature to refuse, on the client side, to send cleartext passwords. I am generally in favor of that idea, but I'm not sure that will completely resolve the issue. For instance, should

Re: Support for grabbing multiple consecutive values with nextval()

2022-02-28 Thread Peter Eisentraut
On 27.02.22 10:42, Jille Timmermans wrote: I wanted to be able to allocate a bunch of numbers from a sequence at once. Multiple people seem to be struggling with this (https://stackoverflow.com/questions/896274/select-multiple-ids-from-a-postgresql-sequence,

Re: unlogged sequences

2022-02-28 Thread Peter Eisentraut
rebased patch, no functional changes On 11.02.22 10:12, Peter Eisentraut wrote: On 25.06.19 20:37, Andres Freund wrote: I.e. I think it'd be better if we just added a fork argument to fill_seq_with_data(), and then do something like smgrcreate(srel, INIT_FORKNUM, false);

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2022-02-28 Thread Etsuro Fujita
On Thu, Feb 24, 2022 at 2:49 PM Etsuro Fujita wrote: > I think the 0003 patch needs rebase. > I'll update the patch. Here is an updated version. I added to the 0003 patch a macro for defining the milliseconds to wait, as proposed by David upthread. Best regards, Etsuro Fujita

Optimize external TOAST storage

2022-02-28 Thread davinder singh
Hi, For Toast storage [1] in PostgreSQL, first, the attribute value is compressed and then divided into chunks. The problem with storing compressed value is, if we are not saving enough space such that it reduces the #chunks then we end up adding extra decompression cost on every read. Based on

Re: Add id's to various elements in protocol.sgml

2022-02-28 Thread Peter Eisentraut
On 28.02.22 09:41, Brar Piening wrote: On Feb 25, 2022 at 14:31, Peter Eisentraut wrote: I think that kind of stuff would be added in via the web site stylesheets, so you wouldn't have to deal with XSLT at all. True for the CSS but  adding the HTML (#) will need either XSLT or Javascript.

  1   2   >