Re: add retry mechanism for achieving recovery target before emitting FATA error "recovery ended before configured recovery target was reached"

2021-10-22 Thread Bharath Rupireddy
On Sat, Oct 23, 2021 at 1:46 AM Jeff Davis wrote: > > On Fri, 2021-10-22 at 15:34 +0530, Bharath Rupireddy wrote: > > If the suggestion is to have the wait and retry logic embedded into > > the user-written restore_command, IMHO, it's not a good idea as the > > restore_command is external to the c

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

2021-10-22 Thread Noah Misch
On Wed, Oct 20, 2021 at 11:27:11AM -0700, Jeff Davis wrote: > On Wed, 2021-10-20 at 10:32 -0700, Mark Dilger wrote: > > I'd like to have a much clearer understanding of Noah's complaint > > first. There are multiple things to consider: (1) the role which > > owns the trigger, (2) the role which is

Re: [PATCH] Make ENOSPC not fatal in semaphore creation

2021-10-22 Thread Tom Lane
Mikhail writes: > +# OpenBSD 5.5 (2014) gained named POSIX semaphores. They work out of the box > +# without changing any sysctl settings, unlike System V semaphores. > +USE_NAMED_POSIX_SEMAPHORES=1 I tried this on an OpenBSD 6.0 image I had handy. The good news is that it works, and I can succ

Re: XTS cipher mode for cluster file encryption

2021-10-22 Thread Bruce Momjian
On Fri, Oct 22, 2021 at 11:36:37AM -0400, Stephen Frost wrote: > > I am not re-discuss using CTR for heap table. I mean use some CTR-like > > algorithm *only* for WAL encryption. My idea is exactly the same when you > > are typing "we hopefully aren't going to write different WAL records at the > >

Re: XTS cipher mode for cluster file encryption

2021-10-22 Thread Bruce Momjian
On Mon, Oct 18, 2021 at 12:37:39PM -0400, Robert Haas wrote: > > Thus, to me, it doesn't seem worth going down the XTS route, just to > > temporarily save a bit of implementation effort. We'll have to endure that > > pain anyway. > > I agree up to a point, but I do also kind of feel like we should

Re: XTS cipher mode for cluster file encryption

2021-10-22 Thread Bruce Momjian
On Tue, Oct 19, 2021 at 02:44:26PM -0400, Stephen Frost wrote: > There are ways around it. There likely always will be. We need to be > clear about what it provides and what it doesn't. We need to stop > telling ourselves that the only answer is a 100% solution and therefore > it's impossible to

Re: pg_dump versus ancient server versions

2021-10-22 Thread Alvaro Herrera
On 2021-Oct-22, Robert Haas wrote: > In fact, I get that same failure on every branch older than 9.2. I > expect I could work around that by disabling SSL or finding an older > version of OpenSSL that works the way those branches expect, but that > might not be the only problem, either. I just tr

Re: XTS cipher mode for cluster file encryption

2021-10-22 Thread Bruce Momjian
On Mon, Oct 18, 2021 at 11:56:03AM -0400, Stephen Frost wrote: > Greetings, > > * Tomas Vondra (tomas.von...@enterprisedb.com) wrote: > > On 10/15/21 21:22, Stephen Frost wrote: > > >Now, to address the concern around re-encrypting a block with the same > > >key+IV but different data and leaking w

Re: pg_dump versus ancient server versions

2021-10-22 Thread Tom Lane
Robert Haas writes: > Another thing to think about in that regard: how likely is that > PostgreSQL 7.4 and PostgreSQL 15 both compile and run on the same > operating system? I suspect the answer is "not very." I seem to recall > Greg Stark trying to compile really old versions of PostgreSQL for a

Re: parallelizing the archiver

2021-10-22 Thread Robert Haas
On Fri, Oct 22, 2021 at 1:42 PM Bossart, Nathan wrote: > Another approach would be to add a new initialization function (e.g., > PG_archive_init()) that would be used if the library is being loaded > from archive_library. Like before, you can use the library for both > shared_preload_libraries an

Re: pg_dump versus ancient server versions

2021-10-22 Thread Tom Lane
"David G. Johnston" writes: > On Fri, Oct 22, 2021 at 3:42 PM Tom Lane wrote: >> Anyway, I think the default answer is "revert 92316a458 and keep the >> compatibility goalposts where they are". But I wanted to open up a >> discussion to see if anyone likes the other approach better. > ... IMO,

