Re: remap the .text segment into huge pages at run time

2022-11-04 Thread John Naylor
On Sat, Nov 5, 2022 at 1:33 AM Andres Freund wrote: > > I wonder how far we can get with just using the linker hints to align > > sections. I know that the linux folks are working on promoting sufficiently > > aligned executable pages to huge pages too, and might have succeeded already. > > > >

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

2022-11-04 Thread Amit Kapila
On Fri, Nov 4, 2022 at 7:35 PM houzj.f...@fujitsu.com wrote: > > On Friday, November 4, 2022 4:07 PM Amit Kapila > wrote: > > > > On Thu, Nov 3, 2022 at 6:36 PM houzj.f...@fujitsu.com > > wrote: > > > > > > Thanks for the analysis and summary ! > > > > > > I tried to implement the above idea

Re: proposal: possibility to read dumped table's name from file

2022-11-04 Thread Julien Rouhaud
On Fri, Nov 04, 2022 at 02:37:05PM +0100, Pavel Stehule wrote: > pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud > napsal: > > > > > > > But one thing I noticed is that "optarg" looks wrong here: > > > > > > simple_string_list_append(>triggerNames, optarg); > > > > Ah indeed, good catch! Maybe

Re: pg_reload_conf() synchronously

2022-11-04 Thread Michael Paquier
On Fri, Nov 04, 2022 at 09:51:08PM -0700, Andres Freund wrote: > On 2022-11-04 23:35:21 -0400, Tom Lane wrote: >> True, but do we have any such cases? > > I know I hit it twice and gave up on the tests. Still, is there any need for a full-blown facility for the case of an individual backend?

Re: pg_reload_conf() synchronously

2022-11-04 Thread Andres Freund
Hi, On 2022-11-04 23:35:21 -0400, Tom Lane wrote: > Andres Freund writes: > > Worth noting that this doesn't necessarily suffice to avoid race conditions > > in > > tests, if the test depends on *other* backends having seen the configuration > > changes. > > True, but do we have any such

Re: pg_reload_conf() synchronously

2022-11-04 Thread Tom Lane
Andres Freund writes: > Worth noting that this doesn't necessarily suffice to avoid race conditions in > tests, if the test depends on *other* backends having seen the configuration > changes. True, but do we have any such cases? > It might be worth to use the global barrier mechanism to count

Re: Incorrect include file order in guc-file.l

2022-11-04 Thread Michael Paquier
On Fri, Nov 04, 2022 at 07:55:20AM +0700, John Naylor wrote: > I've removed it. Thanks. Aha, there were three more of these, as of rewriteheap.c, copydir.c and pgtz.c that I also forgot to clean up in bfb9dfd.. -- Michael signature.asc Description: PGP signature

Re: pg_reload_conf() synchronously

2022-11-04 Thread Andres Freund
Hi, On 2022-11-04 10:26:38 -0700, Gurjeet Singh wrote: > The attached patch makes the pg_reload_conf() function set > ConfigReloadPending to true, which will force the postgres main > command-processing loop to process and apply config changes _before_ > executing the next command. Worth noting

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-11-04 Thread Andres Freund
Hi, On 2022-11-04 08:56:13 -0400, Reid Thompson wrote: > From a8de5d29c0c6f10962181926a49ad4fec1e52bd1 Mon Sep 17 00:00:00 2001 > From: Reid Thompson > Date: Thu, 11 Aug 2022 12:01:25 -0400 > Subject: [PATCH] Add tracking of backend memory allocated to pg_stat_activity > > This new field

Re: CI and test improvements

2022-11-04 Thread Andres Freund
Hi, On 2022-11-04 18:54:12 -0500, Justin Pryzby wrote: > Subject: [PATCH 1/8] meson: PROVE is not required > Subject: [PATCH 3/8] meson: rename 'main' tasks to 'regress' and 'isolation' Pushed, thanks for the patches. > Subject: [PATCH 2/8] meson: other fixes for cygwin > > XXX: what about

Re: Direct I/O

