Re: Time to drop plpython2?

2022-02-18 Thread Michael Paquier
On Thu, Feb 17, 2022 at 10:08:55AM -0800, Andres Freund wrote: > On 2022-02-16 23:14:46 -0800, Andres Freund wrote: >> I've pinged the owners of the animals failing so far: >> - myna, butterflyfish > > Fixed, as noted by Micheal on this thread. Fixed is an incorrect word here, "temporarily

Re: improve --with-lz4 install documentation

2022-02-18 Thread Michael Paquier
On Fri, Feb 18, 2022 at 04:49:48PM +0900, Michael Paquier wrote: > With everything that has been merged recently based on LZ4, it makes > sense to me to simplify things as you are suggesting. > > install-windows.sgml includes the same description, so we'd better do > the same thing and simplify

Re: pgsql: Add support for building with ZSTD.

2022-02-18 Thread Michael Paquier
Hi, On Fri, Feb 18, 2022 at 06:53:10PM +, Robert Haas wrote: > Add support for building with ZSTD. > > This commit doesn't actually add anything that uses ZSTD; that will be > done separately. It just puts the basic infrastructure into place. > > Jeevan Ladhe, Robert Haas, and Michael

Re: MultiXact\SLRU buffers configuration

2022-02-18 Thread Andrey Borodin
> 8 апр. 2021 г., в 17:22, Thomas Munro написал(а): > > Thanks! I chickened out of committing a buffer replacement algorithm > patch written 11 hours before the feature freeze, but I also didn't > really want to commit the GUC patch without that. Ahh, if only we'd > latched onto the real

Re: logical decoding and replication of sequences

2022-02-18 Thread Amit Kapila
On Sat, Feb 19, 2022 at 7:48 AM Tomas Vondra wrote: > > Do we need to handle both FOR ALL TABLES and FOR ALL SEQUENCES at the > same time? That seems like a reasonable thing people might want. > +1. That seems reasonable to me as well. I think the same will apply to FOR ALL TABLES IN SCHEMA and

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

2022-02-18 Thread Julien Rouhaud
Hi, On Fri, Feb 18, 2022 at 08:07:05PM +0530, Nitin Jadhav wrote: > > The backend_pid contains a valid value only during > the CHECKPOINT command issued by the backend explicitly, otherwise the > value will be 0. We may have to add an additional field to > 'CheckpointerShmemStruct' to hold the

Re: Fix formatting of Interval output

2022-02-18 Thread Tom Lane
Joseph Koshakow writes: > When formatting the output of an Interval, we call abs() on the hours > field of the Interval. Calling abs(INT_MIN) returns back INT_MIN > causing the output to contain two '-' characters. The attached patch > fixes that issue by special casing INT_MIN hours. Good

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-18 Thread Ashutosh Sharma
On Sat, Feb 19, 2022 at 2:24 AM Nathan Bossart wrote: > > On Fri, Feb 18, 2022 at 10:48:10PM +0530, Ashutosh Sharma wrote: > > Some review comments on the latest version: > > Thanks for the feedback! Before I start spending more time on this one, I > should probably ask if this has any chance of

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

2022-02-18 Thread Ashutosh Sharma
On Thu, Feb 17, 2022 at 1:20 PM Kyotaro Horiguchi wrote: > > At Tue, 15 Feb 2022 20:17:20 +0530, Ashutosh Sharma > wrote in > > OK. The v13 patch looks good. I have marked it as ready to commit. > > Thank you for working on all my review comments. > > Thaks! But the recent xlog.c refactoring

Re: Timeout control within tests

2022-02-18 Thread Noah Misch
On Fri, Feb 18, 2022 at 10:26:52AM -0500, Tom Lane wrote: > Noah Misch writes: > > On Thu, Feb 17, 2022 at 09:48:25PM -0800, Andres Freund wrote: > >> Meson's test runner has the concept of a "timeout multiplier" for ways of > >> running tests. Meson's stuff is about entire tests (i.e. one tap

Re: logical decoding and replication of sequences

2022-02-18 Thread Tomas Vondra
On 2/15/22 10:00, Peter Eisentraut wrote: > On 13.02.22 14:10, Tomas Vondra wrote: >> Here's the remaining part, rebased, with a small tweak in the TAP test >> to eliminate the issue with not waiting for sequence increments. I've >> kept the tweak in a separate patch, so that we can throw it away

Re: Time to drop plpython2?

2022-02-18 Thread Mark Wong
Hi everyone, On Fri, Feb 18, 2022 at 02:41:04PM -0800, Andres Freund wrote: > There's snapper ("pgbf [ a t ] twiska.com"), and there's Mark Wong's large > menagerie. Mark said yesterday that he's working on updating. I've made one pass. Hopefully I didn't make any mistakes. :) Regards, Mark

