Re: Misleading comment in prologue of ReorderBufferQueueMessage

2020-12-14 Thread Amit Kapila
On Mon, Dec 14, 2020 at 2:45 PM Ashutosh Bapat wrote: > > The name of the function suggests that the given message will be queued in > ReorderBuffer. The prologue of the function says so too > 776 /* > 777 * Queue message into a transaction so it can be processed upon commit. > 778 */ > It

Re: Add Information during standby recovery conflicts

2020-12-14 Thread Fujii Masao
On 2020/12/05 12:38, Masahiko Sawada wrote: On Fri, Dec 4, 2020 at 7:22 PM Drouvot, Bertrand wrote: Hi, On 12/4/20 2:21 AM, Fujii Masao wrote: On 2020/12/04 9:28, Masahiko Sawada wrote: On Fri, Dec 4, 2020 at 2:54 AM Fujii Masao wrote: On 2020/12/01 17:29, Drouvot, Bertrand wrote:

Re: anonymous block returning like a function

2020-12-14 Thread Pavel Stehule
po 14. 12. 2020 v 14:31 odesílatel Heikki Linnakangas napsal: > On 11/12/2020 21:06, PegoraroF10 wrote: > > I would like to have an anonymous block, like DO, but having resuts, > like an > > usual function does. > > > > I know any user can do ... > > > > create function

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-14 Thread Peter Eisentraut
On 2020-12-13 17:49, Tom Lane wrote: 2. Don't allow a default: invent a new HASH_STRING flag, and require that hash_create() calls specify exactly one of HASH_BLOBS, HASH_STRING, or HASH_FUNCTION. This doesn't completely fix the hazard of mindless-copy-and-paste, but I think it might make it a

Re: pg_basebackup caused FailedAssertion

2020-12-14 Thread Heikki Linnakangas
On 12/12/2020 00:47, Jeff Davis wrote: On Wed, 2013-02-27 at 19:29 +0200, Heikki Linnakangas wrote: Right. I fixed that by adding WL_SOCKET_READABLE, and handling any messages that might arrive after the frontend already sent CopyEnd. The frontend shouldn't send any messages after CopyEnd,

Re: Parallel Inserts in CREATE TABLE AS

2020-12-14 Thread Bharath Rupireddy
On Thu, Dec 10, 2020 at 7:20 PM Bharath Rupireddy wrote: > On Thu, Dec 10, 2020 at 5:19 PM Dilip Kumar wrote: > > > > > + allow = ps && IsA(ps, GatherState) && > > > > > !ps->ps_ProjInfo && > > > > > + plannedstmt->parallelModeNeeded && > > > > > +

Re: a misbehavior of partition row movement (?)

2020-12-14 Thread Amit Langote
On Fri, Nov 20, 2020 at 8:55 PM Amit Langote wrote: > On Sat, Oct 3, 2020 at 8:26 PM Amit Langote wrote: > > On Sat, Oct 3, 2020 at 8:15 PM Tomas Vondra > > wrote > > > I think we need to differentiate between master and backbranches. IMO we > > > should try to make it "just work" in master,

Some error messages are omitted while recovery.

2020-12-14 Thread Kyotaro Horiguchi
At Mon, 14 Dec 2020 16:48:05 +0900, Michael Paquier wrote in > On Mon, Dec 14, 2020 at 11:34:51AM +0900, Kyotaro Horiguchi wrote: > > Apart from this issue, while checking that, I noticed that if server > > starts having WALs from a server of a different systemid, the server > > stops with

Re: Feature Proposal: Add ssltermination parameter for SNI-based LoadBalancing

2020-12-14 Thread Heikki Linnakangas
On 12/12/2020 13:52, Lukas Meisegeier wrote: Thanks for the provided ideas :) I use HaProxy for my load-balancing and unfortunately I can't define that I want to listen on a port for both ssl and non ssl requests. Could you configure HaProxy to listen on separate ports for SSL and non-SSL

Re: [POC] Fast COPY FROM command for the table with foreign partitions

