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

2021-09-02 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, Thank you for your great works. Attached is the latest version. > Thanks! What about updating the comments furthermore as follows? > > - > Use pgfdw_application_name as application_name if set. > > PQconnectdbParams() processes the parameter

Re: Possible missing segments in archiving on standby

2021-09-02 Thread Kyotaro Horiguchi
At Fri, 3 Sep 2021 02:06:45 +0900, Fujii Masao wrote in > > > On 2021/09/02 10:16, Kyotaro Horiguchi wrote: > > Ok, I agree that the reader-side needs an amendment. > > Thanks for the review! Attached is the updated version of the patch. > Based on my latest patch, I changed the startup

Unused variable in TAP tests file

2021-09-02 Thread Amul Sul
Few tap test files have the "tempdir_short" variable which isn't in use. The attached patch removes the same Regards, Amul From 0751895df64bcd6bc719933013edf1d76e31b784 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Fri, 3 Sep 2021 01:19:29 -0400 Subject: [PATCH] Remove unused variable ---

Re: Estimating HugePages Requirements?

2021-09-02 Thread Kyotaro Horiguchi
At Thu, 2 Sep 2021 16:46:56 +, "Bossart, Nathan" wrote in > On 9/2/21, 12:54 AM, "Michael Paquier" wrote: > > Thanks. Anyway, we don't really need huge_pages_required on Windows, > > do we? The following docs of Windows tell what do to when using large > > pages: > >

Re: using an end-of-recovery record in all cases

2021-09-02 Thread Kyotaro Horiguchi
At Thu, 2 Sep 2021 11:30:59 -0400, Robert Haas wrote in > On Mon, Aug 9, 2021 at 3:00 PM Robert Haas wrote: > > I decided to try writing a patch to use an end-of-recovery record > > rather than a checkpoint record in all cases. > > > > The first problem I hit was that

RE: [PATCH] support tab-completion for single quote input with equal sign

2021-09-02 Thread tanghy.f...@fujitsu.com
On Friday, September 3, 2021 2:14 AM, Jacob Champion wrote >I applied your patch against HEAD (and did a clean build for good >measure) but couldn't get the tab-completion you described -- on my >machine, `PUBLICATION` still fails to complete. Tab completion is >working in general, for example

Re: suboverflowed subtransactions concurrency performance optimize

2021-09-02 Thread Andrey Borodin
31 авг. 2021 г., в 11:43, Pengchengliu написал(а):Hi Andrey, Thanks a lot for your replay and reference information. The default NUM_SUBTRANS_BUFFERS is 32. My implementation is local_cache_subtrans_pages can be adjusted dynamically. If we configure local_cache_subtrans_pages as 64, every backend

Re: PoC/WIP: Extended statistics on expressions

2021-09-02 Thread Justin Pryzby
On Wed, Sep 01, 2021 at 06:45:29PM +0200, Tomas Vondra wrote: > However while polishing the second patch, I realized we're allowing > statistics on expressions referencing system attributes. So this fails; > > CREATE STATISTICS s ON ctid, x FROM t; > > but this passes: > > CREATE STATISTICS s

Re: improve pg_receivewal code

