Improve heapgetpage() performance, overhead from serializable

2023-07-15 Thread Andres Freund
Hi, Several loops which are important for query performance, like heapgetpage()'s loop over all tuples, have to call functions like HeapCheckForSerializableConflictOut() and PredicateLockTID() in every iteration. When serializable is not in use, all those functions do is to to return. But being

Re: Fix search_path for all maintenance commands

2023-07-15 Thread Noah Misch
On Thu, Jul 13, 2023 at 02:07:27PM -0700, David G. Johnston wrote: > On Thu, Jul 13, 2023 at 2:00 PM Gurjeet Singh wrote: > > On Thu, Jul 13, 2023 at 1:37 PM David G. Johnston > > wrote: > > > I'm against simply breaking the past without any recourse as what we > > did for pg_dump/pg_restore

Protect extension' internal tables - how?

2023-07-15 Thread Nikita Malakhov
Hi hackers! While working on an extension I encountered a quite tricky question - the extension (with functions in C) creates tables during function calls, these tables must be protected from direct users' queries, at the same time they must remain accessible for all functions of this extension

Re: Inefficiency in parallel pg_restore with many tables

2023-07-15 Thread Andres Freund
Hi, On 2023-07-15 13:47:12 -0400, Tom Lane wrote: > I wonder if we could replace the sorted ready-list with a priority heap, > although that might be complicated by the fact that pop_next_work_item > has to be capable of popping something that's not necessarily the > largest remaining job.

Inefficiency in parallel pg_restore with many tables

2023-07-15 Thread Tom Lane
I looked into the performance gripe at [1] about pg_restore not making effective use of parallel workers when there are a lot of tables. I was able to reproduce that by dumping and parallel restoring 100K tables made according to this script: do $$ begin for i in 1..10 loop execute

Re: proposal: psql: show current user in prompt

2023-07-15 Thread Pavel Stehule
Hi pá 28. 4. 2023 v 7:00 odesílatel Pavel Stehule napsal: > > > čt 27. 4. 2023 v 7:39 odesílatel Pavel Stehule > napsal: > >> Hi >> >> rebased version + fix warning possibly uninitialized variable >> > > fix not unique function id > > Regards > > Pavel > only rebase > > >> Regards >> >>

Re: proposal: psql: show current user in prompt

2023-07-15 Thread Pavel Stehule
Hi po 8. 5. 2023 v 14:22 odesílatel Jelte Fennema napsal: > I'm very much in favor of adding a way to support reporting other GUC > variables than the current hardcoded list. This can be quite useful to > support some amount of session state in connection poolers. > > Some general feedback on

Re: Use of additional index columns in rows filtering

2023-07-15 Thread Tomas Vondra
Hi, here's a minor update of the patch, rebased to a current master and addressing a couple issues reported by cfbot. Most are minor tweaks, but the last one (4) is a somewhat more serious issue. 1) "tid" might have not been initialized in the IndexNext loop 2) add enable_indexonlyfilter GUC

Re: logicalrep_message_type throws an error

2023-07-15 Thread Euler Taveira
On Sat, Jul 15, 2023, at 4:27 AM, Amit Kapila wrote: > Do you have something like attached in mind? WFM. I would change the comment that says This function is called to provide context in the error ... to This message provides context in the error ... because this comment is not at the

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-15 Thread Amit Kapila
On Fri, Jul 14, 2023 at 3:07 PM Melih Mutlu wrote: > > Amit Kapila , 14 Tem 2023 Cum, 11:11 tarihinde şunu > yazdı: >> >> Yeah, it is quite surprising that Design#2 is worse than master. I >> suspect there is something wrong going on with your Design#2 patch. >> One area to check is whether

Re: SQL:2011 application time

2023-07-15 Thread jian he
On Fri, Jul 7, 2023 at 9:04 AM Paul A Jungwirth wrote: > > On Thu, Jul 6, 2023 at 1:13 AM Peter Eisentraut > wrote: > > > > I had talked to Paul about this offline a while ago. btree_gist to core > > is no longer considered a prerequisite. But Paul was planning to > > produce a new patch set

Re: logicalrep_message_type throws an error

2023-07-15 Thread Amit Kapila
On Tue, Jul 11, 2023 at 1:36 PM Masahiko Sawada wrote: > > On Thu, Jul 6, 2023 at 6:28 PM Amit Kapila wrote: > > > > One point to note is that the user may also get confused if the actual > > ERROR says message type as 'X' and the context says '???'. I feel in > > this case duplicate information