Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-08 Thread Amit Kapila
On Thu, Feb 9, 2023 at 12:17 AM Peter Smith wrote: > > On Wed, Feb 8, 2023 at 8:03 PM Hayato Kuroda (Fujitsu) > wrote: > > > ... > > > == > > > > > > src/backend/replication/logical/worker.c > > > > > > 2. maybe_apply_delay > > > > > > + if (wal_receiver_status_interval > 0 && > > > + diffms

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Tom Lane
Jim Jones writes: > I see your point. If I got it right, you're suggesting the following > change in the PG_TRY(); >    PG_TRY(); >     { >    int nbytes; >    if(!doc) >        xml_ereport(xmlerrcxt, ERROR, ERRCODE_INTERNAL_ERROR, >                "could not parse

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Jim Jones
On 09.02.23 02:01, Peter Smith wrote: OTOH, if you are having to check for NULL doc anyway, maybe it's just as easy only doing that up-front. Then you could quick-exit the function without calling xmlDocDumpFormatMemory etc. in the first place. For example: doc = xml_parse(arg,

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

2023-02-08 Thread Masahiko Sawada
Hi, On Tue, Feb 7, 2023 at 6:25 PM John Naylor wrote: > > > On Tue, Jan 31, 2023 at 9:43 PM Masahiko Sawada wrote: > > > I've attached v24 patches. The locking support patch is separated > > (0005 patch). Also I kept the updates for TidStore and the vacuum > > integration from v23 separate. > >

Re: Introduce a new view for checkpointer related stats

2023-02-08 Thread Andres Freund
Hi, On 2023-02-09 12:21:51 +0530, Bharath Rupireddy wrote: > @@ -1105,18 +1105,22 @@ CREATE VIEW pg_stat_archiver AS > > CREATE VIEW pg_stat_bgwriter AS > SELECT > -pg_stat_get_bgwriter_timed_checkpoints() AS checkpoints_timed, > -

Re: Introduce a new view for checkpointer related stats

2023-02-08 Thread Bharath Rupireddy
On Sat, Jan 21, 2023 at 5:56 AM Bharath Rupireddy wrote: > > On Fri, Dec 2, 2022 at 1:07 PM Drouvot, Bertrand > wrote: > > > > Patch LGTM, marking it as Ready for Committer. > > Had to rebase, attached v5 patch for further consideration. One more rebase due to 28e626bd (pgstat: Infrastructure

Re: typos

2023-02-08 Thread Tom Lane
Michael Paquier writes: > On Wed, Feb 08, 2023 at 09:56:44AM -0600, Justin Pryzby wrote: >> Some more accumulated/new typos. > 0005 can indeed fix a lot of confusion around the spaces after an > "else if" block. Is that something that could be automated with the > indentation, though? Same

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-08 Thread Masahiko Sawada
On Wed, Feb 8, 2023 at 1:13 PM Amit Kapila wrote: > > On Wed, Feb 8, 2023 at 1:19 AM Andres Freund wrote: > > > > On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > > > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada > > > wrote: > > > > > > > > Attached updated patches. > > > > > > > > > >

Re: WAL Insertion Lock Improvements

2023-02-08 Thread Bharath Rupireddy
On Thu, Feb 9, 2023 at 3:36 AM Nathan Bossart wrote: > > + pg_atomic_exchange_u64(valptr, val); > > nitpick: I'd add a (void) at the beginning of these calls to > pg_atomic_exchange_u64() so that it's clear that we are discarding the > return value. I did that in the attached v5 patch

Re: pg_upgrade failures with large partition definitions on upgrades from ~13 to 14~

2023-02-08 Thread Michael Paquier
On Thu, Feb 09, 2023 at 12:33:06AM -0500, Tom Lane wrote: > It might be worth expending a pre-check on, if only because the > check could offer some advice about fixing the problem. Based on the information coming from pg_class, yes, something could be reported back. Now things get more hairy if

Rework LogicalOutputPluginWriterUpdateProgress (WAS Re: Logical replication timeout ...)

2023-02-08 Thread Amit Kapila
On Thu, Feb 9, 2023 at 1:33 AM Andres Freund wrote: > > Hacking on a rough prototype how I think this should rather look, I had a few > questions / remarks: > > - We probably need to call UpdateProgress from a bunch of places in decode.c > as well? Indicating that we're lagging by a lot, just

RE: Exit walsender before confirming remote flush in logical replication

2023-02-08 Thread Takamichi Osumi (Fujitsu)
On Wednesday, February 8, 2023 6:47 PM Hayato Kuroda (Fujitsu) wrote: > PSA rebased patch that supports updated time-delayed patch[1]. Hi, Thanks for creating the patch ! Minor review comments on v5-0002. (1) + Decides the condition for exiting the walsender process. +

Re: typos

2023-02-08 Thread Michael Paquier
On Wed, Feb 08, 2023 at 09:56:44AM -0600, Justin Pryzby wrote: > Some more accumulated/new typos. 0001 has been a debate for a long time, and it depends on the way SQL is spelled. For reference: $ git grep -i " an sql" -- *.c | wc -l 63 $ git grep -i " a sql" -- *.c | wc -l 135 0005 can indeed

Re: pg_upgrade failures with large partition definitions on upgrades from ~13 to 14~

2023-02-08 Thread Tom Lane
Michael Paquier writes: > The following SQL sequence causes a failure of pg_upgrade when these > are executed on a cluster of ~13, doing an upgrade to 14~, assuming > that the relation page size is 8kB. > ... > No fields have been added to pg_class between 13 and 14, however the > amount of data

pg_upgrade failures with large partition definitions on upgrades from ~13 to 14~

2023-02-08 Thread Michael Paquier
Hi all, The following SQL sequence causes a failure of pg_upgrade when these are executed on a cluster of ~13, doing an upgrade to 14~, assuming that the relation page size is 8kB. This creates a partition table with a set of values large enough that it can be created in ~13: CREATE TABLE

Re: recovery modules

2023-02-08 Thread Andres Freund
On 2023-02-08 10:55:44 -0800, Nathan Bossart wrote: > done Pushed. Thanks!

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-08 Thread Kyotaro Horiguchi
At Wed, 8 Feb 2023 09:03:03 +, "Hayato Kuroda (Fujitsu)" wrote in > Thank you for reviewing! PSA new version. + if (statusinterval_ms > 0 && diffms > statusinterval_ms) The next expected feedback time is measured from the last status report. Thus, it seems to me this may

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 17:18:13 -0500, Tom Lane wrote: > However, I've not done anything about documenting what is the minimum ninja > version. Sorry, plan to tackle work around this tomorrow. Got stuck for much longer than I had hoped to debug flapping tests (parts resolved, several others not). My

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-08 Thread Andres Freund
Hi, On 2023-02-07 22:38:14 -0800, Andres Freund wrote: > I did another read through the series. I do have some minor changes, but > they're minor. I think this is ready for commit. I plan to start pushing > tomorrow. Pushed the first (and biggest) commit. More tomorrow. Already can't wait to

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 18:37:41 -0800, Peter Geoghegan wrote: > On Wed, Feb 8, 2023 at 4:29 PM Andres Freund wrote: > > 2) Add a message to lazy_vacuum() or lazy_vacuum_all_indexes(), that > > includes > >- num_index_scans > >- how many indexes we'll scan > >- how many dead tids we're

Is psSocketPoll doing the right thing?

2023-02-08 Thread Kyotaro Horiguchi
Hello. While looking a patch, I found that pqSocketPoll passes through the result from poll(2) to the caller and throws away revents. If I understand it correctly, poll() *doesn't* return -1 nor errno by the reason it has set POLLERR, POLLHUP, POLLNVAL, and POLLRDHUP for some of the target

Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

2023-02-08 Thread Tom Lane
Justin Pryzby writes: > On Thu, Feb 09, 2023 at 10:28:14AM +0900, Michael Paquier wrote: >> I am wondering.. Did people notice that this adds GUC_NOT_IN_SAMPLE >> to config_file in guc_tables.c? This makes sense in the long run >> based on what this parameter is by design, still there may be an

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-08 Thread Peter Geoghegan
On Wed, Feb 8, 2023 at 4:29 PM Andres Freund wrote: > I find it useful information when debugging problems. Without it, the log > doesn't tell you which index was processed when a problem started to occur. Or > even that we were scanning indexes at all. I guess it might have some limited value

Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

2023-02-08 Thread Justin Pryzby
On Thu, Feb 09, 2023 at 10:28:14AM +0900, Michael Paquier wrote: > On Wed, Feb 08, 2023 at 04:21:57PM +0530, Nitin Jadhav wrote: > > Makes sense and the patch looks good to me. > > Ah, OK. Thanks for the feedback! > > I am wondering.. Did people notice that this adds GUC_NOT_IN_SAMPLE > to

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

2023-02-08 Thread Kyotaro Horiguchi
At Fri, 27 Jan 2023 06:57:01 +, "Hayato Kuroda (Fujitsu)" wrote in > I found cfbot failure, PSA fixed version. + Unlike , this function checks socket + health. This check is performed by polling the socket. This function is + currently available only on systems that

RE: run pgindent on a regular basis / scripted manner

2023-02-08 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Hi, I tried the committed pgindent. The attached small patch changes spaces in the usage message to tabs. Options other than --commit start with a tab. Regards, Noriyoshi Shinoda From: Andrew Dunstan Sent: Thursday, February 9, 2023 7:10 AM To: Jelte Fennema Cc: Robert Haas ; Tom Lane ; Justin

Re: Move defaults toward ICU in 16?

2023-02-08 Thread Andres Freund
On 2023-02-08 12:16:46 -0800, Jeff Davis wrote: > On Thu, 2023-02-02 at 18:10 -0500, Tom Lane wrote: > > Yeah.  I would be resistant to making ICU a required dependency, > > but it doesn't seem unreasonable to start moving towards it being > > our default collation support. > > Patch attached.

Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

2023-02-08 Thread Michael Paquier
On Wed, Feb 08, 2023 at 04:21:57PM +0530, Nitin Jadhav wrote: > Makes sense and the patch looks good to me. Ah, OK. Thanks for the feedback! I am wondering.. Did people notice that this adds GUC_NOT_IN_SAMPLE to config_file in guc_tables.c? This makes sense in the long run based on what this

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Peter Smith
On Thu, Feb 9, 2023 at 10:42 AM Jim Jones wrote: > > On 09.02.23 00:09, Peter Smith wrote: > > I noticed the xmlFreeDoc(doc) within the PG_CATCH is guarded but the > > other xmlFreeDoc(doc) is not. As the doc is assigned outside the > > PG_TRY shouldn't those both be the same? > > Hi Peter, > >

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 14:03:49 -0800, Peter Geoghegan wrote: > On Tue, Feb 7, 2023 at 6:47 PM Andres Freund wrote: > > One thing I'm not quite sure what to do about is that we atm use a hardcoded > > DEBUG2 (not controlled by VERBOSE) in a bunch of places: > > > > ereport(DEBUG2, > >

Re: Weird failure with latches in curculio on v15

2023-02-08 Thread Nathan Bossart
On Thu, Feb 09, 2023 at 08:56:24AM +0900, Michael Paquier wrote: > On Wed, Feb 08, 2023 at 02:25:54PM -0800, Nathan Bossart wrote: >> These are all good points. Perhaps there could be a base archiver >> implementation that shell_archive uses (and that other modules could use if >> desired, which

Re: OpenSSL 3.0.0 vs old branches

2023-02-08 Thread Michael Paquier
On Wed, Feb 08, 2023 at 07:30:32AM -0500, Andrew Dunstan wrote: > In the last 30 days, only the following buildfarm animals have reported > running the ssl checks on the relevant branches: > >  gokiburi >  hachi FWIW, these two ones are using OpenSSL 1.1.1, so that's fine. -- Michael

Re: Weird failure with latches in curculio on v15

2023-02-08 Thread Michael Paquier
On Wed, Feb 08, 2023 at 02:25:54PM -0800, Nathan Bossart wrote: > These are all good points. Perhaps there could be a base archiver > implementation that shell_archive uses (and that other modules could use if > desired, which might be important for backward compatibility with the > existing

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Jim Jones
On 09.02.23 00:09, Peter Smith wrote: I noticed the xmlFreeDoc(doc) within the PG_CATCH is guarded but the other xmlFreeDoc(doc) is not. As the doc is assigned outside the PG_TRY shouldn't those both be the same? Hi Peter, My logic there was the following: if program reached that part of the

Re: Improve logging when using Huge Pages

2023-02-08 Thread Justin Pryzby
On Thu, Feb 02, 2023 at 04:53:37PM +0100, Alvaro Herrera wrote: > On 2023-Jan-24, Justin Pryzby wrote: > > On Mon, Jan 23, 2023 at 05:33:35PM -0800, Andres Freund wrote: > > > I'm ok with this being a GUC, it doesn't feel elegant, but I suspect > > > there's > > > no realistic elegant answer. >

Re: RFC: WAL infrastructure issues, updates and improvements

2023-02-08 Thread Matthias van de Meent
Hi, Various users and threads on -hackers (incl. [0] specifically) have complained about the overhead of our WAL format. One example of this is that we write at least 44 bytes to register any changes to a single relation's page: There is a 24-byte WAL record header, a 4-byte block record header,

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Peter Smith
On Thu, Feb 9, 2023 at 7:31 AM Jim Jones wrote: > > while working on another item of the TODO list I realized that I should > be using a PG_TRY() block in he xmlDocDumpFormatMemory call. > > Fixed in v5. > I noticed the xmlFreeDoc(doc) within the PG_CATCH is guarded but the other xmlFreeDoc(doc)

Re: Improve logging when using Huge Pages

2023-02-08 Thread Nathan Bossart
On Thu, Feb 02, 2023 at 04:53:37PM +0100, Alvaro Herrera wrote: > Maybe I misread the code (actually I only read the patch), but -- does > it set active=true when huge_pages=on? I think the code only works when > huge_pages=try. That might be pretty confusing; I think it should say > "on" in

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-02-08 Thread David Rowley
On Thu, 9 Feb 2023 at 11:26, Tom Lane wrote: > > David Rowley writes: > > I've attached a patch which does the renaming to debug_parallel_query. > > I've made it so the old name can still be used. > > There's a better way to do that last, which is to add the translation to > map_old_guc_names[].

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-02-08 Thread Justin Pryzby
On Thu, Feb 02, 2023 at 09:18:07AM -0600, Justin Pryzby wrote: > On Wed, Feb 01, 2023 at 07:24:48PM +0100, Matthias van de Meent wrote: > > On Wed, 1 Feb 2023 at 18:51, Ilya Gladyshev > > wrote: > > > 1 февр. 2023 г., в 20:27, Matthias van de Meent > > > написал(а): > > > > > >> In HEAD we set

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-02-08 Thread Tom Lane
David Rowley writes: > I've attached a patch which does the renaming to debug_parallel_query. > I've made it so the old name can still be used. There's a better way to do that last, which is to add the translation to map_old_guc_names[]. I am not very sure what happens if you have multiple GUC

Re: Weird failure with latches in curculio on v15

2023-02-08 Thread Nathan Bossart
On Wed, Feb 08, 2023 at 04:24:15PM -0500, Robert Haas wrote: > On Wed, Feb 8, 2023 at 12:43 PM Nathan Bossart > wrote: >> I think this could be a good approach if we decide not to bake too much >> into PostgreSQL itself (e.g., such as creating multiple archive workers >> that each call out to

Re: First draft of back-branch release notes is done

2023-02-08 Thread Tom Lane
Justin Pryzby writes: > It's of no concern, but I was curious why this one wasn't included: > commit 72aea955d49712a17c08748aa9abcbcf98c32fc5 > Author: Thomas Munro > Date: Fri Jan 6 16:38:46 2023 +1300 > Fix pg_truncate() on Windows. > Commit 57faaf376 added pg_truncate(const

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-08 Thread Tom Lane
I pushed the discussed documentation improvements, and changed the behavior of "ninja docs" to only build the HTML docs. However, I've not done anything about documenting what is the minimum ninja version. regards, tom lane

Re: Support logical replication of DDLs

2023-02-08 Thread Peter Smith
Hi Vignesh, thanks for addressing my v63-0002 review comments. I confirmed most of the changes. Below is a quick follow-up for the remaining ones. On Mon, Feb 6, 2023 at 10:32 PM vignesh C wrote: > > On Mon, 6 Feb 2023 at 06:47, Peter Smith wrote: > > ... > > > > 8. > > + value =

Re: deadlock-hard flakiness

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 14:11:45 -0800, Andres Freund wrote: > On 2023-02-07 17:10:21 -0800, Andres Freund wrote: > I don't really understand how GetSafeSnapshotBlockingPids() can end up finding > deadlock-hard's sessions being blocked by a safe snapshot. Afaict nothing uses > serializable in that

Re: deadlock-hard flakiness

2023-02-08 Thread Andres Freund
Hi, On 2023-02-07 17:10:21 -0800, Andres Freund wrote: > diff -U3 /tmp/cirrus-ci-build/src/test/isolation/expected/deadlock-hard.out > /tmp/cirrus-ci-build/build/testrun/isolation-running/isolation/results/deadlock-hard.out > --- /tmp/cirrus-ci-build/src/test/isolation/expected/deadlock-hard.out

Re: run pgindent on a regular basis / scripted manner

2023-02-08 Thread Andrew Dunstan
On 2023-02-08 We 12:06, Jelte Fennema wrote: With the new patch --commit works as expected for me now. And sounds good to up the script a bit afterwards. Thanks, I have committed this. Still looking at Robert's other request. cheers andrew -- Andrew Dunstan

Re: First draft of back-branch release notes is done

2023-02-08 Thread Justin Pryzby
On Fri, Feb 03, 2023 at 02:32:39PM -0500, Tom Lane wrote: > ... at > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=f282b026787da69d88a35404cf62f1cc21cfbb7c > > As usual, please send corrections/comments by Sunday. It's of no concern, but I was curious why this one wasn't

Re: WAL Insertion Lock Improvements

2023-02-08 Thread Nathan Bossart
+ pg_atomic_exchange_u64(valptr, val); nitpick: I'd add a (void) at the beginning of these calls to pg_atomic_exchange_u64() so that it's clear that we are discarding the return value. + /* +* Update the lock variable atomically first without having to acquire wait +

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-08 Thread Peter Geoghegan
On Tue, Feb 7, 2023 at 6:47 PM Andres Freund wrote: > One thing I'm not quite sure what to do about is that we atm use a hardcoded > DEBUG2 (not controlled by VERBOSE) in a bunch of places: > > ereport(DEBUG2, > (errmsg("table \"%s\": removed %lld dead item >

Re: OpenSSL 3.0.0 vs old branches

2023-02-08 Thread Andrew Dunstan
On 2023-02-08 We 10:42, Peter Eisentraut wrote: On 07.02.23 19:28, Tom Lane wrote: I think Peter's misremembering the history, and OpenSSL 3*is* supported in these branches.  There could be an argument for not back-patching f0d2c65f17 on the grounds that pre-1.1.1 is also supported there.  On

Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-02-08 Thread Tomas Vondra
On 2/8/23 14:55, Hans Buschmann wrote: > During data refactoring of our Application I encountered $subject when > joining 4 CTEs with left join or inner join. > > > 1. Background > > PG 15.1 on Windows x64 (OS seems no to have no meening here) > > > I try to collect data from 4 (analyzed) 

Re: Weird failure with latches in curculio on v15

2023-02-08 Thread Robert Haas
On Wed, Feb 8, 2023 at 12:43 PM Nathan Bossart wrote: > I think this could be a good approach if we decide not to bake too much > into PostgreSQL itself (e.g., such as creating multiple archive workers > that each call out to the module). Archive module authors would > effectively need to write

Re: daitch_mokotoff module

2023-02-08 Thread Tomas Vondra
On 2/8/23 15:31, Dag Lem wrote: > Alvaro Herrera writes: > >> On 2023-Jan-17, Dag Lem wrote: >> >>> + * Daitch-Mokotoff Soundex >>> + * >>> + * Copyright (c) 2021 Finance Norway >>> + * Author: Dag Lem >> >> Hmm, I don't think we accept copyright lines that aren't "PostgreSQL >> Global

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-02-08 Thread David Rowley
On Thu, 2 Feb 2023 at 01:24, John Naylor wrote: > > > On Wed, Feb 1, 2023 at 6:41 PM David Rowley wrote: > > > > I don't really share Laurenz's worry [2] about compatibility break > > from renaming this GUC. I think the legitimate usages of this setting > > are probably far more rare than the

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Jim Jones
while working on another item of the TODO list I realized that I should be using a PG_TRY() block in he xmlDocDumpFormatMemory call. Fixed in v5. Best regards, Jim From f503b25c7fd8d984d29536e78577741e5e7c5e9f Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Thu, 2 Feb 2023 21:27:16 +0100

Re: SLRUs in the main buffer pool - Page Header definitions

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 20:04:52 +, Bagga, Rishu wrote: > To summarize, our underlying effort is to move the SLRUs to the buffer > cache. We were working with Thomas Munro off a patch he introduced here > [1]. Munro’s patch moves SLRUs to the buffer cache by introducing the > pseudo db id 9 to

Re: Move defaults toward ICU in 16?

2023-02-08 Thread Jeff Davis
On Thu, 2023-02-02 at 18:10 -0500, Tom Lane wrote: > Yeah.  I would be resistant to making ICU a required dependency, > but it doesn't seem unreasonable to start moving towards it being > our default collation support. Patch attached. To get the default locale, the patch initializes a UCollator

Re: Logical replication timeout problem

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 10:30:37 -0800, Andres Freund wrote: > On 2023-02-08 10:18:41 -0800, Andres Freund wrote: > > I don't think the syncrep logic in WalSndUpdateProgress really works as-is - > > consider what happens if e.g. the origin filter filters out entire > > transactions. We'll afaics never

Re: Deadlock between logrep apply worker and tablesync worker

2023-02-08 Thread Peter Smith
On Fri, Feb 3, 2023 at 6:58 PM houzj.f...@fujitsu.com wrote: > > On Thursday, February 2, 2023 7:21 PM Amit Kapila > wrote: > > > > On Thu, Feb 2, 2023 at 12:05 PM houzj.f...@fujitsu.com > > wrote: > > > > > > On Tuesday, January 31, 2023 1:07 AM vignesh C > > wrote: > > > > On Mon, 30 Jan

Re: recovery modules

2023-02-08 Thread Nathan Bossart
On Wed, Feb 08, 2023 at 10:24:18AM -0800, Andres Freund wrote: > If you'd reorder it so that 0004 applies independently from the other changes, > I'd just push that now. done -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 688566e23519f173a805696e4f00345f30d5d8e6 Mon Sep 17

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-08 Thread Peter Smith
On Wed, Feb 8, 2023 at 8:03 PM Hayato Kuroda (Fujitsu) wrote: > ... > > == > > > > src/backend/replication/logical/worker.c > > > > 2. maybe_apply_delay > > > > + if (wal_receiver_status_interval > 0 && > > + diffms > wal_receiver_status_interval * 1000L) > > + { > > + WaitLatch(MyLatch, > >

Re: Logical replication timeout problem

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 10:18:41 -0800, Andres Freund wrote: > I don't think the syncrep logic in WalSndUpdateProgress really works as-is - > consider what happens if e.g. the origin filter filters out entire > transactions. We'll afaics never get to WalSndUpdateProgress(). In some cases > we'll be

Re: recovery modules

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 09:57:56 -0800, Nathan Bossart wrote: > On Wed, Feb 08, 2023 at 09:33:44AM -0800, Andres Freund wrote: > > And yes, I'd be for a patch to remove all of those assertions. > > done If you'd reorder it so that 0004 applies independently from the other changes, I'd just push that

Re: A bug with ExecCheckPermissions

2023-02-08 Thread Alvaro Herrera
On 2023-Feb-08, Amit Langote wrote: > On Wed, Feb 8, 2023 at 16:19 Alvaro Herrera wrote: > > I think we should also patch ExecCheckPermissions to use forboth(), > > scanning the RTEs as it goes over the perminfos, and make sure that the > > entries are consistent. > > Hmm, we can’t use forboth

Re: Logical replication timeout problem

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 13:36:02 +0530, Amit Kapila wrote: > On Wed, Feb 8, 2023 at 10:57 AM Andres Freund wrote: > > > > On 2023-02-03 10:13:54 +0530, Amit Kapila wrote: > > > I am planning to push this to HEAD sometime next week (by Wednesday). > > > To backpatch this, we need to fix it in some

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-08 Thread Fujii Masao
On 2023/02/08 20:17, Tatsuo Ishii wrote: Attached is the v2 patch. Thanks for the patch! With the patch, I got the following error when executing make_etags.. $ ./src/tools/make_etags etags: invalid option -- 'e' Try 'etags --help' for a complete list of options. sort: No such file

Re: recovery modules

2023-02-08 Thread Nathan Bossart
On Wed, Feb 08, 2023 at 09:33:44AM -0800, Andres Freund wrote: > And yes, I'd be for a patch to remove all of those assertions. done -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 09fcca03d4a91be5757201cc311d3dad08463cd0 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date:

Re: HOT chain validation in verify_heapam()

2023-02-08 Thread Robert Haas
On Sun, Feb 5, 2023 at 3:57 AM Himanshu Upadhyaya wrote: > Thanks, yes it's working fine with Prepared Transaction. > Please find attached the v9 patch incorporating all the review comments. I don't know quite how we're still going around in circles about this, but this code makes no sense to me

Re: Weird failure with latches in curculio on v15

2023-02-08 Thread Nathan Bossart
On Wed, Feb 08, 2023 at 10:22:24AM -0500, Robert Haas wrote: > I felt like the archive modules work was a step forward when we did, > because basic_archive does some things that you're not likely to get > right if you do it on your own. And a similar approach to > restore_command might be also be

Re: when the startup process doesn't (logging startup delays)

2023-02-08 Thread Tom Lane
Bharath Rupireddy writes: > Thanks a lot Robert for taking care of this. The patch is committed on > HEAD and reverted on v15. Now that the minor version branches are > stamped, is it time for us to get this to v15? I can then close the CF > entry - https://commitfest.postgresql.org/42/4012/. No

Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent

2023-02-08 Thread Peter Geoghegan
On Wed, Feb 8, 2023 at 5:08 AM Aleksander Alekseev wrote: > > To me it's a pretty fundamental violation of how heap visibility works. > > I don't think this has much to do with heap visibility. It's true that > generally a command doesn't see its own tuples. This is done in order > to avoid the

Re: recovery modules

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 09:27:05 -0800, Nathan Bossart wrote: > On Wed, Feb 08, 2023 at 08:27:13AM -0800, Andres Freund wrote: > > One minor thing: I don't think we really need the AssertVariableIsOfType() > > for > > anything but the Init() one? > > This is another part that was borrowed from

Re: recovery modules

2023-02-08 Thread Nathan Bossart
On Wed, Feb 08, 2023 at 08:27:13AM -0800, Andres Freund wrote: > One minor thing: I don't think we really need the AssertVariableIsOfType() for > anything but the Init() one? This is another part that was borrowed from logical decoding output plugins. I'm not sure this adds much since f2b73c8

Re: run pgindent on a regular basis / scripted manner

2023-02-08 Thread Jelte Fennema
With the new patch --commit works as expected for me now. And sounds good to up the script a bit afterwards. On Wed, 8 Feb 2023 at 14:27, Andrew Dunstan wrote: > > > On 2023-02-08 We 07:41, Andrew Dunstan wrote: > > > On 2023-02-07 Tu 12:21, Jelte Fennema wrote: > > > Does the code-base flag

Re: when the startup process doesn't (logging startup delays)

2023-02-08 Thread Bharath Rupireddy
On Mon, Feb 6, 2023 at 9:39 PM Robert Haas wrote: > > On Mon, Feb 6, 2023 at 11:07 AM Tom Lane wrote: > > Umm ... is this really the sort of patch to be committing on a > > release wrap day? > > Oh, shoot, I wasn't thinking about that. Would you like me to revert > it in v15 for now? Thanks a

Re: Named Operators

2023-02-08 Thread Tom Lane
I wrote: > This approach does have a couple of shortcomings: > * You still have to invent an operator name, even if you never > plan to use it in queries. This is just cosmetic though. > It's not going to matter if the operator name is long or looks like > line noise, if you only need to use it

Re: recovery modules

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 16:23:34 +0900, Michael Paquier wrote: > On Sat, Feb 04, 2023 at 10:14:36AM -0800, Nathan Bossart wrote: > > On Sat, Feb 04, 2023 at 11:59:20AM +0900, Michael Paquier wrote: > >> + ArchiveModuleCallbacks struct filled with the callback function > >> pointers for > >> This

Re: meson: Non-feature feature options

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 11:45:05 +0100, Peter Eisentraut wrote: > Most meson options (meson_options.txt) that enable an external dependency > (e.g., icu, ldap) are of type 'feature'. Most of these have a default value > of 'auto', which means they are pulled in automatically if found. Some have > a

Re: Why cann't simplify stable function in planning phase?

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 09:57:04 -0500, Tom Lane wrote: > Tomas Vondra writes: > > Note: To be precise this is not about "executions" but about snapshots, > > and we could probably simplify the function call with isolation levels > > that maintain a single snapshot (e.g. REPEATABLE READ). But we

Re: OpenSSL 3.0.0 vs old branches

2023-02-08 Thread Tom Lane
Erik Rijkers writes: > Op 08-02-2023 om 05:37 schreef Tom Lane: >> Question: is anybody around here still testing with 0.9.8 (or 1.0.x) >> at all? The systems I had that had that version on them are dead. > I've hoarded an old centos 6.1 system that I don't really use anymore > but sometimes

Re: Named Operators

2023-02-08 Thread Tom Lane
Peter Eisentraut writes: > On 12.01.23 14:55, Matthias van de Meent wrote: >>> Matter of taste, I guess. But more importantly, defining an operator >>> gives you many additional features that the planner can use to >>> optimize your query differently, which it can't do with functions. See >>> the

Re: typos

2023-02-08 Thread Justin Pryzby
Some more accumulated/new typos. >From 6c79a0d4e0251dbbac38babb60bb2d0fbae3da8d Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 11 Jan 2023 12:52:25 -0600 Subject: [PATCH 01/10] use "an SQL" rather than a SQL Per 04539e --- doc/src/sgml/ecpg.sgml | 6 +++--- 1 file changed, 3

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-08 Thread Kirk Wolak
On Wed, Feb 8, 2023 at 3:08 AM Pavel Stehule wrote: > hi > > st 8. 2. 2023 v 7:33 odesílatel Julien Rouhaud > napsal: > >> On Tue, Feb 07, 2023 at 08:48:22PM +0100, Pavel Stehule wrote: >> > >> > GET DIAGNOSTICS _oid = PG_ROUTINE_OID; >> > RAISE NOTICE '... % ... %', _oid, _oid::regproc::text;

Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent

2023-02-08 Thread Andres Freund
Hi, On 2023-02-08 16:08:39 +0300, Aleksander Alekseev wrote: > > To me it's a pretty fundamental violation of how heap visibility works. > > I don't think this has much to do with heap visibility. It's true that > generally a command doesn't see its own tuples. This is done in order > to avoid

Re: OpenSSL 3.0.0 vs old branches

2023-02-08 Thread Peter Eisentraut
On 07.02.23 19:28, Tom Lane wrote: I think Peter's misremembering the history, and OpenSSL 3*is* supported in these branches. There could be an argument for not back-patching f0d2c65f17 on the grounds that pre-1.1.1 is also supported there. On the whole though, it seems more useful today for

Re: Weird failure with latches in curculio on v15

2023-02-08 Thread Robert Haas
On Sun, Feb 5, 2023 at 7:46 PM Nathan Bossart wrote: > Got it. I suspect we'll want to do something similar for archive modules > eventually, too. +1. I felt like the archive modules work was a step forward when we did, because basic_archive does some things that you're not likely to get right

Re: OpenSSL 3.0.0 vs old branches

2023-02-08 Thread Erik Rijkers
Op 08-02-2023 om 05:37 schreef Tom Lane: Michael Paquier writes: On Tue, Feb 07, 2023 at 01:28:26PM -0500, Tom Lane wrote: I think Peter's misremembering the history, and OpenSSL 3 *is* supported in these branches. There could be an argument for not back-patching f0d2c65f17 on the grounds

Re: Why cann't simplify stable function in planning phase?

2023-02-08 Thread Tom Lane
Tomas Vondra writes: > Note: To be precise this is not about "executions" but about snapshots, > and we could probably simplify the function call with isolation levels > that maintain a single snapshot (e.g. REPEATABLE READ). But we don't. We don't do that because, in fact, execution is *never*

Re: daitch_mokotoff module

2023-02-08 Thread Dag Lem
Alvaro Herrera writes: > On 2023-Jan-17, Dag Lem wrote: > >> + * Daitch-Mokotoff Soundex >> + * >> + * Copyright (c) 2021 Finance Norway >> + * Author: Dag Lem > > Hmm, I don't think we accept copyright lines that aren't "PostgreSQL > Global Development Group". Is it okay to use that, and

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-02-08 Thread Bharath Rupireddy
On Wed, Feb 8, 2023 at 10:33 AM Dilip Kumar wrote: > > On Wed, Feb 8, 2023 at 9:57 AM Bharath Rupireddy > wrote: > > > > I can also do a few other things, but before working on them, I'd like > > to hear from others: > > 1. A separate wait event (WAIT_EVENT_WAL_READ_FROM_BUFFERS) for > > reading

Re: PostgreSQL 16 Dev apt-based Linux unable to install

2023-02-08 Thread Justin Pryzby
On Wed, Feb 08, 2023 at 10:46:42AM +0100, André Verwijs wrote: > > PostgreSQL 16 Dev  apt-based Linux,  unable to install  > make sure all dependencies are resolved, like libpq5 (or higher) for testing > ... > > " postgresql-client-16 : Prerequisites: libpq5 (>= 16~~devel) but >

Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-02-08 Thread Hans Buschmann
During data refactoring of our Application I encountered $subject when joining 4 CTEs with left join or inner join. 1. Background PG 15.1 on Windows x64 (OS seems no to have no meening here) I try to collect data from 4 (analyzed) tables (up,li,in,ou) by grouping certain data (4 CTEs

Re: Hi i am Intrested to contribute

2023-02-08 Thread Aleksander Alekseev
Hi, Shivam! > You may find useful the guide on how to contribute [1]. You can freely > choose what you want (from the list of TODOs linked or anything else) > and work on it, no permission from anyone is necessary. > The downside is that it's not easy to detect what is useful for the > first

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

2023-02-08 Thread shveta malik
On Tue, Feb 7, 2023 at 8:18 AM shiy.f...@fujitsu.com wrote: > > > On Thu, Feb 2, 2023 11:48 AM shveta malik wrote: > > > > > > So to fix this, I think either we update origin and slot entries in > > the system catalog after the creation has passed or we clean-up the > > system catalog in case of

Re: Parallelize correlated subqueries that execute within each worker

2023-02-08 Thread James Coleman
On Mon, Feb 6, 2023 at 11:39 AM Antonin Houska wrote: > > James Coleman wrote: > > Which this patch we do in fact now see (as expected) rels with > > non-empty lateral_relids showing up in generate_[useful_]gather_paths. > > And the partial paths can now have non-empty required outer rels. I'm >

Re: run pgindent on a regular basis / scripted manner

2023-02-08 Thread Andrew Dunstan
On 2023-02-08 We 07:41, Andrew Dunstan wrote: On 2023-02-07 Tu 12:21, Jelte Fennema wrote: Does the code-base flag still make sense if you can simply pass a directory as regular args now? Probably not. I'll look into removing it. What we should probably do is remove all the build

Re: daitch_mokotoff module

2023-02-08 Thread Dag Lem
Tomas Vondra writes: > On 2/7/23 18:08, Paul Ramsey wrote: >> >> >>> On Feb 7, 2023, at 6:47 AM, Dag Lem wrote: >>> >>> I just went by to check the status of the patch, and I noticed that >>> you've added yourself as reviewer earlier - great! >>> >>> Please tell me if there is anything I can

Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent

2023-02-08 Thread Aleksander Alekseev
Hi, > To me it's a pretty fundamental violation of how heap visibility works. I don't think this has much to do with heap visibility. It's true that generally a command doesn't see its own tuples. This is done in order to avoid the Halloween problem which however can't happen in this particular

  1   2   >