2021-09-02 Thread Bharath Rupireddy
On Thu, Sep 2, 2021 at 9:05 PM Ronan Dunklau wrote: > > 1) Fetch the server system identifier in the first RunIdentifySystem > > call and use it to identify(via pg_receivewal's ReceiveXlogStream) any > > unexpected changes that may happen in the server while pg_receivewal > > is connected to it.

Re: a misbehavior of partition row movement (?)

2021-09-02 Thread Amit Langote
Hi Andrew, On Fri, Sep 3, 2021 at 6:19 AM Andrew Dunstan wrote: > On 7/13/21 8:09 AM, Amit Langote wrote: > > Unfortunately, I don’t think I’ll have time in this CF to solve some > > very fundamental issues I found in the patch during the last cycle. > > I’m fine with either marking this as RwF

Re: AIX: Symbols are missing in libpq.a

2021-09-02 Thread Noah Misch
On Wed, Sep 01, 2021 at 08:59:57AM +, REIX, Tony wrote: > Here is a new patch, using the export.txt whenever it does exist. > I have tested it with v13.4 : it's OK. > Patch for 14beta3 should be the same since there was no change for > src/Makefile.shlib between v13 and v14. Thanks. This

Re: replay of CREATE TABLESPACE eats data at wal_level=minimal

2021-09-02 Thread Noah Misch
On Thu, Sep 02, 2021 at 11:28:27AM -0400, Robert Haas wrote: > On Wed, Aug 25, 2021 at 8:03 AM Robert Haas wrote: > > On Wed, Aug 25, 2021 at 1:21 AM Noah Misch wrote: > > > Sounds good. I think the log message is the optimal place: > > > > Looks awesome. > > Is there anything still standing

Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead

2021-09-02 Thread Laurenz Albe
On Wed, 2021-09-01 at 10:56 +0200, Laurenz Albe wrote: > On Tue, 2021-08-31 at 21:16 -0700, Andres Freund wrote: > > On 2021-09-01 05:39:14 +0200, Laurenz Albe wrote: > > > On Tue, 2021-08-31 at 18:55 -0700, Andres Freund wrote: > > > > > > On Tue, Aug 31, 2021 at 04:55:35AM +0200, Laurenz Albe

Re: row filtering for logical replication

2021-09-02 Thread Peter Smith
On Wed, Sep 1, 2021 at 9:23 PM Euler Taveira wrote: > > On Sun, Aug 29, 2021, at 11:14 PM, Peter Smith wrote: ... > Peter, I'm still reviewing this new cache mechanism. I will provide a feedback > as soon as I integrate it as part of this recent modification. Hi Euler, for your next version can

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Kyotaro Horiguchi
At Fri, 3 Sep 2021 01:01:43 +1200, Thomas Munro wrote in > On Fri, Sep 3, 2021 at 12:44 AM Thomas Munro wrote: > > NtFileCreate() > > Erm, that's spelled NtCreateFile. I see Michael mentioned this > before[1]; I don't think it's only available in kernel mode though, > the docs[2] say "This

Re: Estimating HugePages Requirements?

2021-09-02 Thread Michael Paquier
On Thu, Sep 02, 2021 at 04:46:56PM +, Bossart, Nathan wrote: > Yeah, huge_pages_required might not serve much purpose for Windows. > We could always set it to -1 for Windows if it seems like it'll do > more harm than good. I'd be fine with this setup on environments where there is no need for

Re: [PATCH] test/ssl: rework the sslfiles Makefile target

2021-09-02 Thread Michael Paquier
On Thu, Sep 02, 2021 at 04:42:14PM +, Jacob Champion wrote: > Done that way in v5. It's a lot of moved code, so I've kept it as two > commits for review purposes. Nice. This is neat. The split helps a lot to understand how you've changed things from the original implementation. As a whole,

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Tom Lane
Phil Krylov writes: > IMHO pg_ctl should not blindly truncate generated command lines at > MAXPGPATH (1024 characters) and then run that, resulting in: Fair enough. > The attached patch tries to fix it in the least intrusive way. Seems reasonable. We didn't have psprintf when this code was

Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0

2021-09-02 Thread Tom Lane
Mario Emmenlauer writes: > The idea to switch to dup(2) sounds very good to me. I poked at this some more, and verified that adding "fclose(stdin);" at the head of PostmasterMain is enough to trigger the reported failure. However, after changing fd.c to dup stderr not stdin, we can pass

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Phil Krylov
On 2021-09-03 00:36, Ranier Vilela wrote: The msvc docs says that limit for the command line is 32,767 characters, while ok for me, I think if not it would be better to check this limit? Well, it's ARG_MAX in POSIX, and ARG_MAX is defined as 256K in Darwin, 512K in FreeBSD, 128K in Linux;

Re: prevent immature WAL streaming

2021-09-02 Thread Alvaro Herrera
On 2021-Sep-02, Kyotaro Horiguchi wrote: > So, this is a crude PoC of that. I had ended up with something very similar, except I was trying to cram the flag via the checkpoint record instead of hacking AdvanceXLInsertBuffer(). I removed that stuff and merged both, here's the result. > 1. This

Re: [PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Ranier Vilela
Em qui., 2 de set. de 2021 às 18:36, Phil Krylov escreveu: > Hello, > > Lacking a tool to edit postgresql.conf programmatically, people resort > to passing cluster options on the command line. While passing all > non-default options in this way may sound like an abuse of the feature, > IMHO

Re: Added schema level support for publication.

2021-09-02 Thread Peter Smith
On Thu, Sep 2, 2021 at 6:50 PM houzj.f...@fujitsu.com wrote: > > From Wed, Sep 1, 2021 2:36 PM Peter Smith wrote: > > Schema objects are not part of the publication. Current only TABLES are in > > publications, so I thought that \dRp+ output would just be the of "Tables" > > in > > the

Re: Read-only vs read only vs readonly

2021-09-02 Thread Bossart, Nathan
On 9/2/21, 11:30 AM, "Magnus Hagander" wrote: > I had a customer point out to me that we're inconsistent in how we > spell read-only. Turns out we're not as inconsistent as I initially > thought :), but that they did manage to spot the one actual log > message we have that writes it differently

Re: .ready and .done files considered harmful

2021-09-02 Thread Bossart, Nathan
On 9/2/21, 6:22 AM, "Dipesh Pandit" wrote: > I agree that multiple-files-pre-readdir is cleaner and has the resilience of > the > current implementation. However, I have a few suggestion on keep-trying-the > -next-file approach patch shared in previous thread. Which approach do you think we

[PATCH] pg_ctl should not truncate command lines at 1024 characters

2021-09-02 Thread Phil Krylov
Hello, Lacking a tool to edit postgresql.conf programmatically, people resort to passing cluster options on the command line. While passing all non-default options in this way may sound like an abuse of the feature, IMHO pg_ctl should not blindly truncate generated command lines at MAXPGPATH

Re: a misbehavior of partition row movement (?)

2021-09-02 Thread Andrew Dunstan
On 7/13/21 8:09 AM, Amit Langote wrote: > > > > @Amit patch is not successfully applying, can you please rebase that.  > > > Thanks for the reminder. > > Masahiko Sawada, it's been a bit long since you reviewed the > patch, are you still interested to review that?  > > >

Re: [PATCH] Partial foreign key updates in referential integrity triggers

2021-09-02 Thread Zhihong Yu
On Thu, Sep 2, 2021 at 12:11 PM Paul Martinez wrote: > On Wed, Sep 1, 2021 at 4:11 AM Daniel Gustafsson wrote: > > > This patch no longer applies, can you please submit a rebased version? > It > > currently fails on catversion.h, to keep that from happening repeatedly > you can > > IMO skip

Re: Skipping logical replication transactions on subscriber side

2021-09-02 Thread Mark Dilger
> On Aug 30, 2021, at 12:06 AM, Masahiko Sawada wrote: > > I've attached rebased patches. Here are some review comments: For the v12-0002 patch: The documentation changes for ALTER SUBSCRIPTION .. RESET look strange to me. You grouped SET and RESET together, much like

Re: Skipping logical replication transactions on subscriber side

2021-09-02 Thread Mark Dilger
> On Aug 30, 2021, at 12:06 AM, Masahiko Sawada wrote: > > I've attached rebased patches. Thanks for these patches, Sawada-san! The first patch in your series, v12-0001, seems useful to me even before committing any of the rest. I would like to integrate the new

Re: [PATCH] Partial foreign key updates in referential integrity triggers

2021-09-02 Thread Paul Martinez
On Wed, Sep 1, 2021 at 4:11 AM Daniel Gustafsson wrote: > This patch no longer applies, can you please submit a rebased version? It > currently fails on catversion.h, to keep that from happening repeatedly you > can > IMO skip that from the patch submission. Ah, understood. Will do that in

Re: automatically generating node support functions

2021-09-02 Thread Jacob Champion
On Tue, 2021-08-17 at 16:36 +0200, Peter Eisentraut wrote: > Here is another set of preparatory patches that clean up various special > cases and similar in the node support. > > 0001-Remove-T_Expr.patch > > Removes unneeded T_Expr. > > 0002-Add-COPY_ARRAY_FIELD-and-COMPARE_ARRAY_FIELD.patch >

Read-only vs read only vs readonly

2021-09-02 Thread Magnus Hagander
I had a customer point out to me that we're inconsistent in how we spell read-only. Turns out we're not as inconsistent as I initially thought :), but that they did manage to spot the one actual log message we have that writes it differently than everything else -- but that broke their grepping...