2022-11-04 Thread Andres Freund
Hi, On 2022-11-04 14:47:31 -0500, Jim Nasby wrote: > On 11/1/22 2:36 AM, Thomas Munro wrote: > > Here is a patch to allow PostgreSQL to use $SUBJECT. It is from the > > This is exciting to see! There's two other items to add to the TODO list > before this would be ready for production: > > 1)

Re: CI and test improvements

2022-11-04 Thread Justin Pryzby
On Sat, Sep 10, 2022 at 03:05:42PM -0500, Justin Pryzby wrote: > On Sun, Aug 28, 2022 at 02:28:02PM -0700, Andres Freund wrote: > > On 2022-08-28 12:10:29 -0500, Justin Pryzby wrote: > > > On Sun, Aug 28, 2022 at 09:07:52AM -0700, Andres Freund wrote: > > > > > --- /dev/null > > > > > +++

Re: PL/pgSQL cursors should get generated portal names by default

2022-11-04 Thread Tom Lane
Jan Wieck writes: > I need to do some testing on this. I seem to recall that the naming was > originally done because a reference cursor is basically a named cursor > that can be handed around between functions and even the top SQL level > of the application. For the latter to work the

Re: PL/pgSQL cursors should get generated portal names by default

2022-11-04 Thread Jan Wieck
On 11/4/22 03:22, Pavel Stehule wrote: Hi st 2. 11. 2022 v 0:39 odesílatel Tom Lane > napsal: There's a complaint at [1] about how you can't re-use the same cursor variable name within a routine called from another routine that's already using that

Re: WIN32 pg_import_system_collations