Re: pg_dump versus ancient server versions

2021-10-22 Thread Robert Haas
On Fri, Oct 22, 2021 at 6:42 PM Tom Lane wrote: > So my first thought was just to revert 92316a458 and give up on it as > a bad idea. However ... does anyone actually still care about being > able to dump from such ancient servers? I think I recently heard about an 8.4 server still out there in

Re: Reserve prefixes for loaded libraries proposal

2021-10-22 Thread Florin Irion
Hi, Il giorno gio 21 ott 2021 alle ore 08:02 Michael Paquier < mich...@paquier.xyz> ha scritto: > > On Thu, Sep 30, 2021 at 11:54:04PM +0200, Florin Irion wrote: > > We could also help users get a warning if they set a parameter with the > > `SET` > > command. I've seen many cases where users make

Re: pg_dump versus ancient server versions

2021-10-22 Thread David G. Johnston
On Fri, Oct 22, 2021 at 3:42 PM Tom Lane wrote: > Anyway, I think the default answer is "revert 92316a458 and keep the > compatibility goalposts where they are". But I wanted to open up a > discussion to see if anyone likes the other approach better. > > [1] > https://www.postgresql.org/message-

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Michael Paquier
On Fri, Oct 22, 2021 at 10:49:38PM +0200, Daniel Gustafsson wrote: > On 22 Oct 2021, at 20:34, Tom Lane wrote: >> Ah, you're right, InsertPgAttributeTuples is the only other spot in >> that patch that's actually touching slots. I'd skimmed it a little >> too quickly. > > Thanks for confirming, u

pg_dump versus ancient server versions

2021-10-22 Thread Tom Lane
While doing some desultory testing, I realized that the commit I just pushed (92316a458) broke pg_dump against 8.0 servers: $ pg_dump -p5480 -s regression pg_dump: error: schema with OID 11 does not exist The reason turns out to be something I'd long forgotten about: except for the few "bootstrap

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Daniel Gustafsson
> On 22 Oct 2021, at 20:34, Tom Lane wrote: > > Daniel Gustafsson writes: >>> On 22 Oct 2021, at 15:38, Tom Lane wrote: >>> (By "here" I mean all of e3931d0, because it made the same omission >>> in several places.) > >> The attached fixes the the two ones I spotted, are there any I missed? >

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Tom Lane
I wrote: > Andres Freund writes: >> Wonder if we should mark simplehash's grow as noinline? Even with a single >> caller it seems better to not inline it to remove register allocator >> pressure. > Seems plausible --- you want me to go change that? Hmm, harder than it sounds. If I remove "inl

Re: add retry mechanism for achieving recovery target before emitting FATA error "recovery ended before configured recovery target was reached"

2021-10-22 Thread Jeff Davis
On Fri, 2021-10-22 at 15:34 +0530, Bharath Rupireddy wrote: > If the suggestion is to have the wait and retry logic embedded into > the user-written restore_command, IMHO, it's not a good idea as the > restore_command is external to the core PG and the FATAL error > "recovery ended before configure

Re: pg_dump handling of ALTER DEFAULT PRIVILEGES IN SCHEMA

2021-10-22 Thread Bossart, Nathan
On 9/5/21, 11:33 PM, "Bossart, Nathan" wrote: > Attached is an attempt at cleaning the patch up and adding an > informative comment and a test case. For future reference, there was another thread for this bug [0], and a fix was committed [1]. Nathan [0] https://postgr.es/m/CAA3qoJnr2%2B1dVJObN

Re: [PATCH] Make ENOSPC not fatal in semaphore creation

2021-10-22 Thread Tom Lane
Mikhail writes: > On Fri, Oct 22, 2021 at 03:43:00PM -0400, Tom Lane wrote: >> Official support or no, we have OpenBSD 5.9 in our buildfarm, so >> ignoring the case isn't going to fly. > 5.9 has support for unnamed POSIX semas. Do you think new machine with > OpenBSD <5.5 (when unnamed POSIX sema

Re: [PATCH] Make ENOSPC not fatal in semaphore creation