Re: Is it safe to use the extended protocol with COPY?

2021-09-02 Thread Robert Haas
On Wed, Sep 1, 2021 at 2:43 PM Tom Lane wrote: > Daniele Varrazzo writes: > > Someone [1] has pointed out this conversation [2] which suggests that > > COPY with extended protocol might break in the future. > > As was pointed out in that same thread, the odds of us actually > breaking that case

Re: [PATCH] support tab-completion for single quote input with equal sign

2021-09-02 Thread Jacob Champion
On Fri, 2021-07-23 at 05:34 +, tanghy.f...@fujitsu.com wrote: > On Thursday, July 22, 2021 1:05 PM, tanghy.f...@fujitsu.com > wrote > > I found a problem when using tab-completion as follows: > > > > CREATE SUBSCRIPTION my_subscription > > CONNECTION 'host=localhost port=5432

Re: Possible missing segments in archiving on standby

2021-09-02 Thread Fujii Masao
On 2021/09/02 10:16, Kyotaro Horiguchi wrote: Ok, I agree that the reader-side needs an amendment. Thanks for the review! Attached is the updated version of the patch. Based on my latest patch, I changed the startup process so that it creates an archive notification file of the streamed WAL

Re: Estimating HugePages Requirements?

2021-09-02 Thread Bossart, Nathan
On 9/2/21, 12:54 AM, "Michael Paquier" wrote: > Thanks. Anyway, we don't really need huge_pages_required on Windows, > do we? The following docs of Windows tell what do to when using large > pages: > https://docs.microsoft.com/en-us/windows/win32/memory/large-page-support > > The backend code

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-02 Thread Robert Haas
On Tue, Aug 31, 2021 at 8:16 AM Amul Sul wrote: > Attached is the rebased version for the latest master head. Also, > added tap tests to test some part of this feature and a separate patch > to test recovery_end_command execution. It looks like you haven't given any thought to writing that in a

