Re: Allowing REINDEX to have an optional name

2022-05-10 Thread Michael Paquier
On Wed, May 11, 2022 at 09:54:17AM +0530, Ashutosh Bapat wrote: > REINDEX DATABASE does system catalogs as well > REINDEX DATABASE does everything except system catalogs > > That's confusing and unintuitive. Agreed. Nobody is going to remember the difference. REINDEX's parsing grammar is

Re: Estimating HugePages Requirements?

2022-05-10 Thread Michael Paquier
On Tue, May 10, 2022 at 09:12:49AM -0700, Nathan Bossart wrote: > AFAICT you need to set log_min_messages to at least DEBUG3 to see extra > output for the non-runtime-computed GUCs, so it might not be worth the > added complexity. This set of messages is showing up for ages with zero complaints

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-05-10 Thread Noah Misch
On Wed, May 11, 2022 at 10:29:44AM +0900, Michael Paquier wrote: > On Mon, May 09, 2022 at 12:18:39PM +0900, Michael Paquier wrote: > > All these fixes lead me to the attached patch. > > I have applied this stuff as of 7dd3ee5, in time for beta1, and closed > the open item. One difference is

Re: Unstable tests for recovery conflict handling

2022-05-10 Thread Thomas Munro
On Thu, Apr 28, 2022 at 5:50 AM Mark Dilger wrote: > psql::1: ERROR: prepared transaction with identifier "xact_012_1" > does not exist > [10:26:16.314](1.215s) not ok 11 - Rollback of PGPROC_MAX_CACHED_SUBXIDS+ > prepared transaction on promoted standby > [10:26:16.314](0.000s) >

Re: Perform streaming logical transactions by background workers and parallel apply

2022-05-10 Thread Amit Kapila
On Wed, May 11, 2022 at 9:35 AM Masahiko Sawada wrote: > > On Tue, May 10, 2022 at 5:59 PM Amit Kapila wrote: > > > > On Tue, May 10, 2022 at 10:39 AM Masahiko Sawada > > wrote: > > > > > > Having it optional seems a good idea. BTW can the user configure how > > > many apply bgworkers can be

Re: Perform streaming logical transactions by background workers and parallel apply

2022-05-10 Thread Amit Kapila
On Wed, May 11, 2022 at 9:17 AM Masahiko Sawada wrote: > > On Tue, May 10, 2022 at 6:10 PM Amit Kapila wrote: > > > > On Tue, May 10, 2022 at 10:35 AM Masahiko Sawada > > wrote: > > > > > > On Wed, May 4, 2022 at 12:50 PM Amit Kapila > > > wrote: > > > > > > > > > > > > I think the other

Re: Support logical replication of DDLs

2022-05-10 Thread Masahiko Sawada
On Wed, May 11, 2022 at 1:01 AM Zheng Li wrote: > > > > > I agree that it adds to our maintainability effort, like every time we > > > > enhance any DDL or add a new DDL that needs to be replicated, we > > > > probably need to change the deparsing code. But OTOH this approach > > > > seems to

Re: Allowing REINDEX to have an optional name

2022-05-10 Thread Ashutosh Bapat
On Tue, May 10, 2022 at 7:30 PM Simon Riggs wrote: > On Tue, 10 May 2022 at 14:47, Ashutosh Bapat > wrote: > > > > On Tue, May 10, 2022 at 2:43 PM Simon Riggs > > wrote: > > > > > > A minor issue, and patch. > > > > > > REINDEX DATABASE currently requires you to write REINDEX DATABASE > > >

Re: make MaxBackends available in _PG_init

2022-05-10 Thread Nathan Bossart
On Wed, May 11, 2022 at 11:18:29AM +0900, Michael Paquier wrote: > 0002 looks pretty good from here. If it were me, I would apply 0002 > first to avoid the extra tweak in pg_stat_statements with _PG_fini in > 0001. I swapped 0001 and 0002 in v8. > Regarding 0001, I have spotted an extra issue

Re: Perform streaming logical transactions by background workers and parallel apply

2022-05-10 Thread Masahiko Sawada
On Tue, May 10, 2022 at 5:59 PM Amit Kapila wrote: > > On Tue, May 10, 2022 at 10:39 AM Masahiko Sawada > wrote: > > > > On Wed, May 4, 2022 at 8:44 AM Peter Smith wrote: > > > > > > On Tue, May 3, 2022 at 5:16 PM Peter Smith wrote: > > > > > > > ... > > > > > > > Avoiding unexpected

Re: First draft of the PG 15 release notes