2021-10-22 Thread Mikhail
On Fri, Oct 22, 2021 at 03:43:00PM -0400, Tom Lane wrote: > Mikhail writes: > > In your patch I've removed testing for 5.x versions, because official > > releases are supported only for one year, no need to worry about them. > > Official support or no, we have OpenBSD 5.9 in our buildfarm, so > i

Re: [PATCH] Make ENOSPC not fatal in semaphore creation

2021-10-22 Thread Thomas Munro
On Sat, Oct 23, 2021 at 8:43 AM Tom Lane wrote: > Mikhail writes: > > In your patch I've removed testing for 5.x versions, because official > > releases are supported only for one year, no need to worry about them. > > Official support or no, we have OpenBSD 5.9 in our buildfarm, so > ignoring th

Re: [PATCH] Make ENOSPC not fatal in semaphore creation

2021-10-22 Thread Tom Lane
Mikhail writes: > In your patch I've removed testing for 5.x versions, because official > releases are supported only for one year, no need to worry about them. Official support or no, we have OpenBSD 5.9 in our buildfarm, so ignoring the case isn't going to fly. regards,

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Tom Lane
Andres Freund writes: > Which made me look at the code invoking it from simplehash. I think the patch > that made simplehash work in frontend code isn't quite right, because > pg_log_error() returns... Indeed, that's broken. I guess we want pg_log_fatal then exit(1). > Wonder if we should mar

Re: [PATCH] Make ENOSPC not fatal in semaphore creation

2021-10-22 Thread Mikhail
On Mon, Oct 18, 2021 at 10:07:40AM +1300, Thomas Munro wrote: > On Mon, Oct 18, 2021 at 4:49 AM Mikhail wrote: > > The logic works - the initial call to semget() in > > InternalIpcSemaphoreCreate returns -1 and errno is set to ENOSPC - I > > tested the patch on OpenBSD 7.0, it successfully recycle

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Andres Freund
Hi, On October 22, 2021 10:32:30 AM PDT, Tom Lane wrote: >Andres Freund writes: >>> On 2021-10-21 18:27:25 -0400, Tom Lane wrote: (a) the executable size increases by a few KB --- apparently, even the minimum subset of simplehash.h's functionality is code-wasteful. > >> If I prevent t

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Tom Lane
Andres Freund writes: > On October 22, 2021 8:54:13 AM PDT, Tom Lane wrote: >> Were you planning to pursue this further, or did you want me to? > It seems too nice an improvement to drop on the floor. That said, I don't > really have the mental bandwidth to pursue this beyond the POC stage - it

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Tom Lane
Daniel Gustafsson writes: >> On 22 Oct 2021, at 15:38, Tom Lane wrote: >> (By "here" I mean all of e3931d0, because it made the same omission >> in several places.) > The attached fixes the the two ones I spotted, are there any I missed? Ah, you're right, InsertPgAttributeTuples is the only oth

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Andres Freund
Hi, On October 22, 2021 8:54:13 AM PDT, Tom Lane wrote: >Andres Freund writes: >> On 2021-10-22 10:53:31 -0400, Tom Lane wrote: >>> I'm skeptical of that, mainly because it doesn't work in old servers, > >> I think we can address that, if we think it's overall a promising approach to >> pursue.

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Daniel Gustafsson
> On 22 Oct 2021, at 15:38, Tom Lane wrote: > > Michael Paquier writes: >> On Fri, Oct 22, 2021 at 10:48:57AM +0300, Aleksander Alekseev wrote: >>> ... where the slot is allocated with palloc0. The assumption that >>> MakeSingleTupleTableSlot() returns valid TupleTableSlot* with zeroed >>> tts_i

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-22 Thread Tom Lane
Japin Li writes: > On Sat, 23 Oct 2021 at 00:55, Tom Lane wrote: >> What if the subscriber and publisher are of different PG versions >> and have different ideas of the valid values of these settings? > Sorry, I'm a bit confused. Do you mean we should provide a choose for user > to set thoses p

Re: Make mesage at end-of-recovery less scary.

2021-10-22 Thread Bossart, Nathan
On 3/4/21, 10:50 PM, "Kyotaro Horiguchi" wrote: > As the result, the following messages are emitted with the attached. I'd like to voice my support for this effort, and I intend to help review the patch. It looks like the latest patch no longer applies, so I've marked the commitfest entry [0] as

Re: parallelizing the archiver