Re: improve pg_receivewal code

2021-09-02 Thread Ronan Dunklau
Le lundi 30 août 2021, 09:32:05 CEST Bharath Rupireddy a écrit : > Hi, > > I see there's a scope to do following improvements to pg_receivewal.c: Thank you Bharath for this patch. > > 1) Fetch the server system identifier in the first RunIdentifySystem > call and use it to identify(via

Re: using an end-of-recovery record in all cases

2021-09-02 Thread Robert Haas
On Mon, Aug 9, 2021 at 3:00 PM Robert Haas wrote: > I decided to try writing a patch to use an end-of-recovery record > rather than a checkpoint record in all cases. > > The first problem I hit was that GetRunningTransactionData() does >

Re: replay of CREATE TABLESPACE eats data at wal_level=minimal

2021-09-02 Thread Robert Haas
On Wed, Aug 25, 2021 at 8:03 AM Robert Haas wrote: > On Wed, Aug 25, 2021 at 1:21 AM Noah Misch wrote: > > Sounds good. I think the log message is the optimal place: > > Looks awesome. Is there anything still standing in the way of committing this? -- Robert Haas EDB:

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-09-02 Thread Robert Haas
On Thu, Sep 2, 2021 at 2:06 AM Dilip Kumar wrote: > 0003- The main patch for WAL logging the created database operation. Andres pointed out that this approach ends up accessing relations without taking a lock on them. It doesn't look like you did anything about that. + /* Built-in oids are

Re: shared-memory based stats collector