2022-11-04 Thread Juan José Santamaría Flecha
On Mon, Oct 31, 2022 at 3:09 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: Thanks for taking a look into this patch. > > Consider this function you are introducing: > > +/* > + * Create a collation if the input locale is valid for so. > + * Also keeps track of the number of

Re: Refactor to introduce pg_strcoll().

2022-11-04 Thread Jeff Davis
On Tue, 2022-11-01 at 13:36 +0100, Peter Eisentraut wrote: > But I think putting the Windows UTF-8 code (win32_utf8_wcscoll()) > from > varstr_cmp() into pg_strcoll() might create future complications. > Normally, it would be up to varstr_sortsupport() to set up a > Windows/UTF-8 specific

Re: remap the .text segment into huge pages at run time

2022-11-04 Thread Andres Freund
Hi, On 2022-11-03 10:21:23 -0700, Andres Freund wrote: > > - Add a "cold" __asm__ filler function that just takes up space, enough to > > push the end of the .text segment over the next aligned boundary, or to > > ~8MB in size. > > I don't understand why this is needed - as long as the pages are

Re: User functions for building SCRAM secrets

2022-11-04 Thread Jacob Champion
On Tue, Nov 1, 2022 at 4:02 PM Jacob Champion wrote: > I guess I have fewer problems with this use case in theory, but I'm > wondering if better client-side support might also solve this one as > well, without the additional complication. Is there a reason it would > not? To expand on this

Re: Commit fest 2022-11

2022-11-04 Thread Jacob Champion
On 11/3/22 22:18, Ian Lawrence Barwick wrote: > 2022年11月4日(金) 10:23 Ian Lawrence Barwick >: >> 2022年11月4日(金) 9:43 Justin Pryzby >: >> > If I'm not wrong, Jacob used the CF app to bulk-mail people about >> > patches not applying and similar

Re: Direct I/O

2022-11-04 Thread Jim Nasby
On 11/1/22 2:36 AM, Thomas Munro wrote: Hi, Here is a patch to allow PostgreSQL to use $SUBJECT. It is from the This is exciting to see! There's two other items to add to the TODO list before this would be ready for production: 1) work_mem. This is a significant impediment to scaling

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-11-04 Thread David Christensen
On Fri, Nov 4, 2022 at 1:38 PM Justin Pryzby wrote: > > > As I recall, that's due to relying on "cp". And "rsync", which > > > shouldn't be assumed to exist by regression tests). Will poke around other TAP tests to see if there's a more consistent interface, what perl version we can assume and

Re: Lockless queue of waiters in LWLock

2022-11-04 Thread Andres Freund
Hi, On 2022-11-03 14:50:11 +0400, Pavel Borisov wrote: > Or maybe there is another explanation for now small performance > difference around 20 connections described in [0]? > Thoughts? Using xadd is quite a bit cheaper than cmpxchg, and now every lock release uses a compare-exchange, I think.

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-11-04 Thread Justin Pryzby
On Fri, Nov 04, 2022 at 09:16:29AM -0500, David Christensen wrote: > On Nov 4, 2022, at 9:02 AM, Justin Pryzby wrote: > > On Fri, Nov 04, 2022 at 11:52:59AM +0900, Ian Lawrence Barwick wrote: > >> 2022年5月3日(火) 8:45 David Christensen : > >>> > >>> ...and pushing a couple fixups pointed out by

Re: remap the .text segment into huge pages at run time

2022-11-04 Thread Andres Freund
Hi, This nerd-sniped me badly :) On 2022-11-03 10:21:23 -0700, Andres Freund wrote: > On 2022-11-02 13:32:37 +0700, John Naylor wrote: > > I found an MIT-licensed library "iodlr" from Intel [3] that allows one to > > remap the .text segment to huge pages at program start. Attached is a > >

Re: Privileges on PUBLICATION

2022-11-04 Thread Antonin Houska
Mark Dilger wrote: > > On Nov 4, 2022, at 12:28 AM, Antonin Houska wrote: > > > > I thought about the whole concept a bit more and I doubt if the PUBLICATION > > privilege is the best approach. In particular, the user specified in CREATE > > SUBSCRIPTION ... CONNECTION ... (say "subscription

Re: [PATCH] Support % wildcard in extension upgrade filenames

2022-11-04 Thread Sandro Santilli
On Mon, Oct 31, 2022 at 01:55:05AM -0400, Regina Obe wrote: > > Sandro, can you submit an updated version of this patch. > I was testing it out and looked good first time. Attached updated version of the patch. > If everyone is okay with this patch, we'll go ahead and add tests and >

Re: Draft back-branch release notes are up

2022-11-04 Thread Justin Pryzby
On Fri, Nov 04, 2022 at 12:47:40PM -0400, Tom Lane wrote: > I committed draft release notes at > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=bc62182f0afe6b01fec45b8d26df03fc9de4599a + Fix planner failure with extended statistics on partitioned tables + (Richard

pg_reload_conf() synchronously

2022-11-04 Thread Gurjeet Singh
In an internal conversation it was seen that for some tests that want to enforce a behaviour, a behaviour that is controlled by a GUC, we _need_ to perform a sleep for an arbitrary amount of time. Alternatively, executing the rest of the test on a new connection also helps to get the expected

Re: Privileges on PUBLICATION

2022-11-04 Thread Mark Dilger
> On Nov 4, 2022, at 12:28 AM, Antonin Houska wrote: > > I thought about the whole concept a bit more and I doubt if the PUBLICATION > privilege is the best approach. In particular, the user specified in CREATE > SUBSCRIPTION ... CONNECTION ... (say "subscription user") needs to have SELECT >

Draft back-branch release notes are up

2022-11-04 Thread Tom Lane
I committed draft release notes at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=bc62182f0afe6b01fec45b8d26df03fc9de4599a Please send comments/corrections by Sunday. regards, tom lane

Re: Add non-blocking version of PQcancel

2022-11-04 Thread Jacob Champion
On 10/5/22 06:23, Jelte Fennema wrote: > In my first version of this patch, this is exactly what I did. But then > I got this feedback from Jacob, so I changed it to reusing PGconn: > >> [snip] > > I changed it back to use PGcancelConn as per your suggestion and I > agree that the API got

Re: heapgettup refactoring

2022-11-04 Thread Melanie Plageman
Thanks for the review! Attached is v2 with feedback addressed. On Mon, Oct 31, 2022 at 9:09 PM Andres Freund wrote: > > From 9d8b01960463dc64ff5b111d523ff80fce3017af Mon Sep 17 00:00:00 2001 > > From: Melanie Plageman > > Date: Mon, 31 Oct 2022 13:40:06 -0400 > > Subject: [PATCH v1 2/3] Turn

Re: psql: Add command to use extended query protocol

2022-11-04 Thread Peter Eisentraut
On 02.11.22 01:18, Corey Huinker wrote:      SELECT $1, $2 \gp 'foo' 'bar' I think this is a great idea, but I foresee people wanting to send that output to a file or a pipe like \g allows. If we assume everything after the \gp is a param, don't we paint ourselves into a corner? Any

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

2022-11-04 Thread Masahiko Sawada
On Thu, Nov 3, 2022 at 1:59 PM John Naylor wrote: > > On Mon, Oct 31, 2022 at 12:47 PM Masahiko Sawada > wrote: > > > > I've attached v8 patches. 0001, 0002, and 0003 patches incorporated > > the comments I got so far. 0004 patch is a DSA support patch for PoC. > > Thanks for the new patchset.

Re: New docs chapter on Transaction Management and related changes

2022-11-04 Thread Laurenz Albe
On Sat, 2022-10-15 at 21:08 -0400, Bruce Momjian wrote: > I therefore merged all three paragraphs into > one and tried to make the text saner;  release_savepoint.sgml diff > attached, URL content updated. I wanted to have a look at this, but I am confused. The original patch was much bigger. Is

Re: Schema variables - new implementation for Postgres 15

2022-11-04 Thread Dmitry Dolgov
> On Fri, Nov 04, 2022 at 03:17:18PM +0100, Pavel Stehule wrote: > > I've stumbled upon something that looks weird to me (inspired by the > > example from tests): > > > > =# create variable v2 as int; > > =# let v2 = 3; > > =# create view vv2 as select coalesce(v2, 0) + 1000 as result

Re: Schema variables - new implementation for Postgres 15

2022-11-04 Thread Pavel Stehule
Hi pá 4. 11. 2022 v 15:08 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Fri, Nov 04, 2022 at 05:58:06AM +0100, Pavel Stehule wrote: > > Hi > > > > fix clang warning > > I've stumbled upon something that looks weird to me (inspired by the > example from tests): > > =#

Re: Schema variables - new implementation for Postgres 15

2022-11-04 Thread Julien Rouhaud
Hi, On Fri, Nov 04, 2022 at 03:07:48PM +0100, Dmitry Dolgov wrote: > > On Fri, Nov 04, 2022 at 05:58:06AM +0100, Pavel Stehule wrote: > > Hi > > > > fix clang warning > > I've stumbled upon something that looks weird to me (inspired by the > example from tests): > > =# create variable v2 as

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-11-04 Thread David Christensen
On Nov 4, 2022, at 9:02 AM, Justin Pryzby wrote: > > On Fri, Nov 04, 2022 at 11:52:59AM +0900, Ian Lawrence Barwick wrote: >> 2022年5月3日(火) 8:45 David Christensen : >>> >>> ...and pushing a couple fixups pointed out by cfbot, so here's v4. >> >> cfbot reports the patch no longer applies [1].

Re: Schema variables - new implementation for Postgres 15

2022-11-04 Thread Dmitry Dolgov
> On Fri, Nov 04, 2022 at 05:58:06AM +0100, Pavel Stehule wrote: > Hi > > fix clang warning I've stumbled upon something that looks weird to me (inspired by the example from tests): =# create variable v2 as int; =# let v2 = 3; =# create view vv2 as select coalesce(v2, 0) + 1000 as

Re: Fix proposal for comparaison bugs in PostgreSQL::Version

2022-11-04 Thread Jehan-Guillaume de Rorthais
On Thu, 3 Nov 2022 13:11:18 -0500 Justin Pryzby wrote: > On Tue, Jun 28, 2022 at 06:17:40PM -0400, Andrew Dunstan wrote: > > Nice catch, but this looks like massive overkill. I think we can very > > simply fix the test in just a few lines of code, instead of a 190 line > > fix and a 130 line TAP

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

2022-11-04 Thread houzj.f...@fujitsu.com
On Friday, November 4, 2022 4:07 PM Amit Kapila wrote: > > On Thu, Nov 3, 2022 at 6:36 PM houzj.f...@fujitsu.com > wrote: > > > > Thanks for the analysis and summary ! > > > > I tried to implement the above idea and here is the patch set. > > > > Few comments on v42-0001 >

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-11-04 Thread Justin Pryzby
On Fri, Nov 04, 2022 at 11:52:59AM +0900, Ian Lawrence Barwick wrote: > 2022年5月3日(火) 8:45 David Christensen : > > > > ...and pushing a couple fixups pointed out by cfbot, so here's v4. > > cfbot reports the patch no longer applies [1]. As CommitFest 2022-11 is > currently underway, this would be

Re: proposal: possibility to read dumped table's name from file

2022-11-04 Thread Pavel Stehule
pá 4. 11. 2022 v 14:28 odesílatel Julien Rouhaud napsal: > On Fri, Nov 04, 2022 at 07:19:27AM -0500, Justin Pryzby wrote: > > On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > > > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > > > čt 3. 11. 2022 v 5:09

Re: proposal: possibility to read dumped table's name from file

2022-11-04 Thread Julien Rouhaud
On Fri, Nov 04, 2022 at 07:19:27AM -0500, Justin Pryzby wrote: > On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > > čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud > > > napsal: > > > updated patch attached > >

Re: Add index scan progress to pg_stat_progress_vacuum

2022-11-04 Thread Imseih (AWS), Sami
Resubmitting patches with proper format. Thanks Sami Imseih Amazon Web Services (AWS) v14-0002-Function-to-return-currently-vacuumed-or-cleaned.patch Description: v14-0002-Function-to-return-currently-vacuumed-or-cleaned.patch

Re: Add explicit casts in four places to simplehash.h

2022-11-04 Thread Tom Lane
David Geier writes: > On 11/3/22 15:50, Tom Lane wrote: >> The bigger picture here is that we do actually endeavor to keep >> (most of) our headers C++ clean, but our tool cpluspluscheck misses >> these problems because it doesn't try to use these macros. >> I wonder whether there is a way to do

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-11-04 Thread Reid Thompson
On Fri, 2022-11-04 at 11:06 +0100, Drouvot, Bertrand wrote: > Hi, > > It looks like the patch does not apply anymore since b1099eca8f. > > Regards, > Thanks, rebased to current master attached. -- Reid Thompson Senior Software Engineer Crunchy Data, Inc. reid.thomp...@crunchydata.com

Re: Lockless queue of waiters in LWLock

2022-11-04 Thread Alexander Korotkov
Hi, Pavel! On Thu, Nov 3, 2022 at 1:51 PM Pavel Borisov wrote: > > I'm planning to gather more detailed statistics on different > > LWLockAcquire calls soon to understand prospects for further > > optimizations. > > So, I've made more measurements. > > 1. Applied measuring patch 0001 to a patch

Re: proposal: possibility to read dumped table's name from file

2022-11-04 Thread Justin Pryzby
On Fri, Nov 04, 2022 at 07:59:01PM +0800, Julien Rouhaud wrote: > On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > > čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud napsal: > > updated patch attached > > > > big thanks for these comments and tips > > Thanks for the updated patch!

Re: proposal: possibility to read dumped table's name from file

2022-11-04 Thread Julien Rouhaud
On Thu, Nov 03, 2022 at 10:22:15PM +0100, Pavel Stehule wrote: > čt 3. 11. 2022 v 5:09 odesílatel Julien Rouhaud napsal: > > > > > Is there any interest with the initial pg_strip_crlf? AFAICT all the rest > > of > > the code will ignore such caracters using isspace() so it wouldn't change > >

Re: Allow single table VACUUM in transaction block

2022-11-04 Thread Rahila Syed
Hi, On Fri, Nov 4, 2022 at 2:39 PM Simon Riggs wrote: > Hi Rahila, > > Thanks for your review. > > On Fri, 4 Nov 2022 at 07:37, Rahila Syed wrote: > > >> I would like to bring up a few points that I came across while looking > into the vacuum code. > >> > >> 1. As a result of this change to

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

2022-11-04 Thread Amit Kapila
On Fri, Nov 4, 2022 at 1:36 PM Amit Kapila wrote: > > On Thu, Nov 3, 2022 at 6:36 PM houzj.f...@fujitsu.com > wrote: > > > > Thanks for the analysis and summary ! > > > > I tried to implement the above idea and here is the patch set. > > > > Few comments on v42-0001 > ===

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-11-04 Thread Ashutosh Sharma
On Fri, Nov 4, 2022 at 3:29 PM Amit Kapila wrote: > > On Thu, Nov 3, 2022 at 4:49 PM Amit Kapila wrote: > > > > On Mon, Sep 19, 2022 at 8:09 PM Ashutosh Sharma > > wrote: > > > > > > Thanks for the clarification. Attached is the patch with the changes. > > > Please have a look. > > > > > > >

RE: Improve logging when using Huge Pages

2022-11-04 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Thanks for your comment. I understand that some people don't like noise log. However, I don't understand the feeling of disliking the one-line log that is output when the instance is started. In both MySQL and Oracle Database, a log is output if it fails to acquire HugePages with the same

Re: explain_regress, explain(MACHINE), and default to explain(BUFFERS) (was: BUFFERS enabled by default in EXPLAIN (ANALYZE))

2022-11-04 Thread Laurenz Albe
Thanks for the updated patch set! On Fri, 2022-10-28 at 17:59 -0500, Justin Pryzby wrote: > > > 0004, 0005, 0006, 0007: EXPLAIN (MACHINE) > > > >   I think it is confusing that these are included in this patch set. > >   EXPLAIN (MACHINE OFF) is similar to "explain_regress = on", only it goes

Re: Error for row-level triggers with transition tables on partitioned tables

2022-11-04 Thread Etsuro Fujita
On Thu, Nov 3, 2022 at 2:20 AM Tom Lane wrote: > Etsuro Fujita writes: > > We do not currently allow row-level triggers on partitions to have > > transition tables either, and the error message for that is “ROW > > triggers with transition tables are not supported on partitions.”. > > How about

found the document `README.parallel` to be a little bit incorrect

2022-11-04 Thread qinghao huang
Hi hackers, Recently, I'm looking into the implementation of parallel index building. And I noticed that in `README.parallel` we mentioned that `we allow no writes to the database and no DDL` . But if I understand it correctly, index building as one significant DDL is now supporting

Re: Logical replication timeout problem

2022-11-04 Thread Fabrice Chapuis
Hello Wang, I tested the draft patch in my lab for Postgres 14.4, the refresh of the materialized view ran without generating the timeout on the worker. Do you plan to propose this patch at the next commit fest. Regards, Fabrice On Wed, Oct 19, 2022 at 10:15 AM wangw.f...@fujitsu.com <

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-11-04 Thread Drouvot, Bertrand
Hi, On 10/25/22 8:59 PM, Reid Thompson wrote: On Tue, 2022-10-25 at 14:51 -0400, Reid Thompson wrote: patch rebased to current master actually attach the patch It looks like the patch does not apply anymore since b1099eca8f. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-11-04 Thread Amit Kapila
On Thu, Nov 3, 2022 at 4:49 PM Amit Kapila wrote: > > On Mon, Sep 19, 2022 at 8:09 PM Ashutosh Sharma wrote: > > > > Thanks for the clarification. Attached is the patch with the changes. > > Please have a look. > > > > LGTM. I'll push this tomorrow unless there are any other >

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

2022-11-04 Thread Hayato Kuroda (Fujitsu)
> While testing yours, I found that the leader apply worker has been crashed in > the > following case. > I will dig the failure more, but I reported here for records. I found a reason why the leader apply worker crasehes. In parallel_apply_free_worker() the leader sends the pending message to

Re: Support logical replication of DDLs

2022-11-04 Thread vignesh C
On Wed, 2 Nov 2022 at 05:13, vignesh C wrote: > > On Mon, 31 Oct 2022 at 16:17, vignesh C wrote: > > > > On Thu, 27 Oct 2022 at 16:02, vignesh C wrote: > > > > > > On Thu, 27 Oct 2022 at 02:09, Zheng Li wrote: > > > > > > > > > Adding support for deparsing of CREATE/ALTER/DROP LANGUAGE for ddl

Re: Proposal to provide the facility to set binary format output for specific OID's per session

2022-11-04 Thread Dave Cramer
Hi Ian, Thanks, will do Dave Cramer On Thu, 3 Nov 2022 at 21:36, Ian Lawrence Barwick wrote: > 2022年9月6日(火) 21:32 Dave Cramer : > > > > > > > > > > On Tue, 6 Sept 2022 at 02:30, Ibrar Ahmed wrote: > >> > >> > >> > >> On Fri, Aug 12, 2022 at 5:48 PM Dave Cramer > wrote: > >>> > >>> > >>> >

Re: Pluggable toaster

2022-11-04 Thread Aleksander Alekseev
Hi again, > [1]: > https://www.postgresql.org/message-id/flat/CAJ7c6TOtAB0z1UrksvGTStNE-herK-43bj22=5xvbg7s4vr...@mail.gmail.com I added a link but forgot to use it, d'oh! Please note that if the goal is to merely implement "type-aware sub-TOASTers" then compression dictionaries [1] arguably

Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)

2022-11-04 Thread Jehan-Guillaume de Rorthais
On Thu, 3 Nov 2022 20:44:16 +0100 Alvaro Herrera wrote: > On 2022-Oct-05, Alvaro Herrera wrote: > > > I've been giving the patches a look and it caused me to notice two > > additional bugs in the same area: > > > > - FKs in partitions are sometimes marked NOT VALID. This is because of > >

Re: Pluggable toaster

2022-11-04 Thread Aleksander Alekseev
Hi Nikita, > Setting TOAST for table and database is a subject for discussion. There is > already default > Toaster. Also, there is not much sense in setting Jsonb Toaster as default > even for table, do > not say database, because table could contain other TOASTable columns not of > Json

Re: Add SHELL_EXIT_CODE to psql

2022-11-04 Thread Corey Huinker
Oops, that sample output was from a previous run, should have been: -- SHELL_EXIT_CODE is undefined \echo :SHELL_EXIT_CODE :SHELL_EXIT_CODE -- bad \! \! borp sh: line 1: borp: command not found \echo :SHELL_EXIT_CODE 127 -- bad backtick \set var `borp` sh: line 1: borp: command not found \echo

Re: Make ON_ERROR_STOP stop on shell script failure

2022-11-04 Thread Corey Huinker
> > I think it'd be a lot better to expose the script status to psql. > (without having to write "foo; echo status=$?"). > I agree, and I hacked up a proof of concept, but started another thread at

Re: Allow single table VACUUM in transaction block

2022-11-04 Thread Simon Riggs
Hi Rahila, Thanks for your review. On Fri, 4 Nov 2022 at 07:37, Rahila Syed wrote: >> I would like to bring up a few points that I came across while looking into >> the vacuum code. >> >> 1. As a result of this change to allow VACUUM inside a user transaction, I >> think there is some

Add SHELL_EXIT_CODE to psql

2022-11-04 Thread Corey Huinker
Over in https://www.postgresql.org/message-id/eaf326ad693e74eba068f33a7f518...@oss.nttdata.com Justin Pryzby suggested that psql might need the ability to capture the shell exit code. This is a POC patch that does that, but doesn't touch on the ON_ERROR_STOP stuff. I've added some very

Re: [PATCH] Compression dictionaries for JSONB

2022-11-04 Thread Aleksander Alekseev
Hi hackers, > For the record, Nikita and I agreed offlist that Nikita will join this > effort as a co-author in order to implement the suggested improvements > (and perhaps some improvements that were not suggested yet). Meanwhile > I'm going to keep the current version of the patch up to date

Re: Moving forward with TDE

2022-11-04 Thread Dilip Kumar
On Fri, Nov 4, 2022 at 3:36 AM David Christensen wrote: > > > Unless somebody in the community remembers open questions/issues with > > TDE that were never addressed I suggest simply iterating with our > > usual testing/reviewing process. For now I'm going to change the > > status of the CF entry

Re: Privileges on PUBLICATION

2022-11-04 Thread Antonin Houska
Amit Kapila wrote: > On Thu, Nov 3, 2022 at 11:12 AM Antonin Houska wrote: > > > > Peter Eisentraut wrote: > > > > > The CF entry is about privileges on publications. Please rebase that > > > patch > > > and repost it so that the CF app and the CF bot are up to date. > > > > The rebased

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-11-04 Thread Drouvot, Bertrand
Hi, On 7/28/22 11:38 AM, Nitin Jadhav wrote: To understand the performance effects of the above, I have taken the average of five checkpoints with the patch and without the patch in my environment. Here are the results. With patch: 269.65 s Without patch: 269.60 s Those look like timed

Re: Add explicit casts in four places to simplehash.h

2022-11-04 Thread David Geier
On 11/3/22 15:50, Tom Lane wrote: Seems reasonable, so done (I fixed one additional spot you missed). Thanks! The bigger picture here is that we do actually endeavor to keep (most of) our headers C++ clean, but our tool cpluspluscheck misses these problems because it doesn't try to use these

Reviving lost replication slots

2022-11-04 Thread sirisha chamarthi
Hi, A replication slot can be lost when a subscriber is not able to catch up with the load on the primary and the WAL to catch up exceeds max_slot_wal_keep_size. When this happens, target has to be reseeded (pg_dump) from the scratch and this can take longer. I am investigating the options to

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

2022-11-04 Thread Amit Kapila
On Thu, Nov 3, 2022 at 6:36 PM houzj.f...@fujitsu.com wrote: > > Thanks for the analysis and summary ! > > I tried to implement the above idea and here is the patch set. > Few comments on v42-0001 === 1. + /* + * Set the xact_state flag in the leader instead of the + *

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

2022-11-04 Thread Hayato Kuroda (Fujitsu)
Dear Hou, Thank you for updating the patch! While testing yours, I found that the leader apply worker has been crashed in the following case. I will dig the failure more, but I reported here for records. 1. Change macros for forcing to write a temporary file. ``` -#define CHANGES_THRESHOLD

Re: Allow single table VACUUM in transaction block

2022-11-04 Thread Rahila Syed
Hi Simon, On Fri, Nov 4, 2022 at 10:15 AM Rahila Syed wrote: > Hi Simon, > > On Thu, Nov 3, 2022 at 3:53 PM Simon Riggs > wrote: > >> On Tue, 1 Nov 2022 at 23:56, Simon Riggs >> wrote: >> >> > > I haven't checked the rest of the patch, but +1 for allowing VACUUM >> FULL >> > > within a user

Re: Privileges on PUBLICATION

2022-11-04 Thread Antonin Houska
Peter Eisentraut wrote: > On 03.11.22 01:43, Antonin Houska wrote: > > Peter Eisentraut wrote: > > > >> The CF entry is about privileges on publications. Please rebase that patch > >> and repost it so that the CF app and the CF bot are up to date. > > The rebased patch (with regression tests

Re: PL/pgSQL cursors should get generated portal names by default

2022-11-04 Thread Pavel Stehule
Hi st 2. 11. 2022 v 0:39 odesílatel Tom Lane napsal: > There's a complaint at [1] about how you can't re-use the same > cursor variable name within a routine called from another routine > that's already using that name. The complaint is itself a bit > under-documented, but I believe it is