2021-10-22 Thread Bossart, Nathan
On 10/22/21, 7:43 AM, "Magnus Hagander" wrote: > I still like the idea of loading the library via a special > parameter, archive_library or such. My first attempt [0] added a GUC like this, so I can speak to some of the interesting design decisions that follow. The simplest thing we could do wou

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-22 Thread Japin Li
On Sat, 23 Oct 2021 at 00:55, Tom Lane wrote: > Japin Li writes: >> Attach v5 patch. This patch set the datestyle, intervalstyle and >> extra_float_digits parameters when we connect to publisher, this can >> avoid the network round trips (compare with the first patch). > > You could make it a l

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Tom Lane
Andres Freund writes: >> On 2021-10-21 18:27:25 -0400, Tom Lane wrote: >>> (a) the executable size increases by a few KB --- apparently, even >>> the minimum subset of simplehash.h's functionality is code-wasteful. > If I prevent the compiler from inlining findObjectByCatalogId() in all the > fin

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?

2021-10-22 Thread Bossart, Nathan
On 10/21/21, 6:51 PM, "Bharath Rupireddy" wrote: > Here's v3 for further review. I've marked this as ready-for-committer. The only other feedback I would offer is nitpicking at the test code to clean it up a little bit, but I don't think it is necessary to block on that. Nathan

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-22 Thread Tom Lane
Japin Li writes: > Attach v5 patch. This patch set the datestyle, intervalstyle and > extra_float_digits parameters when we connect to publisher, this can > avoid the network round trips (compare with the first patch). You could make it a little less confusing by not insisting on a space in the

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-22 Thread Japin Li
On Fri, 22 Oct 2021 at 15:00, Sadhuprasad Patro wrote: > On Fri, Oct 22, 2021 at 8:07 AM Japin Li wrote: >> >> >> On Fri, 22 Oct 2021 at 08:26, Masahiko Sawada wrote: >> > On Thu, Oct 21, 2021 at 11:18 PM Japin Li wrote: >> >> >> >> How it breaks? >> > >> > I don't know the real case but for e

Re: Assorted improvements in pg_dump

2021-10-22 Thread Hans Buschmann
Hello Tom! I noticed you are improving pg_dump just now. Some time ago I experimented with a customer database dump in parallel directory mode -F directory -j (2-4) I noticed it took quite long to complete. Further investigation showed that in this mode with multiple jobs the tables are proce

Re: Multi-Column List Partitioning

2021-10-22 Thread Zhihong Yu
On Fri, Oct 22, 2021 at 3:50 AM Zhihong Yu wrote: > > > On Fri, Oct 22, 2021 at 2:48 AM Nitin Jadhav < > nitinjadhavpostg...@gmail.com> wrote: > >> > While testing further I got a crash with partition wise join enabled >> for multi-col list partitions. please find test case & stack-trace below. >

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-22 Thread Justin Pryzby
On Fri, Oct 22, 2021 at 04:18:04PM +0530, Bharath Rupireddy wrote: > On Fri, Oct 22, 2021 at 3:18 PM Amit Kapila wrote: > > On Fri, Oct 8, 2021 at 4:39 PM Bharath Rupireddy > > wrote: > > > > > > At times, users want to know what are the files (snapshot and mapping > > > files) that are availabl

Re: [RFC] building postgres with meson

2021-10-22 Thread John Naylor
On Thu, Oct 21, 2021 at 5:48 PM Andres Freund wrote: > However, update-unicode is a bit harder. Partially not directly because of > meson, but because update-unicode as-is afaict doesn't support VPATH builds, > and meson enforces those. > make update-unicode > ... > make -C src/common/unicode u

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Tom Lane
Andres Freund writes: > On 2021-10-22 10:53:31 -0400, Tom Lane wrote: >> I'm skeptical of that, mainly because it doesn't work in old servers, > I think we can address that, if we think it's overall a promising approach to > pursue. E.g. if we don't need the indexes, we can make it = ANY(). Hmm

Allow root ownership of client certificate key

2021-10-22 Thread David Steele
Hackers, I noticed recently that permissions checking is done differently for the server certificate key than the client key. Specifically, on the server the key can have 640 perms if it is owned by root. On the server side this change was made in 9a83564c and I think the same rational appli

Re: XTS cipher mode for cluster file encryption