Re: pg_upgrade verbosity when redirecting output to log file

2022-02-18 Thread Justin Pryzby
+* If outputting to a tty / or , append newline. pg_log_v() will put the +* individual progress items onto the next line.

Re: pg_upgrade verbosity when redirecting output to log file

2022-02-18 Thread Andres Freund
Hi, On 2022-02-16 17:09:34 +1300, Thomas Munro wrote: > On Tue, Jan 11, 2022 at 4:42 AM Bruce Momjian wrote: > > On Sun, Jan 9, 2022 at 10:39:58PM -0800, Andres Freund wrote: > > > On 2022-01-10 01:14:32 -0500, Tom Lane wrote: > > > > I think I'd vote for just nuking that output altogether. > >

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Peter Geoghegan
On Fri, Feb 18, 2022 at 2:11 PM Andres Freund wrote: > I think it'd be good to add a few isolationtest cases for the > can't-get-cleanup-lock paths. I think it shouldn't be hard using cursors. The > slightly harder part is verifying that VACUUM did something reasonable, but > that still should be

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-02-18 Thread Tomas Vondra
On 2/17/22 23:16, Robert Haas wrote: > On Thu, Feb 17, 2022 at 4:17 PM Tomas Vondra > wrote: >> IMHO the whole problem is we're unable to estimate the join clause as a >> conditional probability, i.e. >> >>P(A.x = B.x | (A.x < 42) & (B.x < 42)) >> >> so maybe instead of trying to generate

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Peter Geoghegan
On Fri, Feb 18, 2022 at 1:56 PM Robert Haas wrote: > + * Also maintains *NewRelfrozenxid and *NewRelminmxid, which are the current > + * target relfrozenxid and relminmxid for the relation. Assumption is that > > "maintains" is fuzzy. I think you should be saying something much more > explicit,

Re: Race conditions in 019_replslot_limit.pl

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 18:49:14 -0500, Tom Lane wrote: > Andres Freund writes: > > We'd also need to add pq_endmessage_noblock(), because the pq_endmessage() > > obviously tries to send (as in the backtrace upthread) if the output buffer > > is > > large enough, which it often will be in walsender.

Re: Mark all GUC variable as PGDLLIMPORT

2022-02-18 Thread Andres Freund
Hi, On 2022-02-15 08:06:58 -0800, Andres Freund wrote: > The more I think about it the more I'm convinced that if we want to do this, > we should do it for variables and functions. Btw, if we were to do this, we should just use -fvisibility=hidden everywhere and would see the same set of

Re: Race conditions in 019_replslot_limit.pl

2022-02-18 Thread Tom Lane
Andres Freund writes: > On 2022-02-18 18:15:21 -0500, Tom Lane wrote: >> Perhaps it'd be sensible to do this only in debugging (ie Assert) >> builds? > That seems not great, because it pretty clearly can lead to hangs, which is > problematic in tests too. What about using pq_flush_if_writable()?

Re: Race conditions in 019_replslot_limit.pl

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 18:15:21 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-02-17 21:55:21 -0800, Andres Freund wrote: > >> Isn't it pretty bonkers that we allow error processing to get stuck behind > >> network traffic, *before* we have have released resources (locks etc)? > > It's

Re: Time to drop plpython2?

2022-02-18 Thread Tom Lane
Andres Freund writes: > On 2022-02-18 18:09:19 -0500, Tom Lane wrote: >> This one was discussed on the buildfarm-owners list last month. >> There's no 32-bit python3 on that box, and apparently no plans >> to install one --- it sounded like the box is due for retirement >> anyway. > Any chance

Re: shared_preload_libraries = 'pg_stat_statements' failing with installcheck (compute_query_id = auto)

2022-02-18 Thread Michael Paquier
On Fri, Feb 18, 2022 at 05:38:56PM +0800, Julien Rouhaud wrote: > On Fri, Feb 18, 2022 at 05:22:36PM +0900, Michael Paquier wrote: >> So, I have been looking at this problem, and I don't see a problem in >> doing something like the attached, where we add a "regress" mode to >> compute_query_id

