Re: row filtering for logical replication

2022-01-31 Thread Greg Nancarrow
On Tue, Feb 1, 2022 at 2:45 PM houzj.f...@fujitsu.com < houzj.f...@fujitsu.com> wrote: > > On Monday, January 31, 2022 9:02 PM Amit Kapila > > > > 2. > > + if (pubrinfo->pubrelqual) > > + appendPQExpBuffer(query, " WHERE (%s)", pubrinfo->pubrelqual); > > + appendPQExpBufferStr(query, ";\n"); > >

Re: XTS cipher mode for cluster file encryption

2022-01-31 Thread Antonin Houska
Bruce Momjian wrote: > On Mon, Nov 29, 2021 at 08:37:31AM +0100, Antonin Houska wrote: > > The changes to buffile.c are not trivial, but we haven't really changed the > > API, as long as you mean BufFileCreateTemp(), BufFileWrite(), BufFileRead(). > > > > What our patch affects on the caller

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Kyotaro Horiguchi
At Tue, 1 Feb 2022 10:08:04 +0530, Bharath Rupireddy wrote in > On Tue, Feb 1, 2022 at 9:49 AM Fujii Masao > wrote: > > > > My previous comment was confusing... Probably I understand why you tried to > > put this information in checkpoint log message. But I was suggesting to put > > that

Re: Design of pg_stat_subscription_workers vs pgstats

2022-01-31 Thread Masahiko Sawada
On Fri, Jan 28, 2022 at 2:59 PM Amit Kapila wrote: > > On Fri, Jan 28, 2022 at 1:49 AM David G. Johnston > wrote: > > > > On Thu, Jan 27, 2022 at 5:08 AM Amit Kapila wrote: > >> > >> On Thu, Jan 27, 2022 at 11:16 AM Andres Freund wrote: > >> > > >> > On 2022-01-25 20:27:07 +0900, Masahiko

Re: row filtering for logical replication

