Re: Partial aggregates pushdown

2021-10-18 Thread Alexander Pyhalov
Hi. Tomas Vondra писал 2021-10-15 17:56: As for the proposed approach, it's probably good enough for the first version to restrict this to aggregates where the aggregate result is sufficient, i.e. we don't need any new export/import procedures. But it's very unlikely we'd want to restrict it th

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-18 Thread Matthijs van der Vleuten
On Mon, Oct 18, 2021, at 09:46, Michael Paquier wrote: > On Thu, Oct 14, 2021 at 11:07:21AM +0900, Michael Paquier wrote: > Attached is the patch I am finishing with, that should go down to > v13 (this is going to conflict on REL_13_STABLE, for sure). > > Thoughts? The test case doesn't seem entir

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

2021-10-18 Thread Kyotaro Horiguchi
At Tue, 19 Oct 2021 02:45:24 +, "osumi.takami...@fujitsu.com" wrote in > On Thursday, October 14, 2021 11:21 AM Kyotaro Horiguchi > wrote: > > It adds a call to ReorderBufferAssignChild but usually subtransactions are > > assigned to top level elsewherae. Addition to that > > ReorderBuffe

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-18 Thread Bharath Rupireddy
On Tue, Oct 19, 2021 at 6:16 AM Michael Paquier wrote: > > On Mon, Oct 18, 2021 at 09:56:41AM -0400, Andrew Dunstan wrote: > > Well, see > > > > > > Maybe we should move that section. > > As this is the part of the d

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-18 Thread Bharath Rupireddy
On Mon, Oct 18, 2021 at 6:19 PM Andrew Dunstan wrote: > > Thanks for your opinion. IIUC, the subscription tests can be run with > > setting environment variables PROVE_FLAGS, PROVE_TESTS and the > > "vcregress taptest" command right? I failed to set the environment > > variables appropriately and

RE: Added schema level support for publication.

2021-10-18 Thread tanghy.f...@fujitsu.com
On Tuesday, October 19, 2021 12:57 PM Amit Kapila wrote: > > On Tue, Oct 19, 2021 at 9:15 AM tanghy.f...@fujitsu.com > wrote: > > > > On Monday, October 18, 2021 8:23 PM vignesh C > wrote: > > > > > > Thanks for the comments, the attached v42 patch has the fixes for the > > > same. > > > > Th

Re: Skipping logical replication transactions on subscriber side

2021-10-18 Thread Masahiko Sawada
On Tue, Oct 19, 2021 at 12:38 PM Amit Kapila wrote: > > On Tue, Oct 19, 2021 at 8:23 AM Masahiko Sawada wrote: > > > > On Mon, Oct 18, 2021 at 6:07 PM Amit Kapila wrote: > > > > > > On Mon, Oct 11, 2021 at 1:00 PM Masahiko Sawada > > > wrote: > > > > > > > > On Sun, Oct 10, 2021 at 11:04 PM Pe

Re: Reset snapshot export state on the transaction abort

2021-10-18 Thread Dilip Kumar
On Mon, Oct 18, 2021 at 8:51 AM Michael Paquier wrote: > > On Sun, Oct 17, 2021 at 09:33:48AM +0900, Michael Paquier wrote: > > That seems logically fine. I'll check that tomorrow. > > And that looks indeed fine. I have adjusted a couple of things, and > backpatched the fix. Thanks! -- Regar

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