Re: Time to drop plpython2?

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 18:09:19 -0500, Tom Lane wrote: > Andres Freund writes: > > There's one further failure, but the symptoms are quite different. I've also > > pinged its owner. I think it's a problem on the system, rather than our > > side, > > but less certain than with the other cases: > >

Re: Race conditions in 019_replslot_limit.pl

2022-02-18 Thread Tom Lane
Andres Freund writes: > On 2022-02-17 21:55:21 -0800, Andres Freund wrote: >> Isn't it pretty bonkers that we allow error processing to get stuck behind >> network traffic, *before* we have have released resources (locks etc)? It's more or less intentional, per elog.c: /* * This flush

Re: Race conditions in 019_replslot_limit.pl

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 14:42:48 -0800, Andres Freund wrote: > On 2022-02-17 21:55:21 -0800, Andres Freund wrote: > > Isn't it pretty bonkers that we allow error processing to get stuck behind > > network traffic, *before* we have have released resources (locks etc)? > > This is particularly likely to

Re: Time to drop plpython2?

2022-02-18 Thread Tom Lane
Andres Freund writes: > There's one further failure, but the symptoms are quite different. I've also > pinged its owner. I think it's a problem on the system, rather than our side, > but less certain than with the other cases: >

Re: Race conditions in 019_replslot_limit.pl

2022-02-18 Thread Andres Freund
Hi, On 2022-02-17 21:55:21 -0800, Andres Freund wrote: > Isn't it pretty bonkers that we allow error processing to get stuck behind > network traffic, *before* we have have released resources (locks etc)? This is particularly likely to be a problem for walsenders, because they often have a large

Re: Time to drop plpython2?

2022-02-18 Thread Andres Freund
Hi, Thanks to some more buildfarm animal updates things are looking better. I think there's now only three owners that haven't updated their animals successfully. One of which I hadn't yet pinged (chipmunk / Heikki), done now. There's snapper ("pgbf [ a t ] twiska.com"), and there's Mark Wong's

Re: killing perl2host

2022-02-18 Thread Andrew Dunstan
On 2/17/22 12:12, Andres Freund wrote: > Hi, > > On 2022-02-17 09:20:56 -0500, Andrew Dunstan wrote: >> I don't think we have or have ever had a buildfarm animal targeting >> msys. In general I think of msys as a build environment to create native >> binaries. But if we want to support targeting

Re: Synchronizing slots from primary to standby

2022-02-18 Thread Andres Freund
Hi, On 2022-02-11 15:28:19 +0100, Peter Eisentraut wrote: > On 05.02.22 20:59, Andres Freund wrote: > > On 2022-01-03 14:46:52 +0100, Peter Eisentraut wrote: > > > From ec00dc6ab8bafefc00e9b1c78ac9348b643b8a87 Mon Sep 17 00:00:00 2001 > > > From: Peter Eisentraut > > > Date: Mon, 3 Jan 2022

Re: Emit a warning if the extension's GUC is set incorrectly

2022-02-18 Thread Tom Lane
Florin Irion writes: > Il giorno ven 18 feb 2022 alle ore 10:58 Tom Lane ha > scritto: >> Here's a delta patch (meant to be applied after reverting cab5b9ab2) >> that does things like that. It fixes the parallel-mode problem ... >> so do we want to tighten things up this much? > Thank you for

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 15:54:19 -0500, Robert Haas wrote: > > Are there any objections to this plan? > > I really like the idea of reducing the scope of what is being changed > here, and I agree that eagerly advancing relfrozenxid carries much > less risk than the other changes. Sounds good to me

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 13:09:45 -0800, Peter Geoghegan wrote: > 0001 is tricky in the sense that there are a lot of fine details, and > if you get any one of them wrong the result might be a subtle bug. For > example, the heap_tuple_needs_freeze() code path is only used when we > cannot get a cleanup

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 4:10 PM Peter Geoghegan wrote: > It does not change any other behavior. It's totally mechanical. > > 0001 is tricky in the sense that there are a lot of fine details, and > if you get any one of them wrong the result might be a subtle bug. For > example, the

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2022-02-18 Thread David Zhang
Thanks a lot for updating the patch. Tried to apply the patches to master branch, no warning found and regression test passed. Now, we have many places (5) calling the same function with a constant number 3. Is this a good time to consider redefine this number a macro somewhere? Thank

Re: Synchronizing slots from primary to standby

2022-02-18 Thread James Coleman
On Fri, Feb 11, 2022 at 9:26 AM Peter Eisentraut wrote: > > The way I understand it: > > 1. This feature (probably) depends on the "Minimal logical decoding on > standbys" patch. The details there aren't totally clear (to me). That > patch had some activity lately but I don't see it in a state

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Peter Geoghegan
On Fri, Feb 18, 2022 at 12:54 PM Robert Haas wrote: > I'd like to have a clearer idea of exactly what is in each of the > remaining patches before forming a final opinion. Great. > What's tricky about 0001? Does it change any other behavior, either as > a necessary component of advancing

Re: Time to drop plpython2?

2022-02-18 Thread Joe Conway
On 2/18/22 15:53, Andres Freund wrote: the next run succeeded, with 'PYTHON' => 'python3' in build env. But presumably this just was because you installed the python3-devel package? Ok, I guess I got confused when it failed due to the missing devel package, because I removed the PYTHON =>

Re: Time to drop plpython2?

2022-02-18 Thread Alvaro Herrera
On 2022-Feb-17, Andres Freund wrote: > Now also pinged: > - guaibasaurus Fixed now (apt install python3-dev), but I had initially added PYTHON=>python3 to the .conf, unsuccessfully because I failed to install the dev pkg. After the first success I removed that line. It should still work if we

Re: Small TAP tests cleanup for Windows and unused modules

2022-02-18 Thread Daniel Gustafsson
> On 16 Feb 2022, at 23:36, Andrew Dunstan wrote: > On 2/16/22 17:04, Andrew Dunstan wrote: >> On 2/16/22 16:36, Daniel Gustafsson wrote: >>> Seeing msys in TAP tests mentioned in a thread [1] tonight reminded me about >>> two related (well, one of them) patches I had sitting around, so rather

Re: Trap errors from streaming child in pg_basebackup to exit early

2022-02-18 Thread Daniel Gustafsson
> On 16 Feb 2022, at 08:27, Michael Paquier wrote: > > On Wed, Sep 29, 2021 at 01:18:40PM +0200, Daniel Gustafsson wrote: >> So there is one mention of a background WAL receiver already in there, but >> it's >> pretty inconsistent as to what we call it. For now I've changed the >> messaging

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-18 Thread Nathan Bossart
On Fri, Feb 18, 2022 at 10:48:10PM +0530, Ashutosh Sharma wrote: > Some review comments on the latest version: Thanks for the feedback! Before I start spending more time on this one, I should probably ask if this has any chance of making it into v15. -- Nathan Bossart Amazon Web Services:

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 3:41 PM Peter Geoghegan wrote: > Concerns about my general approach to this project (and even the > Postgres 14 VACUUM work) were expressed by Robert and Andres over on > the "Nonrandom scanned_pages distorts pg_class.reltuples set by > VACUUM" thread. Some of what was

Re: Time to drop plpython2?

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 15:35:37 -0500, Joe Conway wrote: > Initially I just installed the python3 RPMs and when I tried running > manually it was still error'ing on configure due to finding python2. > Even after adding EXPORT PYTHON=python3 to my ~/.bash_profile I was seeing > the same. > > By adding

Re: O(n) tasks cause lengthy startups and checkpoints

2022-02-18 Thread Nathan Bossart
> On Thu, Feb 17, 2022 at 03:12:47PM -0800, Andres Freund wrote: >>> > The improvements around deleting temporary files and serialized snapshots >>> > afaict don't require a dedicated process - they're only relevant during >>> > startup. We could use the approach of renaming the directory out of

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-02-18 Thread Peter Geoghegan
On Fri, Feb 11, 2022 at 8:30 PM Peter Geoghegan wrote: > Attached is v8. No real changes -- just a rebased version. Concerns about my general approach to this project (and even the Postgres 14 VACUUM work) were expressed by Robert and Andres over on the "Nonrandom scanned_pages distorts

Re: Time to drop plpython2?

2022-02-18 Thread Joe Conway
On 2/18/22 15:25, Andres Freund wrote: On 2022-02-18 14:46:39 -0500, Joe Conway wrote: $ ll /usr/bin/python lrwxrwxrwx. 1 root root 7 Mar 13 2021 /usr/bin/python -> python2 8<--- Yea, that all looks fine. What's the problem if you don't specify the PYTHON=python3? We try

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 17:26:04 +0900, Masahiko Sawada wrote: > With this change, pg_stat_subscription_workers will be like: > > * subid > * subname > * subrelid > * error_count > * last_error_timestamp > This view will be extended by adding transaction statistics proposed > on another thread[1]. I

Re: Time to drop plpython2?

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 14:46:39 -0500, Joe Conway wrote: > On 2/18/22 14:37, Andres Freund wrote: > > > That seems to have worked. > > > > > > But the question is, is that the correct/recommended method? > > > > If python3 is in PATH, then you shouldn't need that part. > > Not quite -- python3 is

Re: buildfarm warnings

2022-02-18 Thread Robert Haas
On Thu, Feb 17, 2022 at 3:57 PM Robert Haas wrote: > True. That would be easy enough. I played around with this a bit, and of course it is easy enough to add --progress with or without --verbose to a few tests, but when I reverted 62cb7427d1e491faf8612a82c2e3711a8cd65422 it didn't make any tests

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-18 Thread David G. Johnston
On Fri, Feb 18, 2022 at 1:26 AM Masahiko Sawada wrote: > > Here is the summary of the discussion, changes, and plan. > > 1. Move some error information such as the error message to a new > system catalog, pg_subscription_error. The pg_subscription_error table > would have the following columns:

Re: Time to drop plpython2?

2022-02-18 Thread Joe Conway
On 2/18/22 14:37, Andres Freund wrote: Hi, On 2022-02-18 14:19:49 -0500, Joe Conway wrote: On 2/17/22 13:08, Andres Freund wrote: > On 2022-02-16 23:14:46 -0800, Andres Freund wrote: > > > Done. Curious how red the BF will turn out to be. Let's hope it's not > > > too bad. > > - rhinoceros >

Re: Time to drop plpython2?

2022-02-18 Thread Andres Freund
Hi, On 2022-02-18 14:19:49 -0500, Joe Conway wrote: > On 2/17/22 13:08, Andres Freund wrote: > > On 2022-02-16 23:14:46 -0800, Andres Freund wrote: > > > > Done. Curious how red the BF will turn out to be. Let's hope it's not > > > > too bad. > > > > - rhinoceros > > > > Joe replied that he is

Re: Time to drop plpython2?

2022-02-18 Thread Joe Conway
On 2/17/22 13:08, Andres Freund wrote: On 2022-02-16 23:14:46 -0800, Andres Freund wrote: > Done. Curious how red the BF will turn out to be. Let's hope it's not > too bad. - rhinoceros Joe replied that he is afk, looking into it tomorrow. I installed python3 packages (initially

Re: [PATCH] Add support to table_to_xmlschema regex when timestamp has time zone

2022-02-18 Thread Euler Taveira
On Fri, Feb 18, 2022, at 2:47 PM, Renan Soares Lopes wrote: > Hello, > > I added a patch to fix table_to_xmlschema, could you point me how to add a > unit test to that? You should edit src/test/regress/expected/xmlmap.out. In this case, you should also modify

Re: adding 'zstd' as a compression algorithm

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 9:52 AM Robert Haas wrote: > So here's a revised patch for zstd support that uses > AC_CHECK_HEADER(), plus a second patch to change the occurrences above > to use AC_CHECK_HEADER() and remove all traces of the corresponding > preprocessor symbol. And I've now committed

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 12:56 AM Andy Fan wrote: > What do you think about moving on this feature? The items known by me > are: 1). Make sure the estimation error can be fixed or discuss if my current > solution is workable. b). Just distribute some selectivity restrictinfo to > RelOptInfo.

Re: USE_BARRIER_SMGRRELEASE on Linux?

2022-02-18 Thread Nathan Bossart
On Wed, Feb 16, 2022 at 01:00:53PM -0800, Nathan Bossart wrote: > On Wed, Feb 16, 2022 at 11:27:31AM -0800, Andres Freund wrote: >> That doesn't strike me as great architecturally. E.g. in theory the same >> problem could exist in single user mode. I think it doesn't today, because >>

[PATCH] Add support to table_to_xmlschema regex when timestamp has time zone

2022-02-18 Thread Renan Soares Lopes
Hello,I added a patch to fix table_to_xmlschema, could you point me how to add a unit test to that?From 24768b689638fc35edcdb378735ae2505315a151 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Fri, 18 Feb 2022 14:36:30 -0300 Subject: [PATCH] fix: table_to_xmlschema regex for timestamp with time

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-18 Thread Ashutosh Sharma
Some review comments on the latest version: +* runningBackups is a counter indicating the number of backups currently in +* progress. forcePageWrites is set to true when either of these is +* non-zero. lastBackupStart is the latest checkpoint redo location used as +* a starting

Re: Per-table storage parameters for TableAM/IndexAM extensions

2022-02-18 Thread Simon Riggs
On Thu, 17 Feb 2022 at 17:55, Sadhuprasad Patro wrote: > > > On Sat, Feb 12, 2022 at 2:35 AM Robert Haas wrote: > >> > >> > >> Imagine that I am using the "foo" tableam with "compression=lots" and > >> I want to switch to the "bar" AM which does not support that option. > >> If I remove the

Re: O(n) tasks cause lengthy startups and checkpoints

2022-02-18 Thread Nathan Bossart
On Thu, Feb 17, 2022 at 03:12:47PM -0800, Andres Freund wrote: >> > The improvements around deleting temporary files and serialized snapshots >> > afaict don't require a dedicated process - they're only relevant during >> > startup. We could use the approach of renaming the directory out of the

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-02-18 Thread Robert Haas
On Thu, Feb 17, 2022 at 6:39 PM Andres Freund wrote: > > The only other kind of hazard I can think of is: could it be unsafe to > > try to interpret the contents of a database to which no one else is > > connected at present due to any of the issues you mention? But what's > > the hazard exactly?

Re: Timeout control within tests

2022-02-18 Thread Tom Lane
Noah Misch writes: > On Thu, Feb 17, 2022 at 09:48:25PM -0800, Andres Freund wrote: >> Meson's test runner has the concept of a "timeout multiplier" for ways of >> running tests. Meson's stuff is about entire tests (i.e. one tap test), so >> doesn't apply here, but I wonder if we shouldn't do

Re: Synchronizing slots from primary to standby

2022-02-18 Thread James Coleman
On Fri, Feb 11, 2022 at 9:26 AM Peter Eisentraut wrote: > > On 10.02.22 22:47, Bruce Momjian wrote: > > I would love to see this feature in PG 15. Can someone explain its > > current status? Thanks. > > The way I understand it: > ... Hi Peter, I'm starting to review this patch, and last time

RE: Failed transaction statistics to measure the logical replication progress

2022-02-18 Thread osumi.takami...@fujitsu.com
On Friday, February 18, 2022 3:34 PM Tang, Haiying/唐 海英 wrote: > On Wed, Jan 12, 2022 8:35 PM osumi.takami...@fujitsu.com > wrote: > > > > The attached v21 has a couple of other minor updates like a > > modification of error message text. > > > > > > Thanks for updating the patch. Here are

Re: [PATCH] Add reloption for views to enable RLS

2022-02-18 Thread Laurenz Albe
On Tue, 2022-02-15 at 16:32 +0100, walt...@technowledgy.de wrote: > > "check_permissions_as_owner" is ok with me, but a bit long. > > check_permissions_as_owner is exactly what happens. The additional "as" > shouldn't be a problem in length - but is much better to read. I > wouldn't associate

Re: adding 'zstd' as a compression algorithm

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 9:24 AM Robert Haas wrote: > On Fri, Feb 18, 2022 at 9:02 AM Robert Haas wrote: > > Oh wait ... you want it the other way. Yeah, that seems harmless to > > change. I wonder how many others there are that could be changed > > similarly... > > I went through configure.ac

RE: Failed transaction statistics to measure the logical replication progress

2022-02-18 Thread osumi.takami...@fujitsu.com
On Friday, February 18, 2022 8:11 PM Amit Kapila wrote: > On Fri, Feb 18, 2022 at 2:04 PM osumi.takami...@fujitsu.com > wrote: > > > > On Thursday, February 17, 2022 6:45 PM Amit Kapila > wrote: > > > On Thu, Feb 17, 2022 at 3:13 PM Amit Kapila > > > > > > wrote: > > > > Can't we use

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-02-18 Thread Yugo NAGATA
Hello Fabien, Thank you so much for your review. Sorry for the late reply. I've stopped working on it due to other jobs but I came back again. I attached the updated patch. I would appreciate it if you could review this again. On Mon, 19 Jul 2021 20:04:23 +0200 (CEST) Fabien COELHO wrote: >

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

2022-02-18 Thread Nitin Jadhav
> > Okay. I feel this can be added as additional field but it will not > > replace backend_pid field as this represents the pid of the backend > > which triggered the current checkpoint. > > I don't think that's true. Requesting a checkpoint means telling the > checkpointer that it should wake up

Re: adding 'zstd' as a compression algorithm

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 9:02 AM Robert Haas wrote: > Oh wait ... you want it the other way. Yeah, that seems harmless to > change. I wonder how many others there are that could be changed > similarly... I went through configure.ac looking for instances of AC_CHECK_HEADERS() where the

Re: killing perl2host

2022-02-18 Thread Andrew Dunstan
On 2/17/22 15:46, Andres Freund wrote: > On 2022-02-17 15:23:36 -0500, Andrew Dunstan wrote: >> Very well. I think the easiest way will be to stash $host_os in the >> environment and let the script pick it up similarly to what I suggested >> with MSYSTEM. > WFM. OK, here's a patch. cheers

Re: adding 'zstd' as a compression algorithm

2022-02-18 Thread Robert Haas
On Fri, Feb 18, 2022 at 8:48 AM Robert Haas wrote: > On Thu, Feb 17, 2022 at 8:36 PM Andres Freund wrote: > > On 2022-02-17 13:34:08 +0900, Michael Paquier wrote: > > > %define needs to include HAVE_LIBZSTD, HAVE_ZSTD_H and USE_ZSTD, so > > > this version fails the sanity check between

Re: adding 'zstd' as a compression algorithm

2022-02-18 Thread Robert Haas
On Thu, Feb 17, 2022 at 8:36 PM Andres Freund wrote: > On 2022-02-17 13:34:08 +0900, Michael Paquier wrote: > > %define needs to include HAVE_LIBZSTD, HAVE_ZSTD_H and USE_ZSTD, so > > this version fails the sanity check between pg_config.h.in and the > > MSVC scripts checking that all flags

Patch a potential memory leak in describeOneTableDetails()

2022-02-18 Thread wliang
Hi all, I find a potential memory leak in PostgresSQL 14.1, which is in the function describeOneTableDetails (./src/bin/psql/describe.c). The bug has been confirmed by an auditor of . Specifically, at line 1603, a memory chunk is allocated with pg_strdup and assigned to

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2022-02-18 Thread Tomas Vondra
Hi, here's a slightly updated version of the patch series. The 0001 part adds tracking of server_version_num, so that it's possible to enable other features depending on it. In this case it's used to decide whether TABLESAMPLE is supported. The 0002 part modifies the sampling. I realized we can

Re: adding 'zstd' as a compression algorithm

2022-02-18 Thread Robert Haas
On Thu, Feb 17, 2022 at 8:18 PM Michael Paquier wrote: > On Thu, Feb 17, 2022 at 09:40:13AM -0500, Robert Haas wrote: > > Ah, OK, cool. It seems like we have consensus on this being a good > > direction, so I plan to commit this later today unless objections or > > additional review comments turn

Re: Merging statistics from children instead of re-sampling everything

2022-02-18 Thread Andrey V. Lepikhov
On 2/14/22 20:16, Tomas Vondra wrote: On 2/14/22 11:22, Andrey V. Lepikhov wrote: On 2/11/22 20:12, Tomas Vondra wrote: On 2/11/22 05:29, Andrey V. Lepikhov wrote: On 2/11/22 03:37, Tomas Vondra wrote: That being said, this thread was not really about foreign partitions, but about

Re: Emit a warning if the extension's GUC is set incorrectly

2022-02-18 Thread Florin Irion
Il giorno ven 18 feb 2022 alle ore 10:58 Tom Lane ha scritto: > I wrote: > > As a stopgap to turn the farm green again, I am going to revert > > 75d22069e as well as my followup patches. If we don't want to > > give up on that idea altogether, we have to find some way to > > suppress the

Re: Failed transaction statistics to measure the logical replication progress

2022-02-18 Thread Amit Kapila
On Fri, Feb 18, 2022 at 2:04 PM osumi.takami...@fujitsu.com wrote: > > On Thursday, February 17, 2022 6:45 PM Amit Kapila > wrote: > > On Thu, Feb 17, 2022 at 3:13 PM Amit Kapila > > wrote: > > > Can't we use pgstat_report_stat() here? Basically, you can update xact > > > completetion counters

Re: logical replication empty transactions

2022-02-18 Thread Amit Kapila
On Fri, Feb 18, 2022 at 3:06 PM osumi.takami...@fujitsu.com wrote: > > On Friday, February 18, 2022 6:18 PM Amit Kapila > wrote: > > On Tue, Feb 8, 2022 at 5:27 AM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Friday, August 13, 2021 8:01 PM Ajin Cherian wrote: > > > > On Mon, Aug 2,

JSON path decimal literal syntax

2022-02-18 Thread Peter Eisentraut
I noticed that the JSON path lexer does not support the decimal literal syntax forms .1 1. (that is, there are no digits before or after the decimal point). This is allowed by the relevant ECMAScript standard (https://262.ecma-international.org/5.1/#sec-7.8.3) and of course SQL allows it

Re: pgsql: pg_upgrade: Preserve relfilenodes and tablespace OIDs.

2022-02-18 Thread Christoph Berg
Re: Robert Haas > > This needs to be guarded with "if (binary_upgrade)". > > Right. Sorry about that, and sorry for not responding sooner also. Fix > pushed now. Thanks, the 14-15 upgrade test is passing again here. Christoph

Re: shared_preload_libraries = 'pg_stat_statements' failing with installcheck (compute_query_id = auto)

2022-02-18 Thread Julien Rouhaud
Hi, On Fri, Feb 18, 2022 at 05:22:36PM +0900, Michael Paquier wrote: > > So, I have been looking at this problem, and I don't see a problem in > doing something like the attached, where we add a "regress" mode to > compute_query_id that is a synonym of "auto". Or, in short, we have > the default

RE: logical replication empty transactions

2022-02-18 Thread osumi.takami...@fujitsu.com
On Friday, February 18, 2022 6:18 PM Amit Kapila wrote: > On Tue, Feb 8, 2022 at 5:27 AM osumi.takami...@fujitsu.com > wrote: > > > > On Friday, August 13, 2021 8:01 PM Ajin Cherian wrote: > > > On Mon, Aug 2, 2021 at 7:20 PM Amit Kapila > > > wrote: > > Changing the timing to send the

Re: logical replication empty transactions

2022-02-18 Thread Amit Kapila
On Tue, Feb 8, 2022 at 5:27 AM osumi.takami...@fujitsu.com wrote: > > On Friday, August 13, 2021 8:01 PM Ajin Cherian wrote: > > On Mon, Aug 2, 2021 at 7:20 PM Amit Kapila > > wrote: > Changing the timing to send the keepalive to the decoding commit > timing didn't look impossible to me,

Re: logical replication empty transactions

2022-02-18 Thread Amit Kapila
On Thu, Feb 17, 2022 at 4:12 PM Amit Kapila wrote: > > On Mon, Jan 31, 2022 at 6:18 PM Ajin Cherian wrote: > > > > Few comments: > = > One more comment: @@ -1546,10 +1557,11 @@ WalSndWaitForWal(XLogRecPtr loc) * otherwise idle, this keepalive will trigger a reply. Processing the

Re: [Proposal] Add foreign-server health checks infrastructure

2022-02-18 Thread Fujii Masao
On 2022/02/17 19:35, kuroda.hay...@fujitsu.com wrote: Dear Horiguchi-san, I think we just don't need to add the special timeout kind to the core. postgres_fdw can use USER_TIMEOUT and it would be suffiction to keep running health checking regardless of transaction state then fire query

RE: Failed transaction statistics to measure the logical replication progress

2022-02-18 Thread osumi.takami...@fujitsu.com
On Thursday, February 17, 2022 6:45 PM Amit Kapila wrote: > On Thu, Feb 17, 2022 at 3:13 PM Amit Kapila > wrote: > > > > On Tue, Jan 4, 2022 at 5:22 PM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Friday, December 31, 2021 10:12 AM Tang, Haiying/唐 海英 > wrote: > > > > 4) > > > > +void

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-18 Thread Masahiko Sawada
On Wed, Feb 16, 2022 at 8:36 PM Masahiko Sawada wrote: > > On Wed, Feb 16, 2022 at 5:49 PM Amit Kapila wrote: > > > > On Tue, Feb 15, 2022 at 11:56 PM Andres Freund wrote: > > > > > > On 2022-02-03 13:33:08 +0900, Masahiko Sawada wrote: > > > > I see that important information such as error-XID

Re: shared_preload_libraries = 'pg_stat_statements' failing with installcheck (compute_query_id = auto)

2022-02-18 Thread Michael Paquier
On Tue, Feb 08, 2022 at 12:56:59PM +0900, Michael Paquier wrote: > Well, I can see that this is a second independent complain after a few > months. If you wish to keep this capability, wouldn't it be better to > add a "regress" mode to compute_query_id, where we would mask > automatically this

Re: logical replication empty transactions

2022-02-18 Thread Ajin Cherian
On Wed, Feb 16, 2022 at 2:15 PM osumi.takami...@fujitsu.com wrote: > Another idea would be, to create an empty file under the the > pg_replslot/slotname > with a prefix different from "xid" in the DecodePrepare before the shutdown > if the prepare was empty, and bypass the cleanup of the