2022-01-31 Thread Amit Kapila
On Tue, Feb 1, 2022 at 9:15 AM houzj.f...@fujitsu.com wrote: > > On Monday, January 31, 2022 9:02 PM Amit Kapila > > > > > 3. > > + /* row filter (if any) */ > > + if (pset.sversion >= 15) > > + { > > + if (!PQgetisnull(result, i, 1)) > > + appendPQExpBuffer(, " WHERE %s", PQgetvalue(result,

Re: row filtering for logical replication

2022-01-31 Thread Greg Nancarrow
On Tue, Feb 1, 2022 at 2:45 PM houzj.f...@fujitsu.com wrote: > > Attach the V75 patch set which address the above, Amit's[1] and Greg's[2][3] > comments. > In the v74-0001 patch (and now in the v75-001 patch) a change was made in the GetTopMostAncestorInPublication() function, to get the

Re: Why is src/test/modules/committs/t/002_standby.pl flaky?

2022-01-31 Thread Thomas Munro
On Tue, Jan 25, 2022 at 3:50 PM Tom Lane wrote: > Thomas Munro writes: > > I vote for reverting in release branches only. I'll propose a better > > WES patch set for master that hopefully also covers async append etc > > (which I was already planning to do before we knew about this Windows > >

Re: Add connection active, idle time to pg_stat_activity

2022-01-31 Thread Kyotaro Horiguchi
At Mon, 31 Jan 2022 15:11:56 +0100, Sergey Dudoladov wrote in > > > if (beentry->st_state == STATE_RUNNING || > > > beentry->st_state == STATE_FASTPATH) > > > - pgstat_count_conn_active_time((PgStat_Counter) secs > > > * 100 + usecs);

Re: Extensible Rmgr for Table AMs

2022-01-31 Thread Julien Rouhaud
Hi, On Mon, Jan 31, 2022 at 06:36:59PM -0800, Jeff Davis wrote: > On Tue, 2022-01-18 at 17:53 +0800, Julien Rouhaud wrote: > > > There's a bit of 0003 present in 002: > > I just squashed 0002 and 0003 together. Not large enough to keep > separate. Agreed. > > + elog(LOG, "registering

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 9:49 AM Fujii Masao wrote: > > My previous comment was confusing... Probably I understand why you tried to > put this information in checkpoint log message. But I was suggesting to put > that information at the end of log message instead of the beginning of it. > Because

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

2022-01-31 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, Thank you for reviewing! I attached the latest version. > When more than one FDWs are used, even if one FDW calls this function to > disable the timeout, its remote-server-check-callback can still be called. Is > this > OK? > Please imagine the case where two FDWs are used and

Add DBState to pg_control_system function

2022-01-31 Thread Bharath Rupireddy
Hi, I think emitting DBState (staring up, shut down, shut down in recovery, shutting down, in crash recovery, in archive recovery, in production) via the pg_control_system function would help know the database state, especially during PITR/archive recovery. During archive recovery, the server can

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Fujii Masao
On 2022/02/01 13:01, Bharath Rupireddy wrote: On Tue, Feb 1, 2022 at 9:10 AM Fujii Masao wrote: The order of arguments for LSN seems wrong. LSN_FORMAT_ARGS(ControlFile->checkPoint) should be specified ahead of LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo)? Thanks. Corrected.

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 9:10 AM Fujii Masao wrote: > The order of arguments for LSN seems wrong. > LSN_FORMAT_ARGS(ControlFile->checkPoint) should be specified ahead of > LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo)? Thanks. Corrected. > Could you tell me why the information for LSN is

RE: row filtering for logical replication

2022-01-31 Thread houzj.f...@fujitsu.com
> On Saturday, January 29, 2022 8:31 AM Andres Freund > wrote: > > > > Hi, > > > > Are there any recent performance evaluations of the overhead of row > > filters? I think it'd be good to get some numbers comparing: > > Thanks for looking at the patch! Will test it. > > > > case

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Fujii Masao
On 2022/02/01 10:44, Nathan Bossart wrote: On Tue, Feb 01, 2022 at 12:23:10AM +0530, Bharath Rupireddy wrote: On Tue, Feb 1, 2022 at 12:00 AM Nathan Bossart wrote: I think the pg_controldata change needs some extra spaces for alignment, but otherwise these patches seem reasonable to me.

Re: Deparsing rewritten query

2022-01-31 Thread Julien Rouhaud
Hi, On Mon, Jan 31, 2022 at 10:05:44PM +0100, Pavel Stehule wrote: > > I don't feel good about forcing an alias. relname doesn't ensure > uniqueness. You can have two views with the same name from different > schemas. Moreover this field is necessary only when a deparsed query is > printed, not

Re: row filtering for logical replication

2022-01-31 Thread Greg Nancarrow
On Mon, Jan 31, 2022 at 12:57 PM houzj.f...@fujitsu.com wrote: > > Attach the V74 patch set which did the following changes: > In the v74-0001 patch, I noticed the following code in get_rel_sync_entry(): + /* + * Tuple slots cleanups. (Will be rebuilt later if needed). + */ + oldctx =

Re: Testing autovacuum wraparound (including failsafe)

2022-01-31 Thread Masahiko Sawada
On Fri, Jun 11, 2021 at 10:19 AM Andres Freund wrote: > > Hi, > > On 2021-06-10 16:42:01 +0300, Anastasia Lubennikova wrote: > > Cool. Thank you for working on that! > > Could you please share a WIP patch for the $subj? I'd be happy to help with > > it. > > I've attached the current WIP state,

Re: Make mesage at end-of-recovery less scary.

2022-01-31 Thread Kyotaro Horiguchi
Hi, Pavel. At Mon, 31 Jan 2022 15:17:09 +0400, Pavel Borisov wrote in > I don't quite understand a meaning of a comment: > /* it is completely zeroed, call it a day */ While rethinking about this comment, It came to my mind that XLogReaderValidatePageHeader is doing whole-page check. There

Re: row filtering for logical replication

2022-01-31 Thread Amit Kapila
On Sat, Jan 29, 2022 at 6:01 AM Andres Freund wrote: > > > > + if (has_filter) > > + { > > + /* Create or reset the memory context for row filters */ > > + if (entry->cache_expr_cxt == NULL) > > + entry->cache_expr_cxt = > >

Re: A qsort template

2022-01-31 Thread John Naylor
I wrote: > 0010 - Thresholds on my TODO list. I did some basic tests on the insertion sort thresholds, and it looks like we could safely and profitably increase the current value from 7 to 20 or so, in line with other more recent implementations. I've attached an addendum on top of 0012 and the

Re: Extensible Rmgr for Table AMs

2022-01-31 Thread Jeff Davis
On Tue, 2022-01-18 at 17:53 +0800, Julien Rouhaud wrote: > > Review on patch 0001 would be helpful. It makes decoding just > > another > > method of rmgr, which makes a lot of sense to me from a code > > organization standpoint regardless of the other patches. Is there > > any > > reason not to do

Re: row filtering for logical replication

2022-01-31 Thread Peter Smith
On Tue, Feb 1, 2022 at 12:07 PM Peter Smith wrote: > > On Sat, Jan 29, 2022 at 11:31 AM Andres Freund wrote: > > > > Hi, > > > > Are there any recent performance evaluations of the overhead of row > > filters? I > > think it'd be good to get some numbers comparing: > > > > 1) $workload with

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-31 Thread Noah Misch
On Mon, Jan 31, 2022 at 05:18:47PM -0500, Tom Lane wrote: > [ I was hoping for more opinions, but I guess nobody cares but us ] > > Andres Freund writes: > > On 2022-01-27 17:53:02 -0500, Tom Lane wrote: > >> So now we need to discuss whether we want to back-patch this. > >> Pros: avoid

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Nathan Bossart
On Tue, Feb 01, 2022 at 12:23:10AM +0530, Bharath Rupireddy wrote: > On Tue, Feb 1, 2022 at 12:00 AM Nathan Bossart > wrote: >> I think the pg_controldata change needs some extra spaces for alignment, >> but otherwise these patches seem reasonable to me. > > Thanks. My bad it was. Changed in

Re: archive modules

2022-01-31 Thread Nathan Bossart
On Sat, Jan 29, 2022 at 09:01:41PM -0800, Nathan Bossart wrote: > On Sat, Jan 29, 2022 at 04:31:48PM -0800, Nathan Bossart wrote: >> On Sat, Jan 29, 2022 at 12:50:18PM -0800, Nathan Bossart wrote: >>> Here is a new revision. I've moved basic_archive to contrib, hardened it >>> as suggested, and

Re: row filtering for logical replication

2022-01-31 Thread Andres Freund
On 2022-01-31 14:12:38 +1100, Greg Nancarrow wrote: > This array was only ever meant to be read-only, and visible only to > that function. > IMO removing "static" makes things worse because now that array gets > initialized each call to the function, which is unnecessary. > I think it should just

Research and Interview on scale-out solutions in Japan

2022-01-31 Thread Yugo NAGATA
Hello, I made a wiki page to describe a research on scale-out solutions and an interview on scale-out solutions to a few IT companies in Japan. https://wiki.postgresql.org/wiki/PGECons_CR_Scaleout_2021 This research and interview were conducted by the community relation team of PostgreSQL

Re: GUC flags

2022-01-31 Thread Justin Pryzby
On Mon, Jan 31, 2022 at 02:17:41PM +0900, Michael Paquier wrote: > With all those doc fixes, applied after an extra round of review. So > this makes us rather covered with the checks on the flags. Thanks > Now, what do we do with the rest of check_guc that involve a direct > lookup at what's on

Re: Proposal: More structured logging

2022-01-31 Thread Greg Stark
1) I would like an interface which more or less guarantees that *every* parameter of the log message is included in the structured data. Ideally there should be no actual need to generate the formatted messages for destinations like elastic search, just record the message id and the parameters.

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-01-31 Thread Justin Pryzby
On Mon, Jan 31, 2022 at 04:40:09PM -0500, Greg Stark wrote: > 4) This isn't really an issue with your patch at all but why on earth > do we have a bitvector for WAL compression methods?! Like, what does > it mean to have multiple compression methods set? That should just be > a separate field with

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-31 Thread Tom Lane
[ I was hoping for more opinions, but I guess nobody cares but us ] Andres Freund writes: > On 2022-01-27 17:53:02 -0500, Tom Lane wrote: >> So now we need to discuss whether we want to back-patch this. >> Pros: avoid configure warning now (not worth much); avoid outright >> build failure on