2021-09-02 Thread Jaime Casanova
On Mon, Jul 26, 2021 at 06:27:54PM -0700, Andres Freund wrote: > Hi, > > On 2021-07-26 17:52:01 +0900, Kyotaro Horiguchi wrote: > > > > Yeah, thank you very much for checking that. However, this patch is > > > > now developed in Andres' GitHub repository. So I'm at a loss what to > > > > do for

Re: mark the timestamptz variant of date_bin() as stable

2021-09-02 Thread John Naylor
On Wed, Sep 1, 2021 at 3:25 PM Tom Lane wrote: > > John Naylor writes: > > On Wed, Sep 1, 2021 at 2:44 PM Tom Lane wrote: > >> I see that these two answers are both exactly multiples of 24 hours away > >> from the given origin. But if I'm binning on the basis of "days" or > >> larger units, I

Re: .ready and .done files considered harmful

2021-09-02 Thread Dipesh Pandit
Hi, Thanks for the feedback. > I attached two patches that demonstrate what I'm thinking this change > should look like. One is my take on the keep-trying-the-next-file > approach, and the other is a new version of the multiple-files-per- > readdir approach (with handling for "cheating" archive

Re: Fix pkg-config file for static linking

2021-09-02 Thread Filip Gospodinov
On 02.09.21 13:07, Peter Eisentraut wrote: On 20.07.21 22:04, Filip Gospodinov wrote: Anyway, this issue is orthogonal to my original patch. I'm proposing to hardcode -lpgcommon and -lpgport in Libs.private instead. Patch is attached. Makes sense.  I think we could do it without hardcoding

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Thomas Munro
On Fri, Sep 3, 2021 at 12:44 AM Thomas Munro wrote: > NtFileCreate() Erm, that's spelled NtCreateFile. I see Michael mentioned this before[1]; I don't think it's only available in kernel mode though, the docs[2] say "This function is the user-mode equivalent to the ZwCreateFile function", and

Re: corruption of WAL page header is never reported

2021-09-02 Thread Fujii Masao
On 2021/09/02 16:26, Kyotaro Horiguchi wrote: I believe errmsg_buf is an interface to emit error messages dedicated to xlogreader that doesn't have an access to elog facility, and xlogreader doesn't (or ought not to or expect to) suppose non-xlogreader callback functions set the variable. In

Re: Fix typo in comments

2021-09-02 Thread Fujii Masao
On 2021/09/02 20:54, houzj.f...@fujitsu.com wrote: Hi, When reviewing other patches, I noticed two typos: Thanks! Both fixes look good to me. Barring any objection, I will commit the patch. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Thomas Munro
On Thu, Sep 2, 2021 at 11:12 PM Tom Lane wrote: > Thomas Munro writes: > > I'm no expert, but not AFAICS. We managed to delete the file while > > some other backend had it open, which FILE_SHARE_DELETE allowed. We > > just can't open it or create a new file with the same name until it's > >

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