2021-10-22 Thread Stephen Frost
Greetings, * Sasasu (i...@sasa.su) wrote: > On 2021/10/22 01:28, Stephen Frost wrote: > >None of these are actually working with or changing the data though, > >they're just copying it. I don't think we'd actually want these to > >decrypt and reencrypt the data. > > OK, but why ALTER TABLE SET T

Re: Added schema level support for publication.

2021-10-22 Thread vignesh C
On Fri, Oct 22, 2021 at 1:03 PM Masahiko Sawada wrote: > > On Fri, Oct 22, 2021 at 2:25 PM Amit Kapila wrote: > > > > On Thu, Oct 21, 2021 at 6:47 PM vignesh C wrote: > > > > > > > > > Thanks for the comments, the attached v45 patch has the fix for the same. > > > > > > > The first patch is most

Re: Added schema level support for publication.

2021-10-22 Thread vignesh C
On Fri, Oct 22, 2021 at 11:59 AM Greg Nancarrow wrote: > > On Fri, Oct 22, 2021 at 12:41 PM Greg Nancarrow wrote: > > > > I was also previously concerned about what the behavior should be when > > only including just the partitions of a partitioned table in a > > publication using ALL TABLES IN S

Re: pgstat_assert_is_up() can fail in walsender

2021-10-22 Thread Andres Freund
Hi, On 2021-10-22 02:14:40 +0900, Fujii Masao wrote: > On 2021/10/19 22:14, Amit Langote wrote: > > Hi, > > > > I can (almost) consistently reproduce $subject by executing the > > attached shell script, which I was using while constructing a test > > case for another thread. > > This seems the s

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Andres Freund
Hi, On 2021-10-22 10:53:31 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2021-10-21 22:13:22 -0400, Tom Lane wrote: > >> I've thought about doing something like > >> SELECT unsafe-functions FROM pg_class WHERE oid IN (someoid, someoid, ...) > >> but in cases with tens of thousands of tabl

Re: Experimenting with hash tables inside pg_dump

2021-10-22 Thread Tom Lane
Andres Freund writes: > On 2021-10-21 22:13:22 -0400, Tom Lane wrote: >> I've thought about doing something like >> SELECT unsafe-functions FROM pg_class WHERE oid IN (someoid, someoid, ...) >> but in cases with tens of thousands of tables, it seems unlikely that >> that's going to behave all that

Re: parallelizing the archiver

2021-10-22 Thread Magnus Hagander
On Thu, Oct 21, 2021 at 9:51 PM Bossart, Nathan wrote: > On 10/20/21, 3:23 PM, "Bossart, Nathan" wrote: > > Alright, I reworked the patch a bit to maintain backward > > compatibility. My initial intent for 0001 was to just do a clean > > refactor to move the shell archiving stuff to its own fil

Re: parallelizing the archiver

2021-10-22 Thread Magnus Hagander
On Thu, Oct 21, 2021 at 11:05 PM Robert Haas wrote: > On Thu, Oct 21, 2021 at 4:29 PM Stephen Frost wrote: > > restore_command used to be in recovery.conf, which disappeared with v12 > > and it now has to go into postgresql.auto.conf or postgresql.conf. > > > > That's a huge breaking change. > >

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Aleksander Alekseev
Hi Michael, > Do you have something in mind here? Yep. This is not a priority though, thus I created a separate CF entry: https://commitfest.postgresql.org/35/3371/ -- Best regards, Aleksander Alekseev

Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-22 Thread Aleksander Alekseev
Hi hackers, During the discussion [1] it was discovered that we have two procedures in execTuples.c that do the same thing: * MakeSingleTupleTableSlot() * MakeTupleTableSlot() In fact, MakeSingleTupleTableSlot() is simply a wrapper for MakeTupleTableSlot(). I propose keeping only one of these p

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Tom Lane
Michael Paquier writes: > On Fri, Oct 22, 2021 at 10:48:57AM +0300, Aleksander Alekseev wrote: >> ... where the slot is allocated with palloc0. The assumption that >> MakeSingleTupleTableSlot() returns valid TupleTableSlot* with zeroed >> tts_isnull[] seems reasonable, no? > Yes, I don't see any

Re: prevent immature WAL streaming