2022-05-10 Thread David Rowley
On Wed, 11 May 2022 at 15:41, Bruce Momjian wrote: > > On Tue, May 10, 2022 at 08:31:17PM -0500, Justin Pryzby wrote: > > | Improve the performance of window functions that use row_number(), > > rank(), and count() (David Rowley) > > > > The essential feature is a new kind of "prosupport", which

Re: strange slow query - lost lot of time somewhere

2022-05-10 Thread David Rowley
On Tue, 10 May 2022 at 14:22, Justin Pryzby wrote: > On Fri, May 06, 2022 at 09:27:57PM +1200, David Rowley wrote: > > I'm very tempted to change the EXPLAIN output in at least master to > > display the initial and final (maximum) hash table sizes. Wondering if > > anyone would object to that? >

Re: Perform streaming logical transactions by background workers and parallel apply

2022-05-10 Thread Masahiko Sawada
On Tue, May 10, 2022 at 6:10 PM Amit Kapila wrote: > > On Tue, May 10, 2022 at 10:35 AM Masahiko Sawada > wrote: > > > > On Wed, May 4, 2022 at 12:50 PM Amit Kapila wrote: > > > > > > On Tue, May 3, 2022 at 9:45 AM Amit Kapila > > > wrote: > > > > > > > > On Mon, May 2, 2022 at 5:06 PM

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 08:31:17PM -0500, Justin Pryzby wrote: > | Remove incorrect duplicate partition tables in system view > pg_publication_tables (Hou Zhijie) > > should say "partitions" ? > "Do not show partitions whose parents are also published" (is that accurate?) I went with:

Re: bogus: logical replication rows/cols combinations

2022-05-10 Thread Amit Kapila
On Wed, May 11, 2022 at 12:35 AM Tomas Vondra wrote: > > On 5/9/22 05:45, Amit Kapila wrote: > > On Sun, May 8, 2022 at 11:41 PM Tomas Vondra > > wrote: > >> > >> On 5/7/22 07:36, Amit Kapila wrote: > >>> On Mon, May 2, 2022 at 6:11 PM Alvaro Herrera > >>> wrote: > > On 2022-May-02,

Re: Column Filtering in Logical Replication

2022-05-10 Thread Amit Kapila
On Tue, May 10, 2022 at 7:25 PM Jonathan S. Katz wrote: > > On 4/19/22 12:53 AM, Amit Kapila wrote: > > On Tue, Apr 19, 2022 at 6:58 AM Masahiko Sawada > > wrote: > >> > >> +1. I also think it's a bug so back-patching makes sense to me. > >> > > > > Pushed. Thanks Tomas and Sawada-San. > > This

Re: First draft of the PG 15 release notes (sorting)

2022-05-10 Thread David Rowley
On Wed, 11 May 2022 at 14:38, Justin Pryzby wrote: > > On Wed, May 11, 2022 at 12:39:41PM +1200, David Rowley wrote: > > I think the sort improvements done in v15 are worth a mention under > > General Performance. The commits for this were 91e9e89dc, 40af10b57 > > and 697492434. I've been

Re: First draft of the PG 15 release notes

2022-05-10 Thread Jonathan S. Katz
On 5/10/22 10:31 PM, David Rowley wrote: On Wed, 11 May 2022 at 14:02, Bruce Momjian wrote: On Wed, May 11, 2022 at 12:39:41PM +1200, David Rowley wrote: I think the sort improvements done in v15 are worth a mention under General Performance. The commits for this were 91e9e89dc, 40af10b57

Re: First draft of the PG 15 release notes

2022-05-10 Thread Jonathan S. Katz
On 5/10/22 9:48 PM, Bruce Momjian wrote: On Tue, May 10, 2022 at 09:16:33PM -0400, Tom Lane wrote: "Jonathan S. Katz" writes: On 5/10/22 4:18 PM, Bruce Momjian wrote: | Allow libpq's SSL private to be owned by the root user (David Steele) This was backpatched to all supported versions[1].

Re: First draft of the PG 15 release notes (sorting)

2022-05-10 Thread Justin Pryzby
On Wed, May 11, 2022 at 12:39:41PM +1200, David Rowley wrote: > I think the sort improvements done in v15 are worth a mention under > General Performance. The commits for this were 91e9e89dc, 40af10b57 > and 697492434. I've been running a few benchmarks between v14 and v15 > over the past few

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

2022-05-10 Thread osumi.takami...@fujitsu.com
On Monday, May 9, 2022 10:51 AM wangw.f...@fujitsu.com wrote: > Attach new patches. > The patch for HEAD: > 1. Modify the approach. Enhance the API of function > pg_get_publication_tables to handle one publication or an array of > publications. > The patch for REL14: > 1. Improve the table sync