Re: Support for NSS as a libpq TLS backend

2022-01-31 Thread Daniel Gustafsson
> On 31 Jan 2022, at 22:32, Andres Freund wrote: > > Hi, > > On 2022-01-31 14:24:03 +0100, Daniel Gustafsson wrote: >>> On 28 Jan 2022, at 15:30, Robert Haas wrote: >>> I would really, really like to have an alternative to OpenSSL for PG. >>> I don't know if this is the right thing, though. If

Re: Support for NSS as a libpq TLS backend

2022-01-31 Thread Daniel Gustafsson
> On 31 Jan 2022, at 17:24, Stephen Frost wrote: > * Daniel Gustafsson (dan...@yesql.se) wrote: >> I'm counting this and Andres' comment as a -1 on the patchset, and given >> where >> we are in the cycle I'm mark it rejected in the CF app shortly unless anyone >> objects. > > I agree that it's

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-01-31 Thread Greg Stark
So I looked at this patch and I have the same basic question as Bruce. Do we really want to expose every binary tool associated with Postgres as an extension? Obviously this is tempting for cloud provider users which is not an unreasonable argument. But it does have consequences. 1) Some things

Re: Support tab completion for upper character inputs in psql

2022-01-31 Thread Tom Lane
I wrote: > =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: >> First, as noted in the test, it doesn't preserve the case of the input >> for keywords appended to the query result. This is easily fixed by >> using `pg_strdup_keyword_case()`, per the first attached patch. > I thought about that,

