RE: Parallel Inserts in CREATE TABLE AS

2021-05-27 Thread houzj.f...@fujitsu.com
From: Tsunakawa, Takayuki/綱川 貴之 Sent: Friday, May 28, 2021 8:55 AM > To: 'Bharath Rupireddy' ; Hou, > Zhijie/侯 志杰 > Cc: Amit Kapila ; Tang, Haiying/唐 海英 > ; PostgreSQL-development > ; Zhihong Yu ; Luc > Vlaming ; Dilip Kumar ; > vignesh C > Subject: RE: Parallel Inserts in CREATE TABLE AS > > F

Re: Consider parallel for lateral subqueries with limit

2021-05-27 Thread Greg Nancarrow
On Tue, Dec 8, 2020 at 10:46 AM James Coleman wrote: > > While I haven't actually tracked down to guarantee this is handled > elsewhere, a thought experiment -- I think -- shows it must be so. > Here's why: suppose we don't have a limit here, but the query return > order is different in different

Re: Race condition in recovery?

2021-05-27 Thread Tatsuro Yamada
Hi Horiguchi-san, In a project I helped with, I encountered an issue where the archive command kept failing. I thought this issue was related to the problem in this thread, so I'm sharing it here. If I should create a new thread, please let me know. * Problem - The archive_command is failed al

Re: Parallel Inserts in CREATE TABLE AS

2021-05-27 Thread Amit Kapila
On Thu, May 27, 2021 at 7:37 PM Bharath Rupireddy wrote: > > On Thu, May 27, 2021 at 9:53 AM Bharath Rupireddy > wrote: > > > One idea to find this out could be that we have three counters for > > > each worker which counts the number of times each worker extended the > > > relation in bulk, the

Re: sync request forward function ForwardSyncRequest() might hang for some time in a corner case?

2021-05-27 Thread Paul Guo
On Thu, May 27, 2021 at 10:22 PM Julien Rouhaud wrote: > > On Thu, May 27, 2021 at 10:05 PM Paul Guo wrote: > > > > Also note that ForwardSyncRequest() does wake up the checkpointer if > > it thinks the requests in shared memory are "too full", but does not > > wake up when the request is actuall

[BUG]Update Toast data failure in logical replication

2021-05-27 Thread tanghy.f...@fujitsu.com
Hi I think I just found a bug in logical replication. Data couldn't be synchronized while updating toast data. Could anyone take a look at it? Here is the steps to proceduce the BUG: --publisher-- CREATE TABLE toasted_key ( id serial, toasted_key text PRIMARY KEY, toasted_col

Re: Two patches to speed up pg_rewind.

2021-05-27 Thread Paul Guo
> On 2021/2/19, 10:33 AM, "Paul Guo" wrote: > Refactored the code a bit along with fixes. Manually tested them on centos > & Ubuntu (the later has copy_file_range()) > For the first patch, actually I have some concerns. My assumption is that > the target pg_data directory should be fsync-ed alr

Re: Parallel Inserts in CREATE TABLE AS

2021-05-27 Thread Bharath Rupireddy
On Fri, May 28, 2021 at 6:24 AM tsunakawa.ta...@fujitsu.com wrote: > > From: Bharath Rupireddy > > I'm still not sure why the execution time with 0 workers (or serial > > execution or > > no parallelism involved) on my testing system is 112 sec compared to 58 sec > > on > > Hou-San's system for

Re: Test of a partition with an incomplete detach has a timing issue

2021-05-27 Thread Noah Misch
On Tue, May 25, 2021 at 11:32:38AM -0400, Alvaro Herrera wrote: > On 2021-May-24, Noah Misch wrote: > > What if we had a standard that the step after the cancel shall send a query > > to > > the backend that just received the cancel? Something like: > > Hmm ... I don't understand why this fixes

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

2021-05-27 Thread tanghy.f...@fujitsu.com
On Friday, May 28, 2021 2:16 PM, tanghy.f...@fujitsu.com wrote: >I think I just found a bug in logical replication. Data couldn't be >synchronized while updating toast data. >Could anyone take a look at it? FYI. The problem also occurs in PG-13. I will try to check from which version it got in

Re: [HACKERS] logical decoding of two-phase transactions

2021-05-27 Thread vignesh C
On Fri, May 28, 2021 at 9:14 AM Ajin Cherian wrote: > > On Wed, May 26, 2021 at 6:53 PM vignesh C wrote: > > > > On Tue, May 25, 2021 at 8:54 AM Ajin Cherian wrote: > > > > > > On Fri, May 21, 2021 at 6:43 PM Peter Smith wrote: > > > > > > > Fixed in v77-0001, v77-0002 > > > > > > Attaching a n

Re: Race condition in recovery?

2021-05-27 Thread Kyotaro Horiguchi
Thanks! At Thu, 27 May 2021 15:05:44 -0400, Robert Haas wrote in > On Wed, May 26, 2021 at 8:49 PM Kyotaro Horiguchi > wrote: > > So in the mail [1] and [2] I tried to describe what's going on around > > the two issues. Although I haven't have a response to [2], can I > > think that we clarif

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-05-27 Thread Noah Misch
On Tue, May 25, 2021 at 01:33:54PM -0700, Mark Dilger wrote: > v3-0001 adds a new pg_logical_replication role with permission to manage > publications and subscriptions. > v3-0004 adds a new pg_database_security role with permission to perform many > actions that would otherwise require superuser

Re: storing an explicit nonce

2021-05-27 Thread Neil Chen
On Thu, May 27, 2021 at 11:12 PM Bruce Momjian wrote: > > Well, the code now does write full page images for hint bit changes, so > it should work fine. > > Yes, indeed it works well and I'd tested it. But here I want to make clear my understanding of the argument, if there is any problem please

Re: storing an explicit nonce

2021-05-27 Thread Neil Chen
On Fri, May 28, 2021 at 2:12 PM Neil Chen wrote: > > When the checksums are disabled, we can use these unused checksum values > as a counter to make sure we have different nonce even if we don't write > the new WAL record. > > Ah, well, I think I've figured it out for myself. In this way, we can'

Re: Bracket, brace, parenthesis

2021-05-27 Thread Kyotaro Horiguchi
At Thu, 27 May 2021 21:08:46 +0900, Michael Paquier wrote in > On Thu, May 27, 2021 at 03:20:10PM +0900, Kyotaro Horiguchi wrote: > > At Fri, 14 May 2021 10:04:57 -0400, Tom Lane wrote in > >> +1. I tend to write "square bracket" or "curly brace" when I want to > >> be extra clear, but I thin

Re: [HACKERS] logical decoding of two-phase transactions

2021-05-27 Thread Amit Kapila
On Thu, May 27, 2021 at 8:05 AM Ajin Cherian wrote: > > Thanks for confirmation. The problem seemed to be as you reported a > table not closed when a transaction was committed. > This seems to be because the function UpdateTwoPhaseState was > committing a transaction inside the function when the c

Re: RFC: Logging plan of the running query

2021-05-27 Thread torikoshia
On 2021-05-13 21:57, Dilip Kumar wrote: On Thu, May 13, 2021 at 5:18 PM Dilip Kumar wrote: On Thu, May 13, 2021 at 5:15 PM Bharath Rupireddy wrote: > > On Thu, May 13, 2021 at 5:14 PM Dilip Kumar wrote: > > > > On Thu, May 13, 2021 at 4:16 PM Bharath Rupireddy > > wrote: > > > > > > I'm say

<    1   2