Re: First draft of the PG 15 release notes

2022-05-10 Thread David Rowley
On Wed, 11 May 2022 at 14:02, Bruce Momjian wrote: > > On Wed, May 11, 2022 at 12:39:41PM +1200, David Rowley wrote: > > I think the sort improvements done in v15 are worth a mention under > > General Performance. The commits for this were 91e9e89dc, 40af10b57 > > and 697492434. I've been

Re: make MaxBackends available in _PG_init

2022-05-10 Thread Michael Paquier
On Tue, May 10, 2022 at 08:56:28AM -0700, Nathan Bossart wrote: > On Tue, May 10, 2022 at 05:55:12PM +0900, Michael Paquier wrote: >> I agree that removing support for the unloading part would be nice to >> clean up now on HEAD. Note that 0002 is missing the removal of one >> reference to

Re: typos

2022-05-10 Thread Justin Pryzby
I found a bunch more typos; a couple from codespell, and several which are the result of looking for previously-reported typos, like: time git log origin --grep '[tT]ypo' --word-diff -U1 |grep -Eo '\[-[[:lower:]]+-\]' |sed 's/^\[-//; s/-\]$//' |sort -u |grep -Fxvwf /usr/share/dict/words

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Wed, May 11, 2022 at 12:39:41PM +1200, David Rowley wrote: > On Wed, 11 May 2022 at 03:44, Bruce Momjian wrote: > > > > I have completed the first draft of the PG 15 release notes and you can > > see the results here: > > > > https://momjian.us/pgsql_docs/release-15.html > > Thanks

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 06:49:48PM -0700, Mark Dilger wrote: > > > > On May 10, 2022, at 6:46 PM, Bruce Momjian wrote: > > > > Allow logical replication to run as the owner of the publication > > Make that "owner of the subscription". This change operates on the > subscriber-side. Thanks,

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 08:28:54PM -0500, Justin Pryzby wrote: > On Tue, May 10, 2022 at 04:18:10PM -0400, Bruce Momjian wrote: > > > | Add the LZ4 compression method to pg_receivewal (Georgios Kokolatos) > > > | This is enabled via --compression-method=lz4 and requires binaries to > > > be built

Re: First draft of the PG 15 release notes

2022-05-10 Thread Mark Dilger
> On May 10, 2022, at 6:46 PM, Bruce Momjian wrote: > > Allow logical replication to run as the owner of the publication Make that "owner of the subscription". This change operates on the subscriber-side. — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 09:16:33PM -0400, Tom Lane wrote: > "Jonathan S. Katz" writes: > > On 5/10/22 4:18 PM, Bruce Momjian wrote: > > | Allow libpq's SSL private to be owned by the root user (David Steele) > > > This was backpatched to all supported versions[1]. While I'm a huge fan > > of

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 08:14:28PM -0400, Jonathan Katz wrote: > On 5/10/22 4:18 PM, Bruce Momjian wrote: > > On Tue, May 10, 2022 at 01:09:35PM -0500, Justin Pryzby wrote: > > > > > > | Allow libpq's SSL private to be owned by the root user (David Steele) > > > > > > private *key* > > > > I

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 03:12:18PM -0700, Mark Dilger wrote: > > > > On May 10, 2022, at 8:44 AM, Bruce Momjian wrote: > > > > I have completed the first draft of the PG 15 release notes and you can > > see the results here > > > Thanks, Bruce! This release note: > > • Prevent

Re: First draft of the PG 15 release notes

2022-05-10 Thread Justin Pryzby
| Remove incorrect duplicate partition tables in system view pg_publication_tables (Hou Zhijie) should say "partitions" ? "Do not show partitions whose parents are also published" (is that accurate?) | Allow system and TOAST B-tree indexes to efficiently store duplicates (Peter Geoghegan) |

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-05-10 Thread Michael Paquier
On Mon, May 09, 2022 at 12:18:39PM +0900, Michael Paquier wrote: > All these fixes lead me to the attached patch. I have applied this stuff as of 7dd3ee5, in time for beta1, and closed the open item. One difference is that I've added one backslash surrounding the double quote at the beginning

Re: First draft of the PG 15 release notes

2022-05-10 Thread Justin Pryzby
On Tue, May 10, 2022 at 04:18:10PM -0400, Bruce Momjian wrote: > > | Add the LZ4 compression method to pg_receivewal (Georgios Kokolatos) > > | This is enabled via --compression-method=lz4 and requires binaries to be > > built using --with-lz4. > > | Redesign pg_receivewal's compression options