Re: Support for NSS as a libpq TLS backend

2022-01-31 Thread Andres Freund
Hi, On 2022-01-31 14:24:03 +0100, Daniel Gustafsson wrote: > > On 28 Jan 2022, at 15:30, Robert Haas wrote: > > I would really, really like to have an alternative to OpenSSL for PG. > > I don't know if this is the right thing, though. If other people are > > dropping support for it, that's a

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Mark Dilger
> On Jan 31, 2022, at 10:50 AM, Stephen Frost wrote: > > Supporting that through ADMIN is one option, another would be a > 'DROPROLE' attribute, though we'd want a way to curtail that from being > able to be used for just any role and that does lead down a path similar > to ownership or just

Re: Deparsing rewritten query

2022-01-31 Thread Pavel Stehule
po 31. 1. 2022 v 19:09 odesílatel Julien Rouhaud napsal: > Hi, > > On Mon, Jan 31, 2022 at 06:46:37PM +0100, Pavel Stehule wrote: > > > > I checked the last patch. I think it is almost trivial. I miss just > > comment, why this alias is necessary > > > > + if (!rte->alias) > > + rte->alias =

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Michael Banck
Hi, Am Montag, dem 31.01.2022 um 09:18 -0800 schrieb Mark Dilger: > On Jan 31, 2022, at 12:43 AM, Michael Banck < > michael.ba...@credativ.de> wrote: > Ok, sure. I think this topic is hugely important and as I read the > patch anyway, I added some comments, but yeah, we need to figure out > the

Re: PITR: enhance getRecordTimestamp()

