Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2021-10-10 Thread Masahiko Sawada
. On Fri, Oct 8, 2021 at 4:50 PM Kyotaro Horiguchi wrote: > > At Thu, 7 Oct 2021 13:20:14 +0900, Masahiko Sawada > wrote in > > Another idea to fix this problem would be that before calling > > SnapBuildCommitTxn() we create transaction entries in ReorderBuffer > > for (sub)transactions whose C

Re: Inconsistency in startup process's MyBackendId and procsignal array registration with ProcSignalInit()

2021-10-10 Thread Fujii Masao
On 2021/10/09 22:22, Bharath Rupireddy wrote: Hi, It looks like auxiliary processes will not have a valid MyBackendId as they don't call InitPostgres() and SharedInvalBackendInit() unlike backends. But the startup process (which is an auxiliary process) in hot standby mode seems to be differe

Error "initial slot snapshot too large" in create replication slot

2021-10-10 Thread Dilip Kumar
While creating an "export snapshot" I don't see any protection why the number of xids in the snapshot can not cross the "GetMaxSnapshotXidCount()"?. Basically, while converting the HISTORIC snapshot to the MVCC snapshot in "SnapBuildInitialSnapshot()", we add all the xids between snap->xmin to sna

Re: Reword docs of feature "Remove temporary files after backend crash"