Re: First draft of the PG 15 release notes

2022-05-10 Thread Tom Lane
"Jonathan S. Katz" writes: > On 5/10/22 4:18 PM, Bruce Momjian wrote: > | Allow libpq's SSL private to be owned by the root user (David Steele) > This was backpatched to all supported versions[1]. While I'm a huge fan > of this behavior change for a plethora of reasons, I'm not sure if this >

Re: First draft of the PG 15 release notes

2022-05-10 Thread David Rowley
On Wed, 11 May 2022 at 03:44, Bruce Momjian wrote: > > I have completed the first draft of the PG 15 release notes and you can > see the results here: > > https://momjian.us/pgsql_docs/release-15.html Thanks for doing that tedious work. I think the sort improvements done in v15 are

Re: First draft of the PG 15 release notes

2022-05-10 Thread Jonathan S. Katz
On 5/10/22 4:18 PM, Bruce Momjian wrote: On Tue, May 10, 2022 at 01:09:35PM -0500, Justin Pryzby wrote: | Allow libpq's SSL private to be owned by the root user (David Steele) private *key* I changed it to "private key file". This was backpatched to all supported versions[1]. While

Re: Query generates infinite loop

2022-05-10 Thread Tom Lane
Corey Huinker writes: >> Less sure about that. ISTM the reason that the previous proposal failed >> was that it introduced too much ambiguity about how to resolve >> unknown-type arguments. Wouldn't the same problems arise here? > By adding a different function, there is no prior behavior to

Re: Query generates infinite loop

2022-05-10 Thread Corey Huinker
> > Less sure about that. ISTM the reason that the previous proposal failed > was that it introduced too much ambiguity about how to resolve > unknown-type arguments. Wouldn't the same problems arise here? > If I recall, the problem was that the lack of a date-specific generate_series function

Re: BufferAlloc: don't take two simultaneous locks