2022-01-31 Thread Simon Riggs
On Thu, 27 Jan 2022 at 06:58, Michael Paquier wrote: > > On Wed, Nov 03, 2021 at 04:59:04PM +, Simon Riggs wrote: > > Thanks. Fixed and rebased. > > + if (xact_info == XLOG_XACT_PREPARE) > + { > + if (recoveryTargetUseOriginTime) > + { > +

Re: Multiple Query IDs for a rewritten parse tree

2022-01-31 Thread Andrey Lepikhov
On 29/1/2022 12:51, Julien Rouhaud wrote: 4. We should reserve position of default in-core generator From the discussion above I was under the impression that the core generator should be distinguished by a predefined kind. I don't really like this approach. IIUC, this patch as-is is meant

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Joshua Brindle
On Mon, Jan 31, 2022 at 1:50 PM Stephen Frost wrote: > > Greetings, > > * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > > On Jan 31, 2022, at 8:53 AM, Stephen Frost wrote: > > > Yeah, we do need to have a way to determine who is allowed to drop > > > roles and role ownership seems like

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 12:00 AM Nathan Bossart wrote: > > On Mon, Jan 31, 2022 at 11:45:19PM +0530, Bharath Rupireddy wrote: > > Thanks. Here are 2 patches, 0001 for adding checkpoint lsn and redo > > lsn in the checkpoint completed message and 0002 for changing the > > "location" to LSN in

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Stephen Frost
Greetings, * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > On Jan 31, 2022, at 8:53 AM, Stephen Frost wrote: > > Yeah, we do need to have a way to determine who is allowed to drop > > roles and role ownership seems like it's one possible approach to that. > > Which other ways are on the

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Nathan Bossart
On Mon, Jan 31, 2022 at 11:45:19PM +0530, Bharath Rupireddy wrote: > Thanks. Here are 2 patches, 0001 for adding checkpoint lsn and redo > lsn in the checkpoint completed message and 0002 for changing the > "location" to LSN in pg_controdata's output. With the 0002, > pg_control_checkpont,

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Bharath Rupireddy
On Mon, Jan 31, 2022 at 8:41 PM Stephen Frost wrote: > > > Thanks for your review. In summary, we have these options to choose > > checkpoint LSN and last REDO LSN: > > > > 1) "start=%X/%X, end=%X/%X" (ControlFile->checkPointCopy.redo, > > ControlFile->checkPoint) > > 2) "lsn=%X/%X, redo

Re: missing indexes in indexlist with partitioned tables

2022-01-31 Thread Arne Roland
Hi! From: Amit Langote Sent: Tuesday, January 25, 2022 09:04 Subject: Re: missing indexes in indexlist with partitioned tables > [...] > "partindexlist" really made me think about a list of "partial indexes" > for some reason. I think maybe "partedindexlist" is what you are > looking for;

Re: Catalog version access

2022-01-31 Thread Nathan Bossart
On Mon, Jan 31, 2022 at 04:57:13PM +0900, Michael Paquier wrote: > On Tue, Jan 25, 2022 at 01:12:32PM +0900, Michael Paquier wrote: >> Once you remove the requirement of a running server, we have basically >> what has been recently implemented with postgres -C for >> runtime-computed GUCs, because

Re: Deparsing rewritten query

2022-01-31 Thread Julien Rouhaud
Hi, On Mon, Jan 31, 2022 at 06:46:37PM +0100, Pavel Stehule wrote: > > I checked the last patch. I think it is almost trivial. I miss just > comment, why this alias is necessary > > + if (!rte->alias) > + rte->alias = makeAlias(get_rel_name(rte->relid), NULL); Thanks for looking at it Pavel!

Re: plperl on windows

2022-01-31 Thread Andres Freund
On 2022-01-31 10:43:31 -0500, Andrew Dunstan wrote: > We should fix that, maybe along these lines? WFM.

Re: Deparsing rewritten query