2021-10-10 Thread Fujii Masao
On 2021/10/10 22:33, Bharath Rupireddy wrote: IIUC, the "server crash" includes any backend, auxiliary process, postmaster crash i.e. database cluster/instance crash. The commit cd91de0d1 especially added the temp file cleanup support if any backend or auxiliary process (except syslogger and s

Re: VS2022: Support Visual Studio 2022 on Windows

2021-10-10 Thread Michael Paquier
On Mon, Oct 04, 2021 at 08:21:52AM -0400, Andrew Dunstan wrote: > I think we'll want to wait for the official release before we add > support for it. Agreed. I am pretty sure that the version strings this patch is using are going to change until the release happens. -- Michael signature.asc Des

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-10 Thread Greg Nancarrow
On Wed, Oct 6, 2021 at 6:11 PM Masahiko Sawada wrote: > > To fix it, I thought that we change the create index code and the > vacuum code so that the individual parallel worker sets its status > flags according to the leader’s one. But ISTM it’d be better to copy > the leader’s status flags to wor

Re: Fix pg_log_backend_memory_contexts() 's delay

2021-10-10 Thread Fujii Masao
On 2021/10/11 14:28, torikoshia wrote: Thanks for the patch! It might be self-evident, but since there are comments on other process handlings in HandleAutoVacLauncherInterrupts like below, how about adding a comment for the consistency? +1 I applied such cosmetic changes to the patch. Pa

Re: pg_upgrade test for binary compatibility of core data types

2021-10-10 Thread Michael Paquier
On Fri, Oct 01, 2021 at 04:58:41PM +0900, Michael Paquier wrote: > I was looking at this CF entry, and what you are doing in 0004 to move > the tweaks from pg_upgrade's test.sh to a separate SQL script that > uses psql's meta-commands like \if to check which version we are on is > really interestin

Re: Multi-Column List Partitioning

2021-10-10 Thread Rajkumar Raghuwanshi
Thanks for the patch, it applied cleanly and fixed the reported issue. I observed another case where In case of multi-col list partition on the same column query is not picking partition wise join. Is this expected? CREATE TABLE plt1 (a int, b int, c varchar) PARTITION BY LIST(c,c); CREATE TABLE

Re: Fix pg_log_backend_memory_contexts() 's delay

2021-10-10 Thread torikoshia
Thanks for the patch! It might be self-evident, but since there are comments on other process handlings in HandleAutoVacLauncherInterrupts like below, how about adding a comment for the consistency? /* Process barrier events */ if (ProcSignalBarrierPending) ProcessProcSigna

is possible an remote access to some macos?

2021-10-10 Thread Pavel Stehule
Hi I would like to fix an issue https://github.com/okbob/pspg/issues/188 where the write to clipboard from pspg doesn`t work on macos. But it is hard to fix it without any macos. I am not a user of macos and I would not buy it just for this purpose. Is it possible to get some remote ssh access?

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

2021-10-10 Thread Bharath Rupireddy
On Mon, Oct 11, 2021 at 8:21 AM torikoshia wrote: > > Thanks for working on this! > > On 2021-10-09 22:23, Bharath Rupireddy wrote: > > Hi, > > > > Currently pg_log_backend_memory_contexts() doesn't log the memory > > contexts of auxiliary processes such as bgwriter, checkpointer, wal > > writer,

Re: Skipping logical replication transactions on subscriber side

2021-10-10 Thread Masahiko Sawada
On Fri, Oct 8, 2021 at 4:09 PM osumi.takami...@fujitsu.com wrote: > > On Thursday, September 30, 2021 2:45 PM Masahiko Sawada > wrote: > > I've attached updated patches that incorporate all comments I got so far. > > Please > > review them. > Hi > > > Sorry, if I misunderstand something but > d

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

2021-10-10 Thread torikoshia
Thanks for working on this! On 2021-10-09 22:23, Bharath Rupireddy wrote: Hi, Currently pg_log_backend_memory_contexts() doesn't log the memory contexts of auxiliary processes such as bgwriter, checkpointer, wal writer, archiver, startup process and wal receiver. It will be useful to look at th

RE: Added schema level support for publication.

2021-10-10 Thread tanghy.f...@fujitsu.com
> On Friday, October 8, 2021 7:05 PM Amit Kapila > wrote: > > v37-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication > 3. > --- a/src/bin/pg_dump/t/002_pg_dump.pl > +++ b/src/bin/pg_dump/t/002_pg_dump.pl > .. > + 'ALTER PUBLICATION pub3 ADD ALL TABLES IN SCHEMA dump_test' => { > + create_order

Re: strange case of "if ((a & b))"

2021-10-10 Thread Masahiko Sawada
On Mon, Oct 11, 2021 at 9:45 AM Michael Paquier wrote: > > On Thu, Oct 07, 2021 at 04:49:10PM +0900, Michael Paquier wrote: > > Looks right. I would be tempted to keep the one in readfuncs.c > > though, mostly as a matter of style. > > I have left this one alone, and applied the rest as of 68f7c4

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-10 Thread Michael Paquier
On Mon, Oct 11, 2021 at 09:23:32AM +0900, Masahiko Sawada wrote: > On Sat, Oct 9, 2021 at 12:13 AM Alvaro Herrera > wrote: >> * PROC_VACUUM_FOR_WRAPAROUND. Should be innocuous I think, since the >> "parent" process already has this flag and thus shouldn't be cancelled. > > Currently, we don't s

Re: strange case of "if ((a & b))"

2021-10-10 Thread Michael Paquier
On Thu, Oct 07, 2021 at 04:49:10PM +0900, Michael Paquier wrote: > Looks right. I would be tempted to keep the one in readfuncs.c > though, mostly as a matter of style. I have left this one alone, and applied the rest as of 68f7c4b. -- Michael signature.asc Description: PGP signature

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

2021-10-10 Thread Michael Paquier
On Sun, Oct 10, 2021 at 04:07:43PM +0200, Peter Eisentraut wrote: > On 03.10.21 09:03, Michael Paquier wrote: >> On Sat, Oct 02, 2021 at 11:34:38PM -0400, Tom Lane wrote: >>> Maybe we could leave test.sh in place for awhile? I'd rather >>> not cause a flag day for buildfarm owners. (Also, how do

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-10 Thread Masahiko Sawada
On Sat, Oct 9, 2021 at 12:13 AM Alvaro Herrera wrote: > > On 2021-Oct-06, Masahiko Sawada wrote: > > > Hi all, > > > > A customer reported that during parallel index vacuum, the oldest xmin > > doesn't advance. Normally, the calculation of oldest xmin > > (ComputeXidHorizons()) ignores xmin/xid of

RE: Question about client_connection_check_interval

2021-10-10 Thread kuroda.hay...@fujitsu.com
Dear Horiguchi-san, Thank you for replying! I understood I was wrong. Sorry. > You're misunderstanding here. Maybe you saw that start_xact_command() > starts the timer but note that the function is called before every > command execution. Based on your advice I read codes again and I found that

Re: Proposal: allow database-specific role memberships

2021-10-10 Thread David G. Johnston
On Sun, Oct 10, 2021 at 2:29 PM Kenaniah Cerny wrote: > In building off of prior art regarding the 'pg_read_all_data' and > 'pg_write_all_data' roles, I would like to propose an extension to roles > that would allow for database-specific role memberships (for the purpose of > granting database-sp

Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.

2021-10-10 Thread Noah Misch
On Sun, Oct 10, 2021 at 04:10:38PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Sun, Oct 10, 2021 at 01:17:10PM -0400, Tom Lane wrote: > >> The closest I can get to what we want using cpanm is with this recipe: > >> cpanm install Test::Simple@0.87_01 > >> cpanm install IPC::Run@0.79 > >> cpa

Re: [PATCH] Don't block HOT update by BRIN index

2021-10-10 Thread Josef Šimánek
po 4. 10. 2021 v 16:17 odesílatel Tomas Vondra napsal: > > Hi, > > I took a look at this patch again to see if I can get it polished and > fixed. Per the discussion, I've removed the rd_indexattr list and > replaced it with a simple flag. While doing so, I noticed a couple of > places that should

Proposal: allow database-specific role memberships

2021-10-10 Thread Kenaniah Cerny
Hi all, In building off of prior art regarding the 'pg_read_all_data' and 'pg_write_all_data' roles, I would like to propose an extension to roles that would allow for database-specific role memberships (for the purpose of granting database-specific privileges) as an additional layer of abstractio

Re: Adding CI to our tree

2021-10-10 Thread Andres Freund
Hi, On 2021-10-10 21:48:09 +0200, Peter Eisentraut wrote: > On 02.10.21 00:27, Andres Freund wrote: > > The attached patch adds CI using cirrus-ci. > > I like this in principle. But I don't understand what the docker stuff is > about. I have used Cirrus CI before, and didn't have to do anything

Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.

2021-10-10 Thread Tom Lane
Noah Misch writes: > On Sun, Oct 10, 2021 at 01:17:10PM -0400, Tom Lane wrote: >> The closest I can get to what we want using cpanm is with this recipe: >> cpanm install Test::Simple@0.87_01 >> cpanm install IPC::Run@0.79 >> cpanm install ExtUtils::MakeMaker@6.50 # downgrade > While the MakeMake

Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.

2021-10-10 Thread Noah Misch
On Sun, Oct 10, 2021 at 01:17:10PM -0400, Tom Lane wrote: > However, back to the matter of the recipe. I'm feeling discouraged > again because experimentation shows that cpanm insists on updating > the ExtUtils suite to current while installing Test::Simple. You > can then downgrade that, but it'

Re: Adding CI to our tree

2021-10-10 Thread Peter Eisentraut
On 02.10.21 00:27, Andres Freund wrote: The attached patch adds CI using cirrus-ci. I like this in principle. But I don't understand what the docker stuff is about. I have used Cirrus CI before, and didn't have to do anything about Docker. This could use some explanation.

Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.

2021-10-10 Thread Tom Lane
I wrote: > The closest I can get to what we want using cpanm is with this recipe: > cpanm install Test::Simple@0.87_01 > cpanm install IPC::Run@0.79 > cpanm install ExtUtils::MakeMaker@6.50 # downgrade Upon trying to actually use the perlbrew installation, I discovered another oversi

Re: Time to upgrade buildfarm coverage for some EOL'd OSes?

2021-10-10 Thread Mikael Kjellström
On 2021-10-10 20:00, Tom Lane wrote: =?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: curculio: Is not able to connect to https://git.postgresql.org due to the Let's Encrypt expired CA. We're working on fixing things so that git.postgresql.org will advertise a cert chain that is compatible with old

Re: Time to upgrade buildfarm coverage for some EOL'd OSes?

2021-10-10 Thread Tom Lane
=?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: > curculio: Is not able to connect to https://git.postgresql.org due to > the Let's Encrypt expired CA. We're working on fixing things so that git.postgresql.org will advertise a cert chain that is compatible with older OpenSSL versions. I thought that

Re: Time to upgrade buildfarm coverage for some EOL'd OSes?

2021-10-10 Thread Mikael Kjellström
On 2021-10-08 21:40, Thomas Munro wrote: Sure I can keep curculio as is. Will just upgrade morepork to OpenBSD 6.9 then. Thanks very much for doing all these upgrades! No problem. Current status is: loach: Upgraded to FreeBSD 12.2 morepork: Upgraded to OpenBSD 6.9 conchuela: Upgraded to

Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.

2021-10-10 Thread Tom Lane
Noah Misch writes: > On Sat, Oct 09, 2021 at 04:34:46PM -0400, Tom Lane wrote: >> ... Now I'm wondering what >> version of IPC::Run to recommend. > You mentioned prairiedog uses IPC::Run 0.79. That's from 2005. (Perl 5.8.3 > is from 2004, and Test::More 0.87 is from 2009.) I'd just use 0.79 in

Re: Bug in DefineRange() with multiranges

2021-10-10 Thread Peter Eisentraut
On 04.10.21 19:09, Sergey Shinderuk wrote: I wonder what is the proper fix.  Just drop pfree() altogether or add pstrdup() instead?  I see that makeMultirangeTypeName() doesn't bother freeing its buf. I think removing the pfree()s is a correct fix.

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

2021-10-10 Thread Peter Eisentraut
On 03.10.21 09:03, Michael Paquier wrote: On Sat, Oct 02, 2021 at 11:34:38PM -0400, Tom Lane wrote: Maybe we could leave test.sh in place for awhile? I'd rather not cause a flag day for buildfarm owners. (Also, how do we see this working in the back branches?) I would be fine with test.sh st

Re: Skipping logical replication transactions on subscriber side

2021-10-10 Thread Peter Eisentraut
On 04.10.21 02:31, Masahiko Sawada wrote: I guess disabling subscriptions on error/conflict and skipping the particular transactions are somewhat different types of functions. Disabling subscriptions on error/conflict seems likes a setting parameter of subscriptions. The users might want to speci

Re: Reword docs of feature "Remove temporary files after backend crash"

2021-10-10 Thread Bharath Rupireddy
On Sun, Oct 10, 2021 at 9:12 AM Fujii Masao wrote: > > On 2021/10/10 1:25, Bharath Rupireddy wrote: > > On Sat, Oct 9, 2021 at 9:42 PM Justin Pryzby wrote: > >> > >> I doubt there's much confusion here - crashes are treated the same. I > >> think > >> the fix would be to say "server crash" rath

Re: Time to upgrade buildfarm coverage for some EOL'd OSes?

2021-10-10 Thread Peter Eisentraut
On 08.10.21 00:40, Tom Lane wrote: As far as that goes, I thought we had a policy against auto-detecting user-visible features. From memory, the rationale goes like "if you want feature X you should say so, so that the build will fail if we can't provide it". Thus we make you say something like

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-10 Thread Michael Paquier
On Fri, Oct 08, 2021 at 12:14:57PM -0400, Andrew Dunstan wrote: > I think we need to be more explicit about it, especially w.r.t. indirect > calls. Every subroutine in the call stack below where you want to error > reported as coming from should contain this line. Hmm. I got to think about that f

Re: Transactions involving multiple postgres foreign servers, take 2

2021-10-10 Thread Etsuro Fujita
Fujii-san, On Thu, Oct 7, 2021 at 11:37 PM Fujii Masao wrote: > On 2021/10/07 19:47, Etsuro Fujita wrote: > > On Thu, Oct 7, 2021 at 1:29 PM k.jami...@fujitsu.com > > wrote: > >> and prove that commit performance can be improved, > >> e.g. if we can commit not in serial but also possible in para