2021-09-02 Thread Fujii Masao
On 2021/09/02 18:27, kuroda.hay...@fujitsu.com wrote: I added the following comments: ```diff - /* Use "postgres_fdw" as fallback_application_name. */ + /* +* Use pgfdw_application_name as application_name. +* +*

Re: Skipping logical replication transactions on subscriber side

2021-09-02 Thread Greg Nancarrow
On Mon, Aug 30, 2021 at 5:07 PM Masahiko Sawada wrote: > > I've attached rebased patches. 0004 patch is not the scope of this > patch. It's borrowed from another thread[1] to fix the assertion > failure for newly added tests. Please review them. > Some initial comments for the v12-0003 patch:

Fix typo in comments

2021-09-02 Thread houzj.f...@fujitsu.com
Hi, When reviewing other patches, I noticed two typos: 1. src/backend/parser/gram.y ALTER TABLE ALTER [COLUMN] RESET ( column_parameter = value [, ... ] ) RESET cannot specify value. 2. src/backend/utils/adt/xid8funcs.c * Same as pg_current_xact_if_assigned() but doesn't assign a new xid if

Re: Postgres Win32 build broken?

2021-09-02 Thread Andrew Dunstan
On 9/1/21 8:01 PM, Ranier Vilela wrote: > Em qua., 1 de set. de 2021 às 19:49, Andrew Dunstan > mailto:and...@dunslane.net>> escreveu: > > > On 9/1/21 4:00 PM, Andrew Dunstan wrote: > > On 8/31/21 9:52 PM, Michael Paquier wrote: > >> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier

Re: Added schema level support for publication.

2021-09-02 Thread Amit Kapila
On Thu, Sep 2, 2021 at 11:58 AM vignesh C wrote: > Below are few comments on v23. If you have already addressed anything in v24, then ignore it. 1. The commit message says: A new system table "pg_publication_schema" has been added, to maintain the schemas that the user wants to publish through

RE: Skipping logical replication transactions on subscriber side

2021-09-02 Thread houzj.f...@fujitsu.com
From Mon, Aug 30, 2021 3:07 PM Masahiko Sawada wrote: > I've attached rebased patches. 0004 patch is not the scope of this > patch. It's borrowed from another thread[1] to fix the assertion > failure for newly added tests. Please review them. Hi, I reviewed the 0002 patch and have a

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

2021-09-02 Thread Ajin Cherian
On Wed, Aug 11, 2021 at 10:45 PM Dilip Kumar wrote: > > Yeah we can avoid that by detecting any toasted replica identity key > in HeapDetermineModifiedColumns, check the attached patch. > The patch applies cleanly, all tests pass, I tried out a few toast combination tests and they seem to be

Re: pg_receivewal: remove extra conn = NULL; in StreamLog

2021-09-02 Thread Daniel Gustafsson
> On 1 Sep 2021, at 10:58, Bharath Rupireddy > wrote: > > On Sun, Aug 29, 2021 at 1:27 AM Daniel Gustafsson wrote: >> >>> On 28 Aug 2021, at 14:10, Bharath Rupireddy >>> wrote: >> >>> It seems there's a redundant assignment statement conn = NULL in >>> pg_receivewal's StreamLog function.

Re: Online verification of checksums

2021-09-02 Thread Daniel Gustafsson
> On 9 Jul 2021, at 22:00, Ibrar Ahmed wrote: > I am changing the status to "Waiting on Author" based on the latest comments > of @David Steele > and secondly the patch does not apply cleanly. This patch hasn’t moved since marked as WoA in the last CF and still doesn’t apply, unless there is

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Tom Lane
Thomas Munro writes: > On Thu, Sep 2, 2021 at 10:31 PM Tom Lane wrote: >> That seems quite horrid :-(. But if it works, doesn't that mean that >> somewhere we are opening a problematic file without the correct >> sharing flags? > I'm no expert, but not AFAICS. We managed to delete the file

Re: [PATCH] test/ssl: rework the sslfiles Makefile target

2021-09-02 Thread Andrew Dunstan
On 9/1/21 8:09 PM, Jacob Champion wrote: > On Fri, 2021-08-27 at 15:02 +0900, Michael Paquier wrote: >> On Fri, Aug 13, 2021 at 12:08:16AM +, Jacob Champion wrote: >>> If _that's_ the case, then our build system is holding all of us >>> hostage. Which is frustrating to me. Should I shift

Re: Fix pkg-config file for static linking

2021-09-02 Thread Peter Eisentraut
On 20.07.21 22:04, Filip Gospodinov wrote: Anyway, this issue is orthogonal to my original patch. I'm proposing to hardcode -lpgcommon and -lpgport in Libs.private instead. Patch is attached. Makes sense. I think we could do it without hardcoding those library names, as in the attached

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Thomas Munro
On Thu, Sep 2, 2021 at 10:31 PM Tom Lane wrote: > Thomas Munro writes: > > A disruptive solution that works in my tests: we could reuse the > > global barrier proposed in CF #2962. If you see EACCES, ask every > > backend to close all vfds at their next CFI() and wait for them all to > >

Re: public schema default ACL

2021-09-02 Thread Peter Eisentraut
On 30.06.21 03:37, Noah Misch wrote: On Sat, Mar 27, 2021 at 11:41:07AM +0100, Laurenz Albe wrote: On Sat, 2021-03-27 at 00:50 -0700, Noah Misch wrote: On Sat, Feb 13, 2021 at 04:56:29AM -0800, Noah Misch wrote: I'm attaching the patch for $SUBJECT, which applies atop the four patches from

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Tom Lane
Thomas Munro writes: > A disruptive solution that works in my tests: we could reuse the > global barrier proposed in CF #2962. If you see EACCES, ask every > backend to close all vfds at their next CFI() and wait for them all to > finish, and then retry. If you get EACCES again it really means

Re: stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-02 Thread Thomas Munro
On Thu, Sep 2, 2021 at 10:10 AM Thomas Munro wrote: > Perhaps we need some combination of the old way (that apparently knew > how to detect pending deletes) and the new way (that knows about large > files)? I tried that, but as far as I can tell, the old approach didn't really work either :-( A

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

2021-09-02 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, Thank you for reviewing! > This GUC parameter should be set after the options of foreign server > are set so that its setting can override the server-level ones. > Isn't it better to comment this? I added the following comments: ```diff - /* Use "postgres_fdw" as

Re: Column Filtering in Logical Replication

2021-09-02 Thread Alvaro Herrera
I think the WITH RECURSIVE query would be easier and more performant by using pg_partition_tree and pg_partition_root. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "Porque Kim no hacía nada, pero, eso sí, con extraordinario éxito" ("Kim", Kipling)

RE: Added schema level support for publication.

2021-09-02 Thread houzj.f...@fujitsu.com
From Wed, Sep 1, 2021 2:36 PM Peter Smith wrote: > Schema objects are not part of the publication. Current only TABLES are in > publications, so I thought that \dRp+ output would just be the of "Tables" in > the publication. Schemas would not even be displayed at all (except in the > table name).

Re: Column Filtering in Logical Replication

2021-09-02 Thread Alvaro Herrera
On 2021-Sep-02, Rahila Syed wrote: > After thinking about this, I think it is best to remove the entire table > from publication, > if a column specified in the column filter is dropped from the table. Hmm, I think it would be cleanest to give responsibility to the user: if the column to be

RE: Skipping logical replication transactions on subscriber side

2021-09-02 Thread houzj.f...@fujitsu.com
From Mon, Aug 30, 2021 3:07 PM Masahiko Sawada wrote: > I've attached rebased patches. 0004 patch is not the scope of this patch. It's > borrowed from another thread[1] to fix the assertion failure for newly added > tests. Please review them. Hi, I reviewed the v12-0001 patch, here are some

Re: pg_receivewal starting position

2021-09-02 Thread Michael Paquier
On Thu, Sep 02, 2021 at 10:08:26AM +0200, Ronan Dunklau wrote: > I could see the use for sending active_pid for use within pg_basebackup: at > least we could fail early if the slot is already in use. But at the same > time, > maybe it won't be in use anymore once we need it. There is no real

Re: pg_receivewal starting position

2021-09-02 Thread Ronan Dunklau
Le jeudi 2 septembre 2021, 09:28:29 CEST Michael Paquier a écrit : > On Thu, Sep 02, 2021 at 02:45:54PM +0900, Kyotaro Horiguchi wrote: > > At Wed, 1 Sep 2021 10:30:05 +0530, Bharath Rupireddy > > wrote in If I read the patch > > correctly the situation above is warned by the following message

Re: Column Filtering in Logical Replication

2021-09-02 Thread Peter Smith
On Thu, Sep 2, 2021 at 7:21 AM Rahila Syed wrote: > ... > > Also added some more tests. Please find attached a rebased and updated patch. I fetched and applied the v4 patch. It applied cleanly, and the build and make check was OK. But I encountered some errors running the TAP subscription

Re: Estimating HugePages Requirements?

2021-09-02 Thread Michael Paquier
On Wed, Sep 01, 2021 at 06:28:21PM +, Bossart, Nathan wrote: > On 8/31/21, 11:54 PM, "Michael Paquier" wrote: >> Hmm. I am not sure about the addition of huge_pages_required, knowing >> that we would have shared_memory_size. I'd rather let the calculation >> part to the user with a scan of

Re: pg_receivewal starting position

2021-09-02 Thread Michael Paquier
On Thu, Sep 02, 2021 at 02:45:54PM +0900, Kyotaro Horiguchi wrote: > At Wed, 1 Sep 2021 10:30:05 +0530, Bharath Rupireddy > wrote in > If I read the patch correctly the situation above is warned by the > following message then continue to the next step giving up to identify > start position

Re: corruption of WAL page header is never reported

2021-09-02 Thread Kyotaro Horiguchi
At Thu, 2 Sep 2021 14:44:31 +0900, Fujii Masao wrote in > > > On 2021/09/02 13:17, Kyotaro Horiguchi wrote: > > Did you read the comment just above? > > Yes! Glad to hear that, or..:p > > xlog.c:12523 > >> * Check the page header immediately, so that we can retry immediately > >> if >

Re: pg_receivewal starting position

2021-09-02 Thread Ronan Dunklau
Le jeudi 2 septembre 2021, 08:42:22 CEST Bharath Rupireddy a écrit : > On Thu, Sep 2, 2021 at 11:15 AM Kyotaro Horiguchi > > wrote: > > At Wed, 1 Sep 2021 10:30:05 +0530, Bharath Rupireddy > > wrote in> > > > On Mon, Aug 30, 2021 at 3:26 PM Ronan Dunklau wrote: > > > > > 7) How about we let

Re: pg_receivewal starting position

2021-09-02 Thread Bharath Rupireddy
On Thu, Sep 2, 2021 at 11:15 AM Kyotaro Horiguchi wrote: > > At Wed, 1 Sep 2021 10:30:05 +0530, Bharath Rupireddy > wrote in > > On Mon, Aug 30, 2021 at 3:26 PM Ronan Dunklau > > wrote: > > > > 7) How about we let pg_receivewal use READ_REPLICATION_SLOT as an > > > > option? > > > > > > From

Re: Added schema level support for publication.

2021-09-02 Thread vignesh C
On Wed, Sep 1, 2021 at 11:14 AM tanghy.f...@fujitsu.com wrote: > > > On Monday, August 30, 2021 11:28 PM vignesh C wrote: > > > > I have fixed these comments as part of v23 patch attached at [1]. > > [1] - https://www.postgresql.org/message- > >

Re: Added schema level support for publication.

2021-09-02 Thread vignesh C
On Wed, Sep 1, 2021 at 6:58 AM houzj.f...@fujitsu.com wrote: > > Here are some other comments for v23-000x patches. > > 1) > > @@ -6225,6 +6342,9 @@ describePublications(const char *pattern) > boolhas_pubtruncate; > boolhas_pubviaroot; > > +

Re: Added schema level support for publication.

2021-09-02 Thread vignesh C
On Sat, Aug 28, 2021 at 3:19 PM Amit Kapila wrote: > > Don't you think some users might want to know all the schema names for > a publication? I am not completely sure on this point but I think it > is good to have information for users. It might be also useful to have > pg_publication_objects

Re: Numeric x^y for negative x

2021-09-02 Thread Dean Rasheed
On Thu, 2 Sept 2021 at 00:39, Jaime Casanova wrote: > > Hi Dean, > > It seems you already committed this. But it's still as "Ready for > committer" in the commitfest app. > > Are we waiting for something else or we can mark it as committed? > It's mostly done, but there is one more corner case

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-09-02 Thread Dilip Kumar
On Tue, Jul 6, 2021 at 3:00 PM Dilip Kumar wrote: > > On Fri, Jun 18, 2021 at 12:50 AM Robert Haas wrote: > > > > On Thu, Jun 17, 2021 at 2:48 PM Andres Freund wrote: > > > Or do you mean that looking at the filesystem at all is bypassing shared > > > buffers? > > > > This is what I mean. I