2022-01-31 Thread Pavel Stehule
Hi po 31. 1. 2022 v 15:37 odesílatel Gilles Darold napsal: > Le 28/06/2021 à 18:41, Julien Rouhaud a écrit : > > Thanks for the feedback Gilles! > > > > On Mon, Jun 28, 2021 at 04:06:54PM +0200, Gilles Darold wrote: > >> If we could at least call get_query_def()through an extension if we >

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Mark Dilger
> On Jan 31, 2022, at 8:53 AM, Stephen Frost wrote: > > Yeah, we do need to have a way to determine who is allowed to drop > roles and role ownership seems like it's one possible approach to that. Which other ways are on the table? Having ADMIN on a role doesn't allow you to do that, but

Re: drop tablespace failed when location contains .. on win32

2022-01-31 Thread Tom Lane
Andrew Dunstan writes: > On 1/30/22 16:50, Tom Lane wrote: >> Here's a revised patch version that does it like that. I also >> reviewed and simplified the canonicalize_path logic. I think >> this is committable. > LGTM Pushed, thanks for looking. I think I'm also going to have a look at

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Mark Dilger
> On Jan 31, 2022, at 12:43 AM, Michael Banck wrote: > Ok, sure. I think this topic is hugely important and as I read the > patch anyway, I added some comments, but yeah, we need to figure out > the fundamentals first. Right. Perhaps some background on this patch series will help. The

Re: drop tablespace failed when location contains .. on win32

2022-01-31 Thread Andrew Dunstan
On 1/30/22 16:50, Tom Lane wrote: > Michael Paquier writes: >> In order to make the tests cheap, there is no need to have a separate >> module in src/test/modules/ as your patch 0002 is doing. Instead, you >> should move the C code of your SQL function test_canonicalize_path() >> to

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Stephen Frost
Greetings, * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > On Jan 25, 2022, at 12:44 PM, Stephen Frost wrote: > > I agree that CREATEROLE is overpowered and that the goal of this should > > be to provide a way for roles to be created and dropped that doesn't > > give the user who has

Re: RFC: Logging plan of the running query

2022-01-31 Thread Fujii Masao
On 2022/01/28 17:45, torikoshia wrote: There is the case where the request to log a query plan is skipped even while the target backend is running a query. If this happens, users can just retry pg_log_query_plan(). These things should be documented? Agreed. Added following:   +   

Re: DELETE CASCADE

2022-01-31 Thread Julien Rouhaud
Hi, On Mon, Jan 31, 2022 at 09:14:21AM -0600, David Christensen wrote: > > Sounds good; when I get time to look at this again I will resubmit (if > people think the base functionality is worth it, which is still a topic of > discussion). Yes, please do! Sorry I should have mentioned it, if a

Re: Multiple Query IDs for a rewritten parse tree

2022-01-31 Thread Dmitry Dolgov
> On Mon, Jan 31, 2022 at 02:59:17PM +0500, Andrey V. Lepikhov wrote: > On 1/28/22 9:51 PM, Dmitry Dolgov wrote: > > > On Fri, Jan 21, 2022 at 11:33:22AM +0500, Andrey V. Lepikhov wrote: > > > Registration of an queryId generator implemented by analogy with > > > extensible > > > methods

Re: Support for NSS as a libpq TLS backend

2022-01-31 Thread Stephen Frost
Greetings, * Daniel Gustafsson (dan...@yesql.se) wrote: > > On 28 Jan 2022, at 15:30, Robert Haas wrote: > > On Fri, Jan 28, 2022 at 9:08 AM Daniel Gustafsson wrote: > >>> Kinda makes me question the wisdom of starting to depend on NSS. When > >>> openssl > >>> docs are vastly outshining a

Re: plperl on windows

2022-01-31 Thread Andrew Dunstan
On 10/4/21 18:02, Andres Freund wrote: > Hi, > > On 2021-10-04 14:38:16 -0700, Andres Freund wrote: >> 2) For some reason src/tools/install.pl doesn't install plperl[u].control, >>plperl[u]--1.0.sql - But apparently the buildfarm doesn't have that issue, >>because drongo successfully ran