2022-05-10 Thread Yura Sokolov
В Пт, 06/05/2022 в 10:26 -0400, Robert Haas пишет: > On Thu, Apr 21, 2022 at 6:58 PM Yura Sokolov wrote: > > At the master state: > > - SharedBufHash is not declared as HASH_FIXED_SIZE > > - get_hash_entry falls back to element_alloc too fast (just if it doesn't > > found free entry in current

Re: configure openldap crash warning

2022-05-10 Thread Tom Lane
I wrote: > OK. I will push the configure change once the release freeze lifts. And done. regards, tom lane

Re: First draft of the PG 15 release notes

2022-05-10 Thread Mark Dilger
> On May 10, 2022, at 8:44 AM, Bruce Momjian wrote: > > I have completed the first draft of the PG 15 release notes and you can > see the results here Thanks, Bruce! This release note: • Prevent logical replication into tables where the subscription owner is subject to the

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 05:45:01PM -0400, Bruce Momjian wrote: > I see your point --- postgres_fdw.application_name supports escapes that > the normal application_name does not. I combined all three items now. > Thanks. The new entry is: The URL is updated with the current commits:

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Wed, May 11, 2022 at 06:47:13AM +0900, Tatsuo Ishii wrote: > >> I have completed the first draft of the PG 15 release notes and you can > >> see the results here: > >> > >> https://momjian.us/pgsql_docs/release-15.html > > > >> Allow pgbench to retry after serialization and deadlock

Re: First draft of the PG 15 release notes

2022-05-10 Thread Tatsuo Ishii
>> I have completed the first draft of the PG 15 release notes and you can >> see the results here: >> >> https://momjian.us/pgsql_docs/release-15.html > >> Allow pgbench to retry after serialization and deadlock failures (Yugo >> Nagata, Marina Polyakova) > > This is in the

Re: JSON Functions and Operators Docs for v15

2022-05-10 Thread Andrew Dunstan
On 2022-05-04 We 15:14, Andrew Dunstan wrote: > On 2022-05-04 We 11:39, Tom Lane wrote: >> "David G. Johnston" writes: >>> Is there a thread I'm not finding where the upcoming JSON function >>> documentation is being made reasonably usable after doubling its size with >>> all the new JSON Table

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 04:02:35PM -0500, Justin Pryzby wrote: > On Tue, May 10, 2022 at 04:18:10PM -0400, Bruce Momjian wrote: > > > "separately" seems vague. Currently in v10-v13, extended stats are > > > collected > > > for partitioned tables, and collected for the "SELECT FROM ONLY"/parent

Re: First draft of the PG 15 release notes

2022-05-10 Thread Tatsuo Ishii
> I have completed the first draft of the PG 15 release notes and you can > see the results here: > > https://momjian.us/pgsql_docs/release-15.html > Allow pgbench to retry after serialization and deadlock failures (Yugo > Nagata, Marina Polyakova) This is in the "Additional Modules"

Re: First draft of the PG 15 release notes

2022-05-10 Thread Justin Pryzby
On Tue, May 10, 2022 at 04:18:10PM -0400, Bruce Momjian wrote: > > "separately" seems vague. Currently in v10-v13, extended stats are > > collected > > for partitioned tables, and collected for the "SELECT FROM ONLY"/parent case > > for inheritance parents. This changes to also collect stats

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 04:17:59PM -0400, Jonathan Katz wrote: > On 5/10/22 11:44 AM, Bruce Momjian wrote: > > I have completed the first draft of the PG 15 release notes and you can > > see the results here: > > > > https://momjian.us/pgsql_docs/release-15.html > > Thanks for pulling

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 12:44:56PM -0700, Nathan Bossart wrote: > On Tue, May 10, 2022 at 08:07:45PM +0200, Erik Rijkers wrote: > > And one strangely unfinished sentence: > > 'They also can only be' > > I suspect this meant to highlight that "postgres -C" with runtime-computed > GUCs doesn't work

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 01:09:35PM -0500, Justin Pryzby wrote: > Thanks for writting this. > > Comments from my first read: > > | This mode could cause server startup failure if the database server stopped > abruptly while in this mode. > > This sentence both begins and ends with "this mode".

Re: First draft of the PG 15 release notes

2022-05-10 Thread Jonathan S. Katz
On 5/10/22 11:44 AM, Bruce Momjian wrote: I have completed the first draft of the PG 15 release notes and you can see the results here: https://momjian.us/pgsql_docs/release-15.html Thanks for pulling this together. + Allow logical replication to transfer sequence changes I believe

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
Agreed on all of these, and URL contents updated. Thanks. --- On Tue, May 10, 2022 at 08:07:45PM +0200, Erik Rijkers wrote: > Op 10-05-2022 om 17:44 schreef Bruce Momjian: > > I have completed the first draft of the PG 15

Re: First draft of the PG 15 release notes

2022-05-10 Thread Nathan Bossart
On Tue, May 10, 2022 at 08:07:45PM +0200, Erik Rijkers wrote: > And one strangely unfinished sentence: > 'They also can only be' I suspect this meant to highlight that "postgres -C" with runtime-computed GUCs doesn't work if the server is running. -- Nathan Bossart Amazon Web Services:

Re: Column Filtering in Logical Replication

2022-05-10 Thread Jonathan S. Katz
On 5/10/22 3:17 PM, Tomas Vondra wrote: On 5/10/22 15:55, Jonathan S. Katz wrote: Hi, On 4/19/22 12:53 AM, Amit Kapila wrote: On Tue, Apr 19, 2022 at 6:58 AM Masahiko Sawada wrote: +1. I also think it's a bug so back-patching makes sense to me. Pushed. Thanks Tomas and Sawada-San.

Re: Column Filtering in Logical Replication

2022-05-10 Thread Tomas Vondra
On 5/10/22 15:55, Jonathan S. Katz wrote: > Hi, > > On 4/19/22 12:53 AM, Amit Kapila wrote: >> On Tue, Apr 19, 2022 at 6:58 AM Masahiko Sawada >> wrote: >>> >>> +1. I also think it's a bug so back-patching makes sense to me. >>> >> >> Pushed. Thanks Tomas and Sawada-San. > > This is still on

Re: bogus: logical replication rows/cols combinations

2022-05-10 Thread Tomas Vondra
On 5/9/22 05:45, Amit Kapila wrote: > On Sun, May 8, 2022 at 11:41 PM Tomas Vondra > wrote: >> >> On 5/7/22 07:36, Amit Kapila wrote: >>> On Mon, May 2, 2022 at 6:11 PM Alvaro Herrera >>> wrote: On 2022-May-02, Amit Kapila wrote: > I think it is possible to expose a

Re: First draft of the PG 15 release notes

2022-05-10 Thread Justin Pryzby
Thanks for writting this. Comments from my first read: | This mode could cause server startup failure if the database server stopped abruptly while in this mode. This sentence both begins and ends with "this mode". | This allows query hash operations to use double the amount of work_mem

Re: First draft of the PG 15 release notes

2022-05-10 Thread Erik Rijkers
Op 10-05-2022 om 17:44 schreef Bruce Momjian: I have completed the first draft of the PG 15 release notes and you can see the results here: https://momjian.us/pgsql_docs/release-15.html typos: 'accept empty array' should be 'to accept empty array' 'super users' should be

Re: First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
On Tue, May 10, 2022 at 04:58:50PM +0100, Geoff Winkless wrote: > I'm guessing this should be "trailing", not training? > > > Prevent numeric literals from having non-numeric training characters (Peter > > Eisentraut) Thanks, fixed. -- Bruce Momjian https://momjian.us EDB

Re: Estimating HugePages Requirements?

2022-05-10 Thread Nathan Bossart
On Mon, May 09, 2022 at 03:53:24PM +0900, Michael Paquier wrote: > I have looked at the patch posted at [1], and I don't quite understand > why you need the extra dance with log_min_messages. Why don't you > just set the GUC at the end of the code path in PostmasterMain() where > we print

Re: make MaxBackends available in _PG_init

2022-05-10 Thread Nathan Bossart
On Tue, May 10, 2022 at 05:55:12PM +0900, Michael Paquier wrote: > I agree that removing support for the unloading part would be nice to > clean up now on HEAD. Note that 0002 is missing the removal of one > reference to _PG_fini in xfunc.sgml ( markup). Oops, sorry about that. -- Nathan

Re: First draft of the PG 15 release notes

2022-05-10 Thread Geoff Winkless
I'm guessing this should be "trailing", not training? > Prevent numeric literals from having non-numeric training characters (Peter > Eisentraut)

Re: Support logical replication of DDLs

2022-05-10 Thread Zheng Li
> > > I agree that it adds to our maintainability effort, like every time we > > > enhance any DDL or add a new DDL that needs to be replicated, we > > > probably need to change the deparsing code. But OTOH this approach > > > seems to provide better flexibility. So, in the long run, maybe the > >

First draft of the PG 15 release notes

2022-05-10 Thread Bruce Momjian
I have completed the first draft of the PG 15 release notes and you can see the results here: https://momjian.us/pgsql_docs/release-15.html The feature count is similar to recent major releases: release-10 195 release-11 185 release-12 198 release-13 183

Re: JSON constructors and window functions

2022-05-10 Thread Jonathan S. Katz
On 5/10/22 10:25 AM, Andrew Dunstan wrote: I believe all the issues here have been fixed. See commit 112fdb3528 Thanks! I have updated Open Items. Jonathan OpenPGP_signature Description: OpenPGP digital signature

Re: JSON constructors and window functions

2022-05-10 Thread Andrew Dunstan
On 2022-05-10 Tu 09:51, Jonathan S. Katz wrote: > Hi, > > On 4/4/22 2:19 PM, Andrew Dunstan wrote: >> >> On 4/4/22 12:33, Andres Freund wrote: > >> It can, as Jaime's original post showed. >> >> But on further consideration I'm thinking this area needs some rework. >> ISTM that it might be a

Re: How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?

2022-05-10 Thread Ashutosh Sharma
On Tue, May 10, 2022 at 6:46 PM Bharath Rupireddy wrote: > > On Tue, May 10, 2022 at 6:16 PM Ashutosh Sharma wrote: > > > > Hi All, > > > > Currently, in postgres we have two different functions that are > > specially used to open the WAL files for reading and writing purposes. > > The first one

Re: Asynchronous and "direct" IO support for PostgreSQL.

2022-05-10 Thread Aleksander Alekseev
Hi Andres, > > The code is at > > https://github.com/anarazel/postgres/tree/aio > > Just FYI the cfbot says that this version of the patchset doesn't > apply anymore, and it seems that your branch was only rebased to > 43c1c4f (Sept. 21th) which doesn't rebase cleanly: After watching your recent

Re: Allowing REINDEX to have an optional name

2022-05-10 Thread Simon Riggs
On Tue, 10 May 2022 at 14:47, Ashutosh Bapat wrote: > > On Tue, May 10, 2022 at 2:43 PM Simon Riggs > wrote: > > > > A minor issue, and patch. > > > > REINDEX DATABASE currently requires you to write REINDEX DATABASE > > dbname, which makes this a little less usable than we might like. > > > >

Re: Column Filtering in Logical Replication

2022-05-10 Thread Jonathan S. Katz
Hi, On 4/19/22 12:53 AM, Amit Kapila wrote: On Tue, Apr 19, 2022 at 6:58 AM Masahiko Sawada wrote: +1. I also think it's a bug so back-patching makes sense to me. Pushed. Thanks Tomas and Sawada-San. This is still on the PG15 open items list[1] though marked as with a fix. Did dd4ab6fd

Re: JSON constructors and window functions

2022-05-10 Thread Jonathan S. Katz
Hi, On 4/4/22 2:19 PM, Andrew Dunstan wrote: On 4/4/22 12:33, Andres Freund wrote: It can, as Jaime's original post showed. But on further consideration I'm thinking this area needs some rework. ISTM that it might be a whole lot simpler and comprehensible to generate the json first without

Re: Allowing REINDEX to have an optional name

2022-05-10 Thread Ashutosh Bapat
On Tue, May 10, 2022 at 2:43 PM Simon Riggs wrote: > > A minor issue, and patch. > > REINDEX DATABASE currently requires you to write REINDEX DATABASE > dbname, which makes this a little less usable than we might like. > > REINDEX on the catalog can cause deadlocks, which also makes REINDEX >

Re: psql now shows zero elapsed time after an error

2022-05-10 Thread Fabien COELHO
Hello, Thanks for the catch and the proposed fix! Indeed, on errors the timing is not updated appropriately. ISTM that the best course is to update the elapsed time whenever a result is obtained, so that a sensible value is always available. See attached patch which is a variant of

Re: Proposal: add a debug message about using geqo

2022-05-10 Thread Ashutosh Bapat
If we add that information to EXPLAIN output, the user won't need access to server logs. May be we need it in both the places. On Tue, May 10, 2022 at 6:35 AM KAWAMOTO Masaya wrote: > > Hi, > > During query tuning, users may want to check if GEQO is used or not > to generate a plan. However,

Re: How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?

2022-05-10 Thread Bharath Rupireddy
On Tue, May 10, 2022 at 6:16 PM Ashutosh Sharma wrote: > > Hi All, > > Currently, in postgres we have two different functions that are > specially used to open the WAL files for reading and writing purposes. > The first one is XLogFileOpen() that is just used to open the WAL file > so that we can

How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?

2022-05-10 Thread Ashutosh Sharma
Hi All, Currently, in postgres we have two different functions that are specially used to open the WAL files for reading and writing purposes. The first one is XLogFileOpen() that is just used to open the WAL file so that we can write WAL data in it. And then we have another function named

Re: Support logical replication of DDLs

2022-05-10 Thread Amit Kapila
On Tue, May 10, 2022 at 4:59 PM Ajin Cherian wrote: > > On Fri, May 6, 2022 at 11:24 PM Amit Kapila wrote: > > As we have hacked CreatePublication function for this POC, the > > regression tests are not passing but we can easily change it so that > > we invoke new functionality with the syntax

Re: Allowing REINDEX to have an optional name

2022-05-10 Thread Bernd Helmle
Hi, Am Dienstag, dem 10.05.2022 um 10:13 +0100 schrieb Simon Riggs: > A minor issue, and patch. > > REINDEX DATABASE currently requires you to write REINDEX DATABASE > dbname, which makes this a little less usable than we might like. > > REINDEX on the catalog can cause deadlocks, which also

Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

2022-05-10 Thread Andrey Borodin
> 10 мая 2022 г., в 12:59, Bharath Rupireddy > написал(а): > > If okay, I can make the GUC behave this way - value 0 existing > behaviour i.e. no wait for sync repl ack, just process query cancels > and proc die interrupts immediately; value -1 wait unboundedly for the > ack; value > 0 wait

Re: Support logical replication of DDLs

2022-05-10 Thread Ajin Cherian
On Fri, May 6, 2022 at 11:24 PM Amit Kapila wrote: > As we have hacked CreatePublication function for this POC, the > regression tests are not passing but we can easily change it so that > we invoke new functionality with the syntax proposed in this thread or > with some other syntax and we shall

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-05-10 Thread John Naylor
On Tue, May 10, 2022 at 8:52 AM Masahiko Sawada wrote: > > Overall, radix tree implementations have good numbers. Once we got an > agreement on moving in this direction, I'll start a new thread for > that and move the implementation further; there are many things to do > and discuss: deletion,

Re: Hash index build performance tweak from sorting

2022-05-10 Thread Simon Riggs
On Sat, 30 Apr 2022 at 12:12, Amit Kapila wrote: > > Few comments on the patch: > 1. I think it is better to use DatumGetUInt32 to fetch the hash key as > the nearby code is using. > 2. You may want to change the below comment in HSpool > /* > * We sort the hash keys based on the buckets they

Re: Support logical replication of DDLs

2022-05-10 Thread Amit Kapila
On Tue, May 10, 2022 at 12:32 PM Masahiko Sawada wrote: > > On Wed, Apr 13, 2022 at 6:50 PM Amit Kapila wrote: > > > > On Wed, Apr 13, 2022 at 2:38 PM Dilip Kumar wrote: > > > > > > On Tue, Apr 12, 2022 at 4:25 PM Amit Kapila > > > wrote: > > > > > > > > > The *initial* DDL replication is a

Allowing REINDEX to have an optional name

2022-05-10 Thread Simon Riggs
A minor issue, and patch. REINDEX DATABASE currently requires you to write REINDEX DATABASE dbname, which makes this a little less usable than we might like. REINDEX on the catalog can cause deadlocks, which also makes REINDEX DATABASE not much use in practice, and is the reason there is no test

Re: Perform streaming logical transactions by background workers and parallel apply

2022-05-10 Thread Amit Kapila
On Tue, May 10, 2022 at 10:35 AM Masahiko Sawada wrote: > > On Wed, May 4, 2022 at 12:50 PM Amit Kapila wrote: > > > > On Tue, May 3, 2022 at 9:45 AM Amit Kapila wrote: > > > > > > On Mon, May 2, 2022 at 5:06 PM Masahiko Sawada > > > wrote: > > > > > > > > On Mon, May 2, 2022 at 6:09 PM Amit

Re: Perform streaming logical transactions by background workers and parallel apply

2022-05-10 Thread Amit Kapila
On Tue, May 10, 2022 at 10:39 AM Masahiko Sawada wrote: > > On Wed, May 4, 2022 at 8:44 AM Peter Smith wrote: > > > > On Tue, May 3, 2022 at 5:16 PM Peter Smith wrote: > > > > > ... > > > > > Avoiding unexpected differences like this is why I suggested the > > > option should have to be

Re: make MaxBackends available in _PG_init

2022-05-10 Thread Michael Paquier
On Fri, May 06, 2022 at 07:51:43PM -0400, Robert Haas wrote: > On Fri, May 6, 2022 at 5:15 PM Nathan Bossart > wrote: >> On Fri, May 06, 2022 at 08:27:11AM -0700, Nathan Bossart wrote: >> > +1, I'll put together a new patch set. >> >> As promised... > > Looks reasonable to me. 0001 looks

Re: Privileges on PUBLICATION

2022-05-10 Thread Antonin Houska
Amit Kapila wrote: > On Tue, May 10, 2022 at 12:16 AM Euler Taveira wrote: > > > > On Mon, May 9, 2022, at 11:09 AM, Antonin Houska wrote: > > > > Now that the user can specify rows and columns to be omitted from the > > logical > > replication [1], I suppose hiding rows and columns from the

Re: Privileges on PUBLICATION

2022-05-10 Thread Antonin Houska
Euler Taveira wrote: > On Mon, May 9, 2022, at 11:09 AM, Antonin Houska wrote: > > Now that the user can specify rows and columns to be omitted from the logical > replication [1], I suppose hiding rows and columns from the subscriber is an > important use case. However, since the

Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

2022-05-10 Thread Bharath Rupireddy
On Tue, May 10, 2022 at 1:18 PM Dilip Kumar wrote: > > On Mon, May 9, 2022 at 4:39 PM Andrey Borodin wrote: > > > > On 9 May 2022, at 14:44, Dilip Kumar wrote: > > > > > > IMHO, making it wait for some amount of time, based on GUC is not a > > > complete solution. It is just a hack to avoid

Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

2022-05-10 Thread Dilip Kumar
On Mon, May 9, 2022 at 4:39 PM Andrey Borodin wrote: > > On 9 May 2022, at 14:44, Dilip Kumar wrote: > > > > IMHO, making it wait for some amount of time, based on GUC is not a > > complete solution. It is just a hack to avoid the problem in some > > cases. > > Disallowing cancelation of

Re: Mark all GUC variable as PGDLLIMPORT

2022-05-10 Thread Michael Paquier
On Mon, May 09, 2022 at 09:23:47AM -0400, Robert Haas wrote: > Either of you please feel free to change these things, at least as far > as I'm concerned. Well, what about the attached then? While looking at all the headers in the tree, I have noticed that __pg_log_level is not marked, but we'd

Re: Support logical replication of DDLs

2022-05-10 Thread Masahiko Sawada
On Wed, Apr 13, 2022 at 6:50 PM Amit Kapila wrote: > > On Wed, Apr 13, 2022 at 2:38 PM Dilip Kumar wrote: > > > > On Tue, Apr 12, 2022 at 4:25 PM Amit Kapila wrote: > > > > > > > The *initial* DDL replication is a different problem than DDL > > > > replication. The > > > > former requires a