2021-10-18 Thread Dilip Kumar
On Tue, Oct 19, 2021 at 8:17 AM houzj.f...@fujitsu.com wrote: > Thanks for the explanation. > > I think one reason that I consider this behavior a bug is that: If we add > both the root partitioned table and the leaf partition explicitly to the > publication (and set publish_via_partition_root =

Fixing build of MSVC with OpenSSL 3.0.0

2021-10-18 Thread Michael Paquier
Hi all, $subject has been noticed on github here: https://github.com/postgres/postgres/pull/70/commits Looking at the MSIs of OpenSSL for Win64 and Win32, there are no changes in the deliverable names or paths, meaning that something as simple as the attached patch is enough to make the build pas

Re: Added schema level support for publication.

2021-10-18 Thread Amit Kapila
On Tue, Oct 19, 2021 at 9:15 AM tanghy.f...@fujitsu.com wrote: > > On Monday, October 18, 2021 8:23 PM vignesh C wrote: > > > > Thanks for the comments, the attached v42 patch has the fixes for the same. > > Thanks for your new patch. > > I tried your patch and found that the permission check for

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

2021-10-18 Thread Amit Kapila
On Tue, Oct 19, 2021 at 8:45 AM Amit Kapila wrote: > > On Mon, Oct 18, 2021 at 2:58 PM Amit Kapila wrote: > > > > On Mon, Oct 18, 2021 at 2:32 PM Amit Langote > > wrote: > > > > > > Looking at this command in Hou-san's email: > > > > > > create publication pub for table tbl1, tbl1_part1 with

Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

2021-10-18 Thread Michael Paquier
On Mon, Oct 18, 2021 at 07:23:50PM -0300, Alvaro Herrera wrote: > I think modifying $HOME is a strange way to customize things, but given > how widespread it is [claimed to be] today, it seems reasonable to do > things that way. I am not sure about this claim, but it seems to me that we could get

RE: Added schema level support for publication.

2021-10-18 Thread tanghy.f...@fujitsu.com
On Monday, October 18, 2021 8:23 PM vignesh C wrote: > > Thanks for the comments, the attached v42 patch has the fixes for the same. Thanks for your new patch. I tried your patch and found that the permission check for superuser didn't work. For example: postgres=# create role r1; CREATE ROLE

Re: Skipping logical replication transactions on subscriber side

2021-10-18 Thread Amit Kapila
On Tue, Oct 19, 2021 at 8:23 AM Masahiko Sawada wrote: > > On Mon, Oct 18, 2021 at 6:07 PM Amit Kapila wrote: > > > > On Mon, Oct 11, 2021 at 1:00 PM Masahiko Sawada > > wrote: > > > > > > On Sun, Oct 10, 2021 at 11:04 PM Peter Eisentraut > > > wrote: > > > > > > > > On 04.10.21 02:31, Masahik

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

2021-10-18 Thread Amit Kapila
On Mon, Oct 18, 2021 at 2:58 PM Amit Kapila wrote: > > On Mon, Oct 18, 2021 at 2:32 PM Amit Langote wrote: > > > > Looking at this command in Hou-san's email: > > > > create publication pub for table tbl1, tbl1_part1 with > > (publish_via_partition_root=on); > > > > It's adding both the root pa

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-18 Thread Bossart, Nathan
On 10/18/21, 7:09 PM, "Michael Paquier" wrote: > Thanks for double-checking. Applied and back-patched, with a small > conflict regarding the error message in ~14. Thanks! Nathan

Re: Skipping logical replication transactions on subscriber side

2021-10-18 Thread Masahiko Sawada
On Mon, Oct 18, 2021 at 6:07 PM Amit Kapila wrote: > > On Mon, Oct 11, 2021 at 1:00 PM Masahiko Sawada wrote: > > > > On Sun, Oct 10, 2021 at 11:04 PM Peter Eisentraut > > wrote: > > > > > > On 04.10.21 02:31, Masahiko Sawada wrote: > > > > I guess disabling subscriptions on error/conflict and s

RE: Failed transaction statistics to measure the logical replication progress

2021-10-18 Thread osumi.takami...@fujitsu.com
On Monday, October 18, 2021 11:52 AM Hou, Zhijie/侯 志杰 wrote: > On Thursday, October 14, 2021 2:13 PM Osumi, Takamichi wrote: > > On Thursday, October 14, 2021 12:54 PM Hou, > Zhijie wrote: > > > On Thursday, September 30, 2021 12:15 PM Amit Kapila > > > > On Thu, Sep 30, 2021 at 8:22 AM Hou, Zhij

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

2021-10-18 Thread houzj.f...@fujitsu.com
On Monday, October 18, 2021 5:03 PM Amit Langote wrote: > I can imagine that the behavior seen here may look surprising, but not > sure if I would call it a bug as such. I do remember thinking about > this case and the current behavior is how I may have coded it to be. > > Looking at this comma

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

2021-10-18 Thread osumi.takami...@fujitsu.com
On Thursday, October 14, 2021 11:21 AM Kyotaro Horiguchi wrote: > At Mon, 11 Oct 2021 15:27:41 +0900, Masahiko Sawada > wrote in > > > > On Fri, Oct 8, 2021 at 4:50 PM Kyotaro Horiguchi > > wrote: > > > I came up with the third way. SnapBuildCommitTxn already properly > > > handles the case wh

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-18 Thread Michael Paquier
On Mon, Oct 18, 2021 at 09:43:58PM +, Bossart, Nathan wrote: > +DROP INDEX btree_tall_tbl_idx2; > +ERROR: index "btree_tall_tbl_idx2" does not exist > > I think this is supposed to be "btree_tall_idx2". Otherwise, the > patch looks reasonable to me. Thanks for double-checking. Applied and

RE: Failed transaction statistics to measure the logical replication progress

2021-10-18 Thread houzj.f...@fujitsu.com
On Monday, October 18, 2021 6:04 PM Amit Kapila wrote: > On Thu, Oct 14, 2021 at 9:23 AM houzj.f...@fujitsu.com > wrote: > > > > On Thursday, September 30, 2021 12:15 PM Amit Kapila > > > > > > > > These all views are related to untransmitted to the collector but > > > what we really need is a v

Re: Partition Check not updated when insert into a partition

2021-10-18 Thread Amit Langote
On Tue, Oct 19, 2021 at 7:14 AM Alvaro Herrera wrote: > Pushed now to all branches. Thanks much! Thanks Álavro. -- Amit Langote EDB: http://www.enterprisedb.com

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-18 Thread Michael Paquier
On Mon, Oct 18, 2021 at 09:56:41AM -0400, Andrew Dunstan wrote: > Well, see > > > Maybe we should move that section. As this is the part of the docs where we document the builds, it looks indeed a bit confusing to h

Re: ALTER INDEX .. RENAME allows to rename tables/views as well

2021-10-18 Thread Bossart, Nathan
On 10/18/21, 4:56 PM, "Alvaro Herrera" wrote: > Now, what is the worst that can happen if we rename a table under SUE > and somebody else is using the table concurrently? Is there any way to > cause a backend crash or something like that? As far as I can see, > because we grab a fresh catalog sn

Re: XTS cipher mode for cluster file encryption

2021-10-18 Thread Tomas Vondra
On 10/18/21 17:56, Stephen Frost wrote: >> ... I've argued for storing the nonce, but I don't quite see why would we need integrity guarantees? AFAICS the threat model the patch aims to address is an attacker who can observe the data (e.g. a low-privileged OS user), but can't modify the files. W

Re: ALTER INDEX .. RENAME allows to rename tables/views as well

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-07, Bossart, Nathan wrote: > Good idea. Patch attached. Yeah, that sounds exactly what I was thinking. Now, what is the worst that can happen if we rename a table under SUE and somebody else is using the table concurrently? Is there any way to cause a backend crash or something lik

Re: XTS cipher mode for cluster file encryption

2021-10-18 Thread Tomas Vondra
On 10/18/21 17:56, Stephen Frost wrote: Greetings, * Tomas Vondra (tomas.von...@enterprisedb.com) wrote: On 10/15/21 21:22, Stephen Frost wrote: Now, to address the concern around re-encrypting a block with the same key+IV but different data and leaking what parts of the page changed, I do

Re: relation OID in ReorderBufferToastReplace error message

2021-10-18 Thread Bossart, Nathan
On 10/18/21, 3:31 AM, "Amit Kapila" wrote: > I can take care of backpatching this in the next few days unless there > is any objection. Thanks! Nathan

Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-14, Anders Kaseorg wrote: > This is important for systems where many users share the same UID, and > for test systems that change HOME to avoid interference with the > user’s real home directory. It matches what most applications do, as > well as what glibc does for glob("~", GLOB_TIL

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-18 Thread Robert Haas
On Mon, Oct 18, 2021 at 9:54 AM Amul Sul wrote: > I tried this in the attached version, but I'm a bit skeptical with > changes that are needed for CreateCheckPoint(), those don't seem to be > clean. Yeah, that doesn't look great. I don't think it's entirely correct, actually, because surely you w

Re: Partition Check not updated when insert into a partition

2021-10-18 Thread Alvaro Herrera
Pushed now to all branches. Thanks much! -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "The important things in the world are problems with society that we don't understand at all. The machines will become more complicated but they won't be more complicated tha

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-18 Thread Bossart, Nathan
On 10/18/21, 12:47 AM, "Michael Paquier" wrote: > I have reviewed the last patch posted upthread, and while testing > partitioned indexes I have noticed that we don't need to do a custom > check as part of ATExecSetOptions(), because we have already that in > ATSimplePermissions() with details on

Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-18, Gilles Darold wrote: > Le 18/10/2021 à 18:54, Alvaro Herrera a écrit : > > I suggest to look for output test files that are being massively > > modified by this patch. I think those are likely unintended: > > > >> diff --git a/src/test/regress/expected/collate.icu.utf8.out > >> b

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2021-10-18 Thread Anton A. Melnikov
On 07.10.2021 15:31, Andrei Zubkov wrote: > There is an issue with this patch. It's main purpose is the ability to > calculate values of pg_stat_statements view >  [...] > Does addition of resettable min/max metrics to the > pg_stat_statemets view seems reasonable here? Hello, Andrey! I think it

Re: XTS cipher mode for cluster file encryption

2021-10-18 Thread Tomas Vondra
On 10/18/21 04:19, Sasasu wrote: Just a mention. the HMAC (or AE/AD) can be disabled in AES-GCM. HMAC in AES-GCM is an encrypt-then-hash MAC. CRC-32 is not a crypto-safe hash (technically CRC-32 is not a hash function). Cryptographers may unhappy with CRC-32. True. If you can flip enoug

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-18 Thread Andrew Dunstan
On 10/15/21 10:46 AM, Andrew Dunstan wrote: > On 10/14/21 5:52 PM, Tom Lane wrote: >> Andrew Dunstan writes: >>> Yes, that's been puzzling me too. I've just been staring at it again and >>> nothing jumps out. But maybe we can investigate that offline if this >>> test is deemed not worth keeping.

Re: Partition Check not updated when insert into a partition

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-18, Alvaro Herrera wrote: > Thanks. I'm looking at it now. I notice that if I take out the code > fix and keep the tests, I only see the ATTACH side of the problem have a > failure; I expected to see a failure for DETACH too. Ah, no, the test covers both cases; it's just that if it

Re: Partition Check not updated when insert into a partition

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-18, Pavel Borisov wrote: > > Yeah, maybe the link is unnecessary in the test comment, so removed. > > Though, I do occasionally see one of those in the test files (try `git > > grep https src/test`). Yeah, for example the test stanza just above says "test case for but 16242". Sadly t

Re: Partition Check not updated when insert into a partition

2021-10-18 Thread Pavel Borisov
> > Oops, you're right. I had failed to notice when reading the code that > the second transaction takes an AccessExclusiveLock on the target > partition. Reverted back to how this was in v3. > > > Also I'd recommend removing the link to a discussion from the test. > Anyway we have link in a comm

Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

2021-10-18 Thread Alvaro Herrera
I suggest to look for output test files that are being massively modified by this patch. I think those are likely unintended: > diff --git a/src/test/regress/expected/collate.icu.utf8.out > b/src/test/regress/expected/collate.icu.utf8.out > diff --git a/src/test/regress/expected/collate.linux.ut

Re: XTS cipher mode for cluster file encryption

2021-10-18 Thread Robert Haas
On Fri, Oct 15, 2021 at 5:21 PM Andres Freund wrote: > I don't find that line of argument *that* convincing. The reason XTS is the > de-facto standard is that for generic block layer encryption is that you can't > add additional data for each block without very significant overhead > (basically ne

Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

2021-10-18 Thread Gilles Darold
Le 18/10/2021 à 17:24, Vik Fearing a écrit : > On 10/18/21 8:44 AM, Gilles Darold wrote: >> Le 17/10/2021 à 23:48, Isaac Morland a écrit : >>> On Sun, 17 Oct 2021 at 17:42, Gilles Darold >> > wrote: >>> >>> Note that psql doesn't display a separate line for each row in thi

Re: XTS cipher mode for cluster file encryption

2021-10-18 Thread Stephen Frost
Greetings, * Tomas Vondra (tomas.von...@enterprisedb.com) wrote: > On 10/15/21 21:22, Stephen Frost wrote: > >Now, to address the concern around re-encrypting a block with the same > >key+IV but different data and leaking what parts of the page changed, I > >do think we should use the LSN and have

Re: when the startup process doesn't (logging startup delays)

2021-10-18 Thread Robert Haas
On Thu, Sep 30, 2021 at 5:08 PM Robert Haas wrote: > Any thoughts on the patch I attached? Apparently not, but here's a v2 anyway. In this version I made enable_timeout_every() a three-argument function, so that the caller can specify both the first time at which the timeout routine should be cal

Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

2021-10-18 Thread Vik Fearing
On 10/18/21 8:44 AM, Gilles Darold wrote: > Le 17/10/2021 à 23:48, Isaac Morland a écrit : >> On Sun, 17 Oct 2021 at 17:42, Gilles Darold > > wrote: >> >> Note that psql doesn't display a separate line for each row in this >> case, but the actual result coming back from th

Re: modify error report in mdwrite/mdextend

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-18, Bharath Rupireddy wrote: > On Mon, Oct 18, 2021 at 1:45 PM 蔡梦娟(玊于) wrote: > > Does this match your previous expectations? Hope to get your reply. > > The control from the below ereport(ERROR, doesn't reach the short > write error part. IMO, the existing way does no harm, it is a

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-18 Thread Andrew Dunstan
On 10/18/21 9:37 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 10/18/21 1:41 AM, Bharath Rupireddy wrote: >>> Another thing I noticed is that we don't have any mention of >>> "vcregress taptest" command in the docs [1], if I read the docs >>> correctly. How about we have it along with a sa

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-18 Thread Amul Sul
On Thu, Oct 14, 2021 at 11:10 PM Robert Haas wrote: > > On Tue, Oct 12, 2021 at 8:18 AM Amul Sul wrote: > > In the attached version I have fixed this issue by restoring > > missingContrecPtr. > > > > To handle abortedRecPtr and missingContrecPtr newly added global > > variables thought the commi

Re: try_relation_open and relation_open behave different.

2021-10-18 Thread Alvaro Herrera
On 2021-Oct-18, Xing GUO wrote: > However, I can open an "uncommitted" relation using relation_open() and > cannot open it using try_relation_open(). > Since Postgres doesn't write the "uncommitted" relation descriptor to > SysCache and try_relation_open() checks if the > relation exists in SysCac

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-18 Thread Tom Lane
Andrew Dunstan writes: > On 10/18/21 1:41 AM, Bharath Rupireddy wrote: >> Another thing I noticed is that we don't have any mention of >> "vcregress taptest" command in the docs [1], if I read the docs >> correctly. How about we have it along with a sample example on how to >> run a specific TAP

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-18 Thread Andrew Dunstan
On 10/18/21 1:41 AM, Bharath Rupireddy wrote: > On Sat, Oct 16, 2021 at 6:35 PM Andrew Dunstan wrote: >>> The problems with having "vcregress checkworld" are: 1) required code >>> modifications are more as the available "vcregress" test functions, >>> which required pre-started pg instance, can'

Re: Polyphase merge is obsolete

2021-10-18 Thread Heikki Linnakangas
On 05/10/2021 20:24, John Naylor wrote: I've had a chance to review and test out the v5 patches. Thanks! I fixed the stray reference to PostgreSQL 14 that Zhihong mentioned, and pushed. I've done some performance testing of master versus both patches applied. The full results and test scrip

Re: ResourceOwner refactoring

2021-10-18 Thread Heikki Linnakangas
On 08/09/2021 13:19, Aleksander Alekseev wrote: Hi Heikki, Yeah, needed some manual fixing, but here you go. Thanks for working on this! v8-0002 didn't apply to the current master, so I rebased it. See attached v9-* patches. I also included v9-0004 with some minor tweaks from me. I have seve

Re: relation OID in ReorderBufferToastReplace error message

2021-10-18 Thread Amit Kapila
On Fri, Oct 15, 2021 at 3:40 AM Bossart, Nathan wrote: > > On 9/23/21, 11:26 AM, "Alvaro Herrera" wrote: > > On 2021-Sep-23, Jeremy Schneider wrote: > > > >> On 9/22/21 20:11, Amit Kapila wrote: > >> > > >> > On Thu, Sep 23, 2021 at 3:06 AM Jeremy Schneider > >> > wrote: > >> >> > >> >> Any cha

Re: Doc patch

2021-10-18 Thread Laurenz Albe
On Fri, 2021-10-15 at 12:52 -0400, rir wrote: > > In pgsql-docs, this patch has been recommended to you. > > Lacking consensus and so not included is the the deletion of > comments pointing between the ref/MOVE and FETCH files.  These > were of the form: > >     Just for context: the -docs thr

Re: Failed transaction statistics to measure the logical replication progress

2021-10-18 Thread Amit Kapila
On Thu, Oct 14, 2021 at 9:23 AM houzj.f...@fujitsu.com wrote: > > On Thursday, September 30, 2021 12:15 PM Amit Kapila > > > > These all views are related to untransmitted to the collector but what > > we really need is a view similar to pg_stat_archiver or > > pg_stat_bgwriter which gives inform

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

2021-10-18 Thread Amit Kapila
On Mon, Oct 18, 2021 at 2:32 PM Amit Langote wrote: > > On Mon, Oct 18, 2021 at 3:00 PM Amit Kapila wrote: > > On Mon, Oct 18, 2021 at 8:27 AM Greg Nancarrow wrote: > > > > > > On Sat, Oct 16, 2021 at 5:30 PM houzj.f...@fujitsu.com > > > wrote: > > > > > > > > On Friday, October 15, 2021 7:23 P

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-18 Thread Dilip Kumar
On Mon, Oct 18, 2021 at 1:41 PM Japin Li wrote: > I attached v3 patch that set IntervalStyle to 'postgres' when the > server backend is walsender, and this problem has gone. > I test that set IntervalStyle to 'sql_standard' on publisher and > 'iso_8601' on subscriber, it works fine. > Please tr

Re: Skipping logical replication transactions on subscriber side

2021-10-18 Thread Amit Kapila
On Mon, Oct 11, 2021 at 1:00 PM Masahiko Sawada wrote: > > On Sun, Oct 10, 2021 at 11:04 PM Peter Eisentraut > wrote: > > > > On 04.10.21 02:31, Masahiko Sawada wrote: > > > I guess disabling subscriptions on error/conflict and skipping the > > > particular transactions are somewhat different typ

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

2021-10-18 Thread Amit Langote
On Mon, Oct 18, 2021 at 3:00 PM Amit Kapila wrote: > On Mon, Oct 18, 2021 at 8:27 AM Greg Nancarrow wrote: > > > > On Sat, Oct 16, 2021 at 5:30 PM houzj.f...@fujitsu.com > > wrote: > > > > > > On Friday, October 15, 2021 7:23 PM houzj.f...@fujitsu.com wrote: > > > > Attach a patch to fix it. > >

Re: Skipping logical replication transactions on subscriber side

2021-10-18 Thread Amit Kapila
On Mon, Oct 11, 2021 at 12:57 PM osumi.takami...@fujitsu.com wrote: > > On Monday, October 11, 2021 11:51 AM Masahiko Sawada > wrote: > > 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: > > > >

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

2021-10-18 Thread houzj.f...@fujitsu.com
On Saturday, October 16, 2021 2:31 PM houzj.f...@fujitsu.com wrote: > On Friday, October 15, 2021 7:23 PM houzj.f...@fujitsu.com wrote: > > Attach a patch to fix it. > Attach a new version patch which refactor the fix code in a cleaner way. Although the discussion about the partition behavior[1] i

Re: Added schema level support for publication.

2021-10-18 Thread Masahiko Sawada
Hi, On Mon, Oct 18, 2021 at 3:14 PM houzj.f...@fujitsu.com wrote: > > On Saturday, October 16, 2021 1:57 PM houzj.f...@fujitsu.com wrote: > > Based on the V40 patchset, attaching the Top-up patch which try to fix the > > partition issue in a cleaner way. > > Attach the new version patch set which

Re: modify error report in mdwrite/mdextend

2021-10-18 Thread Bharath Rupireddy
On Mon, Oct 18, 2021 at 1:45 PM 蔡梦娟(玊于) wrote: > > > Hi, all > I noticed that the "else" is missing during the error report after > FileWrite() of mdwrite()/mdextend(), short write error is supposed to be > reported when written bytes is not less than 0. > I modified it in the attached patch: >

modify error report in mdwrite/mdextend

2021-10-18 Thread 蔡梦娟(玊于)
Hi, all I noticed that the "else" is missing during the error report after FileWrite() of mdwrite()/mdextend(), short write error is supposed to be reported when written bytes is not less than 0. I modified it in the attached patch: diff --git a/src/backend/storage/smgr/md.c b/src/backend/storag

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-18 Thread Japin Li
On Mon, 18 Oct 2021 at 11:26, Masahiko Sawada wrote: > On Thu, Oct 14, 2021 at 8:50 PM Dilip Kumar wrote: >> >> On Thu, Oct 14, 2021 at 3:48 PM Sadhuprasad Patro wrote: >> > >> > Hi All, >> > >> > Publisher 'DateStyle' is set as "SQL, MDY", whereas in Subscriber as >> > "SQL, DMY", the logical

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-18 Thread Japin Li
On Mon, 18 Oct 2021 at 12:17, Tom Lane wrote: > Japin Li writes: >> On Mon, 18 Oct 2021 at 11:59, Michael Paquier wrote: >>> dblink.c has something similar as of applyRemoteGucs(), except that it >>> does not do extra_float_digits. It would be nice to avoid more >>> duplication for those thing

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-18 Thread Michael Paquier
On Thu, Oct 14, 2021 at 11:07:21AM +0900, Michael Paquier wrote: > This means that we've lost the ability to enforce n_distinct for > expression indexes for two years. But, do we really care about this > case? My answer to that would be "no" as long as we don't have a > documented grammar rather,

Re: try_relation_open and relation_open behave different.

2021-10-18 Thread Xing GUO
On Mon, Oct 18, 2021 at 2:45 PM Michael Paquier wrote: > On Mon, Oct 18, 2021 at 01:56:07PM +0800, Xing GUO wrote: > > My question is, is it a deliberate design that makes try_relation_open > and > > relation_open different? Shall we mention it in the comment of > > try_relation_open OR adding th

Re: Partition Check not updated when insert into a partition

2021-10-18 Thread Amit Langote
Hi Pavel, On Fri, Oct 15, 2021 at 5:02 PM Pavel Borisov wrote: >> The lock taken on the parent is either ShareUpdateExclusiveLock or >> AccessExclusiveLock depending on whether CONCURRENTLY is specified or >> not. Maybe that should be considered also when locking the children. >> >> I've updated