Re: DELETE CASCADE

2022-01-31 Thread David Christensen
On Sun, Jan 30, 2022 at 9:47 PM Julien Rouhaud wrote: > Hi, > > On Tue, Jan 25, 2022 at 10:26:53PM +0800, Julien Rouhaud wrote: > > > > It's been almost 4 months since your last email, and almost 2 weeks > since the > > notice that this patch doesn't apply anymore. Without update in the next >

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-31 Thread Stephen Frost
Greetings, * Bharath Rupireddy (bharath.rupireddyforpostg...@gmail.com) wrote: > On Fri, Jan 28, 2022 at 11:16 AM Nathan Bossart > wrote: > > I know I voted for "start=%X/%X, end=%X/%X," but looking at this again, I > > wonder if it could be misleading. "start" is the redo location, and "end" >

Re: Make relfile tombstone files conditional on WAL level

2022-01-31 Thread Dilip Kumar
On Mon, Jan 31, 2022 at 7:36 PM Robert Haas wrote: > > On Mon, Jan 31, 2022 at 9:04 AM Robert Haas wrote: > > On Mon, Jan 31, 2022 at 12:29 AM Dilip Kumar wrote: > > > the main one currently we do not have uint8 data > > > type only int8 is there so I have used int8 for storing relfilenode + >

Re: make MaxBackends available in _PG_init

2022-01-31 Thread Robert Haas
On Fri, Jan 28, 2022 at 9:19 PM Michael Paquier wrote: > As of the issues of this thread, we really have two things to think > about: > 1) How do we want to control the access of some parameters in a > context or another? One idea would be more control through GUCs, say > with a set of

Re: refactoring basebackup.c

2022-01-31 Thread Jeevan Ladhe
> I think you are right, I have removed the message and again introduced > the Assert() back. > In my previous version of patch, this was a problem, basically, there should not be an assert as the code is still reachable be it server-lz4 or client-lz4. I removed the assert and added the level

Re: Add connection active, idle time to pg_stat_activity

2022-01-31 Thread Sergey Dudoladov
Hi, Thank you for the reviews. > > The write operation to beentry needs to be enclosed by > > PGSTAT_BEGIN/END_WRITE_ACTIVITY(). In that perspective, it would be > > better to move that writes to the PGSTAT_WRITE_ACTIVITY section just > > below. I have fixed it in the new version. > >

Re: Make relfile tombstone files conditional on WAL level

2022-01-31 Thread Robert Haas
On Mon, Jan 31, 2022 at 9:04 AM Robert Haas wrote: > On Mon, Jan 31, 2022 at 12:29 AM Dilip Kumar wrote: > > the main one currently we do not have uint8 data > > type only int8 is there so I have used int8 for storing relfilenode + > > forknumber. > > I'm confused. We use int8 in tons of places,

Re: Make relfile tombstone files conditional on WAL level

2022-01-31 Thread Robert Haas
On Mon, Jan 31, 2022 at 12:29 AM Dilip Kumar wrote: > the main one currently we do not have uint8 data > type only int8 is there so I have used int8 for storing relfilenode + > forknumber. I'm confused. We use int8 in tons of places, so I feel like it must exist. -- Robert Haas EDB:

Re: refactoring basebackup.c

2022-01-31 Thread Robert Haas
On Mon, Jan 31, 2022 at 6:11 AM Jeevan Ladhe wrote: > I had an offline discussion with Dipesh, and he will be working on the > lz4 client side decompression part. OK. I guess we should also be thinking about client-side LZ4 compression. It's probably best to focus on that before worrying about

Re: Support for NSS as a libpq TLS backend