2020-12-14 Thread Andrey V. Lepikhov
On 12/1/20 2:02 PM, Amit Langote wrote: On Tue, Dec 1, 2020 at 2:40 PM tsunakawa.ta...@fujitsu.com wrote: From: Amit Langote >> The code appears to require both BeginForeignCopy and EndForeignCopy, >> while the following documentation says they are optional. Which is >> correct? (I suppose

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-14 Thread Amit Kapila
On Mon, Dec 14, 2020 at 9:30 AM Jammie wrote: > > Hello, > > We have two logical replication slots in our postgresql database (version-11) > instance and we are using pgJDBC to stream data from these two slots. > IIUC, you are using some out-of-core outputplugin to stream the data? Are you

Misleading comment in prologue of ReorderBufferQueueMessage

2020-12-14 Thread Ashutosh Bapat
The name of the function suggests that the given message will be queued in ReorderBuffer. The prologue of the function says so too 776 /* 777 * Queue message into a transaction so it can be processed upon commit. 778 */ It led me to think that a non-transactional message is processed along

RE: Parallel Inserts in CREATE TABLE AS

2020-12-14 Thread Hou, Zhijie
Hi > Attaching v11 patch set. Please review it further. Currently with the patch, we can allow parallel CTAS when topnode is Gather. When top-node is Append and Gather is the sub-node of Append, I think we can still enable Parallel CTAS by pushing Parallel CTAS down to the sub-node Gather,

Re: Improving spin-lock implementation on ARM.

2020-12-14 Thread Krunal Bauskar
Wondering if we can take this to completion (any idea what more we could do?). On Thu, 10 Dec 2020 at 14:48, Krunal Bauskar wrote: > > On Tue, 8 Dec 2020 at 14:33, Krunal Bauskar > wrote: > >> >> >> On Thu, 3 Dec 2020 at 21:32, Tom Lane wrote: >> >>> Krunal Bauskar writes: >>> > Any updates

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-14 Thread Amit Kapila
On Mon, Dec 14, 2020 at 1:36 AM Noah Misch wrote: > > On Sun, Dec 13, 2020 at 11:49:31AM -0500, Tom Lane wrote: > > But what jumps out at me here is that this sort of error seems way > > too easy to make, and evidently way too hard to detect. What can we > > do to make it more obvious if one has

Re: Asynchronous Append on postgres_fdw nodes.

2020-12-14 Thread Kyotaro Horiguchi
At Sat, 12 Dec 2020 19:06:51 +0900, Etsuro Fujita wrote in > On Fri, Nov 20, 2020 at 8:16 PM Kyotaro Horiguchi > wrote: > > I looked through the nodeAppend.c and postgres_fdw.c part and those > > are I think the core of this patch. > > Thanks again for the review! > > > -*

Re: Feature improvement for pg_stat_statements

2020-12-14 Thread Seino Yuki
2020-12-09 21:14 に Fujii Masao さんは書きました: On 2020/12/09 20:42, Li Japin wrote: Hi, On Dec 9, 2020, at 6:37 PM, Seino Yuki > wrote: 2020-12-01 01:04 に Fujii Masao さんは書きました: On 2020/11/30 23:05, Seino Yuki wrote: 2020-11-30 15:02 に Fujii Masao さんは書きました: On

Re: pg_shmem_allocations & documentation

2020-12-14 Thread Benoit Lobréau
Here's a proposal patch. Le ven. 11 déc. 2020 à 09:58, Benoit Lobréau a écrit : > Would "NULL for anonymous allocations, since details related to them are > not known." be ok ? > > > Le ven. 11 déc. 2020 à 09:29, Kyotaro Horiguchi > a écrit : > >> At Fri, 11 Dec 2020 14:42:45 +0900, Michael

Re: anonymous block returning like a function

2020-12-14 Thread Heikki Linnakangas
On 11/12/2020 21:06, PegoraroF10 wrote: I would like to have an anonymous block, like DO, but having resuts, like an usual function does. I know any user can do ... create function pg_temp.run_time_bigger(numeric,numeric) returns numeric language plpgsql as $$ begin if $1 > $2 then return $1;

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-12-14 Thread Fujii Masao
On 2020/12/14 14:36, Bharath Rupireddy wrote: On Mon, Dec 14, 2020 at 9:38 AM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: > On 2020/12/12 15:05, Bharath Rupireddy wrote: > > On Sat, Dec 12, 2020 at 12:19 AM Fujii Masao mailto:masao.fu...@oss.nttdata.com>

Re: [Patch] ALTER SYSTEM READ ONLY

2020-12-14 Thread Amul Sul
On Mon, Dec 14, 2020 at 11:28 AM Amul Sul wrote: > > On Thu, Dec 10, 2020 at 6:04 AM Andres Freund wrote: > > > > Hi, > > > > On 2020-12-09 16:13:06 -0500, Robert Haas wrote: > > > That's not good. On a typical busy system, a system is going to be in > > > the middle of a checkpoint most of the

Re: Add Information during standby recovery conflicts

2020-12-14 Thread Fujii Masao
On 2020/12/15 0:49, Drouvot, Bertrand wrote: Hi, On 12/14/20 4:20 PM, Fujii Masao wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On 2020/12/14 21:31, Fujii

Re: Feature Proposal: Add ssltermination parameter for SNI-based LoadBalancing

2020-12-14 Thread Lukas Meisegeier
I liked the idea with separate ports for ssl and non ssl requests and tried it with haproxy. The psql-client connects with haproxy and receives the fixed 'S' byte response. After that he tried to continue on the same connection and doens't open a new one. This crashes the connection because

Re: Add Information during standby recovery conflicts

2020-12-14 Thread Fujii Masao
On 2020/12/14 21:31, Fujii Masao wrote: On 2020/12/05 12:38, Masahiko Sawada wrote: On Fri, Dec 4, 2020 at 7:22 PM Drouvot, Bertrand wrote: Hi, On 12/4/20 2:21 AM, Fujii Masao wrote: On 2020/12/04 9:28, Masahiko Sawada wrote: On Fri, Dec 4, 2020 at 2:54 AM Fujii Masao wrote: On

Re: Insert Documentation - Returning Clause and Order

2020-12-14 Thread Ashutosh Bapat
On Sat, Dec 12, 2020 at 8:41 PM David G. Johnston wrote: > > On Sat, Dec 12, 2020 at 7:02 AM James Coleman wrote: >> >> >> Certainly almost every ORM, and maybe even other forms of application >> code, need to be able to associate the serial column value returned >> with what it inserted. > > >

Re: pg_waldump error message fix

2020-12-14 Thread Bossart, Nathan
On 12/13/20, 7:01 PM, "Michael Paquier" wrote: > On Mon, Dec 14, 2020 at 10:26:01AM +0900, Kyotaro Horiguchi wrote: >> Yeah, I had the same feeling. At least, the two LSNs in the message >> under discussion are simply redundant. So +1 to just remove the LSN at >> the caller site. > > That would

Re: Feature improvement for pg_stat_statements

2020-12-14 Thread Fujii Masao
On 2020/12/14 18:17, Seino Yuki wrote: 2020-12-09 21:14 に Fujii Masao さんは書きました: On 2020/12/09 20:42, Li Japin wrote: Hi, On Dec 9, 2020, at 6:37 PM, Seino Yuki mailto:sein...@oss.nttdata.com>> wrote: 2020-12-01 01:04 に Fujii Masao さんは書きました: On 2020/11/30 23:05, Seino Yuki wrote:

Re: Parallel Inserts in CREATE TABLE AS

2020-12-14 Thread Dilip Kumar
On Mon, Dec 14, 2020 at 4:06 PM Bharath Rupireddy wrote: > > On Thu, Dec 10, 2020 at 7:20 PM Bharath Rupireddy > wrote: > > On Thu, Dec 10, 2020 at 5:19 PM Dilip Kumar wrote: > > > > > > + allow = ps && IsA(ps, GatherState) && > > > > > > !ps->ps_ProjInfo && > > > > > > +

Re: a misbehavior of partition row movement (?)

2020-12-14 Thread Arne Roland
Hi, thanks for looking into this. I haven't yet looked at your patch in detail, yet I think we should address the general issue here. To me this doesn't seem to be a RI-trigger issue, but a more general issue like I mentioned in the pg-bugs thread

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-12-14 Thread Bharath Rupireddy
On Mon, Dec 14, 2020 at 8:03 PM Fujii Masao wrote: > > We will not output if the invalidated entry has no active connection[2], so > > if we fix the connection leak issue with the above discussed fix i.e > > closing all the invalidated connections at the end of next xact, there are > > less

Re: Rethinking plpgsql's assignment implementation

2020-12-14 Thread Tom Lane
Pavel Stehule writes: > I checked a performance and it looks so access to record's field is faster, > but an access to arrays field is significantly slower Hmm, I'd drawn the opposite conclusion in my own testing ... > for i in 1..5000 > loop > if a[i] > a[i+1] then > aux

Re: Parallel Inserts in CREATE TABLE AS

2020-12-14 Thread Zhihong Yu
For set_append_rel_size(), it seems this is the difference between query_level != 1 and query_level == 1: + (root->parent_root->parse->CTASParallelInsInfo & CTAS_PARALLEL_INS_IGN_TUP_COST_APPEND) && Maybe extract the common conditions into its own expression / variable so that

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-12-14 Thread Bharath Rupireddy
On Mon, Dec 14, 2020, 9:47 PM Bharath Rupireddy wrote: > > On Mon, Dec 14, 2020 at 8:03 PM Fujii Masao > wrote: > > > We will not output if the invalidated entry has no active connection[2], > > > so if we fix the connection leak issue with the above discussed fix i.e > > > closing all the

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-12-14 Thread Fujii Masao
On 2020/12/15 1:40, Bharath Rupireddy wrote: On Mon, Dec 14, 2020, 9:47 PM Bharath Rupireddy wrote: On Mon, Dec 14, 2020 at 8:03 PM Fujii Masao wrote: We will not output if the invalidated entry has no active connection[2], so if we fix the connection leak issue with the above discussed

Optimizing the documentation

2020-12-14 Thread Joshua Drake
-hackers, The community has spent a lot of time optimizing features over the years. Excellent examples include parallel query and partitioning which have been multi-year efforts to increase the quality, performance, and extend features of the original commit. We should consider the documentation

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-14 Thread Tom Lane
Noah Misch writes: > On Sun, Dec 13, 2020 at 11:49:31AM -0500, Tom Lane wrote: >> A quick count of grep hits suggest that the large majority of >> existing hash_create() calls use HASH_BLOBS, and there might be >> only order-of-ten calls that would need to be touched if we >> required an explicit

Re: Optimizing the documentation

2020-12-14 Thread David G. Johnston
On Mon, Dec 14, 2020 at 1:40 PM Joshua Drake wrote: > For example, what would be exceedly helpful would be a documentation style >>> guide that is canonical and we can review documentation against. >>> >> I do agree with that premise, with the goal of getting more people to contribute to writing

Re: Optimizing the documentation

2020-12-14 Thread Joshua Drake
> > > > In short, the devil's in the details. Maybe there are lots of > places where this type of approach would help, but I think it's > going to be a case-by-case discussion not something where there's > a clear win overall. > Certainly and I didn't want to just start dumping patches. Part of

Re: Rethinking plpgsql's assignment implementation

2020-12-14 Thread Pavel Stehule
po 14. 12. 2020 v 17:25 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > I checked a performance and it looks so access to record's field is > faster, > > but an access to arrays field is significantly slower > > Hmm, I'd drawn the opposite conclusion in my own testing ... > > > for

Re: Optimizing the documentation

2020-12-14 Thread Joshua Drake
> > > > > This is the official PostgreSQL documentation. It is written by the > > PostgreSQL community in parallel with the development of the software. > > We have organized it by the type of user and their stages of experience: > > Some thoughts on this example: > > - Changing "has been" to "is"

Re: libpq compression

2020-12-14 Thread Daniil Zakhlystov
> On Dec 10, 2020, at 1:39 AM, Robert Haas wrote: > > I still think this is excessively baroque and basically useless. > Nobody wants to allow compression levels 1, 3, and 5 but disallow 2 > and 4. At the very most, somebody might want to start a maximum or > minimum level. But even that I think

Re: cutting down the TODO list thread

2020-12-14 Thread John Naylor
On Thu, Dec 10, 2020 at 3:29 PM John Naylor wrote: > > *Views and Rules > *SQL Commands Hearing no objections, the items mentioned have been moved over. -- John Naylor EDB: http://www.enterprisedb.com

Re: Optimizing the documentation

2020-12-14 Thread David G. Johnston
On Mon, Dec 14, 2020 at 12:50 PM Joshua Drake wrote: > -hackers, > > The community has spent a lot of time optimizing features over the years. > Excellent examples include parallel query and partitioning which have been > multi-year efforts to increase the quality, performance, and extend >

Re: Optimizing the documentation

2020-12-14 Thread Heikki Linnakangas
On 14/12/2020 21:50, Joshua Drake wrote: The community has spent a lot of time optimizing features over the years. Excellent examples include parallel query and partitioning which have been multi-year efforts to increase the quality,  performance, and extend features of the original commit. We

Re: Optimizing the documentation

2020-12-14 Thread Tom Lane
Heikki Linnakangas writes: > On 14/12/2020 21:50, Joshua Drake wrote: >> Issues that are resolved with the optimized text: >> >> * Succinct text is more likely to be read than skimmed >> >> * Removal of extraneous mentions of PostgreSQL >> >> * Removal of unneeded justifications >> >> *

Re: Proposed patch for key managment

2020-12-14 Thread Bruce Momjian
On Tue, Dec 15, 2020 at 10:36:56AM +0800, Neil Chen wrote: > Hi, Bruce   > > I read your question and here are some of my thoughts. > > >         Why is KmgrShmemData a struct, when it only has a single member?  > Are >         all shared memory areas structs? > >   > Yes, all

Re: Proposed patch for key managment

2020-12-14 Thread Michael Paquier
On Mon, Dec 14, 2020 at 10:19:02PM -0500, Bruce Momjian wrote: > On Tue, Dec 15, 2020 at 10:05:49AM +0900, Michael Paquier wrote: >> - The HMAC split is terrible, as mentioned upthread. I think that you >> would need to extract this stuff as a separate patch, and not add more >> mess to the

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-14 Thread Jammie
Thanks Amit for the response We are using pgJDBC sample program here https://jdbc.postgresql.org/documentation/head/replication.html the setFlushLSN is coming from the pgJDBC only. git hub for APIs of pgJDBC methods available. https://github.com/pgjdbc/pgjdbc The second slot refers to

Re: Misleading comment in prologue of ReorderBufferQueueMessage

2020-12-14 Thread Ashutosh Bapat
On Mon, Dec 14, 2020 at 3:14 PM Amit Kapila wrote: > On Mon, Dec 14, 2020 at 2:45 PM Ashutosh Bapat > wrote: > > > > The name of the function suggests that the given message will be queued > in ReorderBuffer. The prologue of the function says so too > > 776 /* > > 777 * Queue message into a

Re: Add Information during standby recovery conflicts

2020-12-14 Thread Fujii Masao
On 2020/12/15 12:04, Kyotaro Horiguchi wrote: At Tue, 15 Dec 2020 02:00:21 +0900, Fujii Masao wrote in Thanks for the review! I'm thinking to wait half a day before commiting the patch just in the case someone may object the patch. Sorry for coming late. I have looked only the latest

Re: a misbehavior of partition row movement (?)

2020-12-14 Thread Amit Langote
On Tue, Dec 15, 2020 at 12:43 PM Amit Langote wrote: > Quoting your original example: > > drop table a, b; > create table a (id serial, primary key (id)) partition by range (id); > create table b (id serial, primary key (id)) partition by range (id); > alter table b add constraint a_fk foreign

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-12-14 Thread Bharath Rupireddy
On Mon, Dec 14, 2020 at 11:00 PM Fujii Masao wrote: > > One more point for the above scenario: if the user mapping is dropped > > in another session, then cache lookup for that entry in the > > postgres_fdw_get_connections() returns a null tuple which I plan to > > not throw an error, but just to

Re: Optimizing the documentation

2020-12-14 Thread Joshua Drake
> > >> >> Technical documentation should only be as verbose as needed to illustrate >> the concept or task that we are explaining. It should not be redundant, nor >> should it use .50 cent words when a .10 cent word would suffice. I would >> like to put effort into optimizing the documentation and

Re: pg_shmem_allocations & documentation

2020-12-14 Thread Michael Paquier
On Mon, Dec 14, 2020 at 10:33:06AM +0100, Benoit Lobréau wrote: > > > The offset at which the allocation starts. NULL for anonymous > - allocations and unused memory. > + allocations, since details related to them are not known. > Both of you seem to

Re: Proposed patch for key managment

2020-12-14 Thread Neil Chen
Hi, Bruce I read your question and here are some of my thoughts. Why is KmgrShmemData a struct, when it only has a single member? > Are > all shared memory areas structs? > Yes, all areas created by ShmemInitStruct() are structs. I think the significance of using struct is that

Re: Proposed patch for key managment

2020-12-14 Thread Bruce Momjian
On Tue, Dec 15, 2020 at 10:05:49AM +0900, Michael Paquier wrote: > On Mon, Dec 14, 2020 at 06:06:15PM -0500, Bruce Momjian wrote: > > I am getting close to applying these patches, probably this week. The > > patches are cumulative: > > > >

Re: Proposed patch for key managment

2020-12-14 Thread Michael Paquier
On Mon, Dec 14, 2020 at 06:06:15PM -0500, Bruce Momjian wrote: > I am getting close to applying these patches, probably this week. The > patches are cumulative: > > https://github.com/postgres/postgres/compare/master...bmomjian:key.diff > >

postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped

2020-12-14 Thread Bharath Rupireddy
Hi, As discussed in [1], in postgres_fdw the cached connections to remote servers can stay until the lifetime of the local session without getting a chance to disconnect (connection leak), if the underlying user mapping or foreign server is dropped in another session. Here are few scenarios how

adding wait_start column to pg_locks

2020-12-14 Thread torikoshia
Hi, When examining the duration of locks, we often do join on pg_locks and pg_stat_activity and use columns such as query_start or state_change. However, since these columns are the moment when queries have started or their state has changed, we cannot get the exact lock duration in this way.

Re: postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped

2020-12-14 Thread Zhihong Yu
Is the following sequence possible ? In pgfdw_inval_callback(): entry->invalidated = true; + have_invalid_connections = true; At which time the loop in pgfdw_xact_callback() is already running (but past the above entry). Then: + /* We are done closing all the invalidated

Re: Autovacuum on partitioned table (autoanalyze)

2020-12-14 Thread yuzuko
Hello Alvaro, On Thu, Dec 3, 2020 at 10:28 PM Alvaro Herrera wrote: > > Hello Yuzuko, > > On 2020-Dec-02, yuzuko wrote: > > > The problem Horiguchi-san mentioned is as follows: > > [explanation] > > Hmm, I see. So the problem is that if some ancestor is analyzed first, > then analyze of one of

Re: Add Information during standby recovery conflicts

2020-12-14 Thread Kyotaro Horiguchi
At Tue, 15 Dec 2020 02:00:21 +0900, Fujii Masao wrote in > Thanks for the review! I'm thinking to wait half a day before > commiting > the patch just in the case someone may object the patch. Sorry for coming late. I have looked only the latest thread so I should be missing many things so

Re: postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped

2020-12-14 Thread Bharath Rupireddy
On Tue, Dec 15, 2020 at 8:25 AM Zhihong Yu wrote: > Is the following sequence possible ? > In pgfdw_inval_callback(): > > entry->invalidated = true; > + have_invalid_connections = true; > > At which time the loop in pgfdw_xact_callback() is already running (but past > the

Re: a misbehavior of partition row movement (?)

2020-12-14 Thread Amit Langote
Hi, On Tue, Dec 15, 2020 at 12:01 AM Arne Roland wrote: > thanks for looking into this. I haven't yet looked at your patch in detail, > yet I think we should address the general issue here. To me this doesn't seem > to be a RI-trigger issue, but a more general issue like I mentioned in the >

Re: Optimizing the documentation

2020-12-14 Thread Tom Lane
Joshua Drake writes: > Certainly and I didn't want to just start dumping patches. Part of this is > just style, for example: > Thus far, our queries have only accessed one table at a time. Queries can > access multiple tables at once, or access the same table in such a way that > multiple rows

Re: Proposed patch for key managment

2020-12-14 Thread Bruce Momjian
On Wed, Dec 2, 2020 at 04:38:14PM -0500, Bruce Momjian wrote: > Attached is a patch for key management, which will eventually be part of > cluster file encryption (CFE), called TDE (Transparent Data Encryption) > by Oracle. It is an update of Masahiko Sawada's patch from July 31: > > >

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-12-14 Thread Justin Pryzby
On Sat, Dec 12, 2020 at 01:45:26PM -0600, Justin Pryzby wrote: > On Sat, Dec 12, 2020 at 09:20:35AM +0100, Peter Eisentraut wrote: > > On 2020-12-11 21:27, Alvaro Herrera wrote: > > > By the way-- What did you think of the idea of explictly marking the > > > types used for bitmasks using types

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-14 Thread Tom Lane
I wrote: > There are a couple of other API oddities that maybe we should think > about while we're here: > * Should we just have a blanket insistence that all callers supply > HASH_ELEM? The default sizes that dynahash.c uses without that are > undocumented and basically useless. We're already

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-14 Thread Tom Lane
Here's a rolled-up patch that does some further documentation work and gets rid of the unnecessary memset's as well. regards, tom lane diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index 2dc9e44ae6..651227f510 100644 --- a/contrib/dblink/dblink.c +++

Re: A few new options for CHECKPOINT

2020-12-14 Thread Bossart, Nathan
On 12/5/20, 9:11 AM, "Stephen Frost" wrote: > * Bossart, Nathan (bossa...@amazon.com) wrote: >> On 12/5/20, 6:41 AM, "Stephen Frost" wrote: >> > Assuming we actually want to do this, which I still generally don't >> > agree with since it isn't really clear if it'll actually end up doing >> >

Re: Optimizing the documentation

2020-12-14 Thread Peter Geoghegan
On Mon, Dec 14, 2020 at 12:50 PM Tom Lane wrote: > Most of the docs contain pretty dense technical > material that's not going to be improved by making it even denser. It's always hard to write dense technical prose, for a variety of reasons. I often struggle with framing. For example I seem to

Re: Optimizing the documentation

2020-12-14 Thread Joshua Drake
> > > > > Queries can also access multiple tables at once, or access the same table > > in a way that multiple rows are processed. A query that accesses multiple > > rows of the same or different tables at one time is a join. For example, > if > > you wish to list all of the weather records with

Re: Add Information during standby recovery conflicts

2020-12-14 Thread Fujii Masao
On 2020/12/15 15:40, Fujii Masao wrote: On 2020/12/15 12:04, Kyotaro Horiguchi wrote: At Tue, 15 Dec 2020 02:00:21 +0900, Fujii Masao wrote in Thanks for the review! I'm thinking to wait half a day before commiting the patch just in the case someone may object the patch. Sorry for

Re: Rethinking plpgsql's assignment implementation

2020-12-14 Thread Pavel Stehule
Hi I checked a performance and it looks so access to record's field is faster, but an access to arrays field is significantly slower do $$ declare a int[]; aux int; rep boolean default true; begin for i in 1..5000 loop a[i]:= 5000 - i; end loop; raise notice '%', a[1:10];

Re: Fail Fast In CTAS/CMV If Relation Already Exists To Avoid Unnecessary Rewrite, Planning Costs

2020-12-14 Thread Bharath Rupireddy
On Mon, Dec 14, 2020 at 11:52 AM Michael Paquier wrote: > On Mon, Dec 14, 2020 at 03:15:12PM +0900, Michael Paquier wrote: > > Please note that this case fails with your patch, but the presence of > > IF NOT EXISTS should ensure that we don't fail and issue a NOTICE > > instead, no? Thanks for