2021-10-22 Thread Amul Sul
On Thu, Oct 14, 2021 at 6:14 PM Amul Sul wrote: > > On Wed, Oct 13, 2021 at 10:58 PM Alvaro Herrera > wrote: > > > > On 2021-Oct-13, Amul Sul wrote: > > > > > I have one more question, regarding the need for other global > > > variables i.e. abortedRecPtr. (Sorry for coming back after so long.)

Re: Multi-Column List Partitioning

2021-10-22 Thread Zhihong Yu
On Fri, Oct 22, 2021 at 2:48 AM Nitin Jadhav wrote: > > While testing further I got a crash with partition wise join enabled for > multi-col list partitions. please find test case & stack-trace below. > > Thanks for sharing. I have fixed the issue in the attached patch. > > Thanks & Regards, > Ni

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-22 Thread Bharath Rupireddy
On Fri, Oct 22, 2021 at 3:18 PM Amit Kapila wrote: > > On Fri, Oct 8, 2021 at 4:39 PM Bharath Rupireddy > wrote: > > > > Hi, > > > > At times, users want to know what are the files (snapshot and mapping > > files) that are available under pg_logical directory and also the > > spill files that are

Re: add retry mechanism for achieving recovery target before emitting FATA error "recovery ended before configured recovery target was reached"

2021-10-22 Thread Bharath Rupireddy
On Fri, Oct 22, 2021 at 5:54 AM Jeff Davis wrote: > > On Wed, 2021-10-20 at 21:35 +0530, Bharath Rupireddy wrote: > > The FATAL error "recovery ended before configured recovery target > > was > > reached" introduced by commit at [1] in PG 14 is causing the standby > > to go down after having spen

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-22 Thread Amit Kapila
On Fri, Oct 8, 2021 at 4:39 PM Bharath Rupireddy wrote: > > Hi, > > At times, users want to know what are the files (snapshot and mapping > files) that are available under pg_logical directory and also the > spill files that are under pg_replslot directory and how much space > they occupy. > Why

Re: Adding CI to our tree

2021-10-22 Thread Vladimir Sitnikov
>Just add those files to the global gitignore on your machine While global gitignore is a nice feature, it won't protect users who do not know they need to create a global ignore file. Adding explicit excludes for well-known temporary files into PostgreSQL sources makes it easier to work with the

Re: wait event and archive_command

2021-10-22 Thread Michael Paquier
On Thu, Oct 21, 2021 at 10:57:50PM +0900, Fujii Masao wrote: > Also how about adding wait events for other commands like > archive_cleanup_command, restore_command and recovery_end_command? +1 to add something for all of them as we track the startup process in pg_stat_activity. Thinking with a la

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Michael Paquier
On Fri, Oct 22, 2021 at 10:48:57AM +0300, Aleksander Alekseev wrote: > ... where the slot is allocated with palloc0. The assumption that > MakeSingleTupleTableSlot() returns valid TupleTableSlot* with zeroed > tts_isnull[] seems reasonable, no? Yes, I don't see any need to do something more here.

Add connection active, idle time to pg_stat_activity

2021-10-22 Thread Rafia Sabih
Hello there hackers, We at Zalando have faced some issues around long running idle transactions and were thinking about increasing the visibility of pg_stat_* views to capture them easily. What I found is that currently in pg_stat_activity there is a lot of good information about the current state

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-22 Thread Aleksander Alekseev
Hi Tom, > BTW, I think there is an additional bug in copyTemplateDependencies: > I do not see it initializing slot->tts_isnull[] anywhere. It > probably accidentally works (at least in devel builds) because we zero > that memory somewhere else, but surely this code shouldn't assume that? tts_isn

Re: Added schema level support for publication.

2021-10-22 Thread Masahiko Sawada
On Fri, Oct 22, 2021 at 2:25 PM Amit Kapila wrote: > > On Thu, Oct 21, 2021 at 6:47 PM vignesh C wrote: > > > > > > Thanks for the comments, the attached v45 patch has the fix for the same. > > > > The first patch is mostly looking good to me apart from the below > minor comments: Let me share o

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-22 Thread Sadhuprasad Patro
On Fri, Oct 22, 2021 at 8:07 AM Japin Li wrote: > > > On Fri, 22 Oct 2021 at 08:26, Masahiko Sawada wrote: > > On Thu, Oct 21, 2021 at 11:18 PM Japin Li wrote: > >> > >> How it breaks? > > > > I don't know the real case but for example, if an application gets > > changes via pg_recvlogical with