2022-01-31 Thread Daniel Gustafsson
> On 28 Jan 2022, at 15:30, Robert Haas wrote: > > On Fri, Jan 28, 2022 at 9:08 AM Daniel Gustafsson wrote: >>> Kinda makes me question the wisdom of starting to depend on NSS. When >>> openssl >>> docs are vastly outshining a library's, that library really should start to >>> ask itself some

Re: row filtering for logical replication

2022-01-31 Thread Amit Kapila
On Mon, Jan 31, 2022 at 1:08 PM Amit Kapila wrote: > > On Mon, Jan 31, 2022 at 7:27 AM houzj.f...@fujitsu.com > wrote: > > > > On Monday, January 31, 2022 8:53 AM Peter Smith > > wrote: > > > > > > PSA v73*. > > > > > > (A rebase was needed due to recent changes in tab-complete.c. > > >

Re: logical replication empty transactions

2022-01-31 Thread Ajin Cherian
On Sun, Jan 30, 2022 at 7:04 PM osumi.takami...@fujitsu.com wrote: > > On Thursday, January 27, 2022 9:57 PM Ajin Cherian wrote: > Hi, thanks for your patch update. > > > > On Wed, Jan 26, 2022 at 8:33 PM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Tuesday, January 11, 2022 6:43 PM

Re: drop tablespace failed when location contains .. on win32

2022-01-31 Thread Tom Lane
Michael Paquier writes: > Should we have tests for WIN32 (aka for driver letters and "//")? > This could be split into its own separate test file to limit the > damage with the alternate outputs, and the original complain was from > there. I thought about it and concluded that the value couldn't

Re: Make mesage at end-of-recovery less scary.

2022-01-31 Thread Pavel Borisov
> > > This v8 is changed in... > > > > - Added tests to 011_crash_recovery.pl > > > > - Fixed a bug that server emits "end-of-wal" messages even if it have > > emitted an error message for the same LSN. > > > > - Changed XLogReaderValidatePageHeader() so that it recognizes an > > empty page as

Re: refactoring basebackup.c

2022-01-31 Thread Jeevan Ladhe
Hi Robert, I had an offline discussion with Dipesh, and he will be working on the lz4 client side decompression part. Please find the attached patch with the following changes: - Even if we were going to support LZ4 only on the server side, surely > it's not right to refuse --compress lz4 and

Re: Multiple Query IDs for a rewritten parse tree

2022-01-31 Thread Andrey V. Lepikhov
On 1/28/22 9:51 PM, Dmitry Dolgov wrote: On Fri, Jan 21, 2022 at 11:33:22AM +0500, Andrey V. Lepikhov wrote: Registration of an queryId generator implemented by analogy with extensible methods machinery. Why not more like suggested with stakind and slots in some data structure? All of those

Re: CREATEROLE and role ownership hierarchies

2022-01-31 Thread Michael Banck
Hi, Am Sonntag, dem 30.01.2022 um 17:11 -0800 schrieb Mark Dilger: > > On Jan 30, 2022, at 2:38 PM, Michael Banck < > > michael.ba...@credativ.de> wrote: > > > The attached WIP patch attempts to solve most of the CREATEROLE > > I'm mostly looking for whether the general approach in this Work

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-01-31 Thread Kyotaro Horiguchi
At Thu, 6 Jan 2022 00:02:27 +, Jacob Champion wrote in > On Mon, 2022-01-03 at 16:19 +, Jacob Champion wrote: > > On Fri, 2021-12-17 at 15:40 +0900, Kyotaro Horiguchi wrote: > > > > > > + inet_net_pton_ipv4(const char *src, u_char *dst) > > > (calls inet_net_pton_ipv4_internal(src,

Re: drop tablespace failed when location contains .. on win32

2022-01-31 Thread Michael Paquier
On Sun, Jan 30, 2022 at 04:50:03PM -0500, Tom Lane wrote: > Here's a revised patch version that does it like that. I also > reviewed and simplified the canonicalize_path logic. I think > this is committable. Thanks for the updated version. The range of the tests looks fine enough, and the CF