Re: EINTR in ftruncate()

2022-07-06 Thread Thomas Munro
On Thu, Jul 7, 2022 at 9:05 AM Thomas Munro wrote: > On Thu, Jul 7, 2022 at 9:03 AM Andres Freund wrote: > > On 2022-07-07 08:56:33 +1200, Thomas Munro wrote: > > > On Thu, Jul 7, 2022 at 8:39 AM Andres Freund wrote: > > > > So I think we need: 1) block most signals, 2) a retry loop *without* >

Re: Eliminating SPI from RI triggers - take 2

2022-07-06 Thread Amit Langote
On Wed, Jul 6, 2022 at 11:55 AM Amit Langote wrote: > On Wed, Jul 6, 2022 at 3:24 AM Jacob Champion wrote: > > On Thu, Jun 30, 2022 at 11:23 PM Amit Langote > > wrote: > > > > > > I will continue investigating what to do about points (1) and (2) > > > mentioned above and see if we can do away

Re: pg_upgrade (12->14) fails on aggregate

2022-07-06 Thread Michael Paquier
On Tue, Jul 05, 2022 at 11:29:03PM -0400, Tom Lane wrote: > Yeah. I think that 08385ed26 fixes this, but we've had no new > reports yet :-( Indeed. Things are right now. Thanks! -- Michael signature.asc Description: PGP signature

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-07-06 Thread Michael Paquier
On Thu, Jul 07, 2022 at 09:11:57AM +0900, Michael Paquier wrote: > Okay, thanks for confirming. I think that I'll give it a try today > then, my schedule would fit nicely with the buildfarm monitoring. And I have applied that, after noticing that the MinGW was complaining because _WIN32_WINNT

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

2022-07-06 Thread wangw.f...@fujitsu.com
On Mon, Jul 4, 2022 at 14:47 AM Peter Smith wrote: > Below are some review comments for patch v14-0004: Thanks for your comments. > 4.0 General. > > This comment is an after-thought but as I write this mail I am > wondering if most of this 0004 patch is even necessary at all? Instead > of

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

2022-07-06 Thread wangw.f...@fujitsu.com
On Mon, Jul 4, 2022 at 12:12 AM Peter Smith wrote: > Below are some review comments for patch v14-0003: Thanks for your comments. > 3.1 Commit message > > If any of the following checks are violated, an error will be reported. > 1. The unique columns between publisher and subscriber are

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

2022-07-06 Thread wangw.f...@fujitsu.com
On Fri, Jul 1, 2022 at 17:44 PM Amit Kapila wrote: > Thanks for your comments. > On Fri, Jul 1, 2022 at 12:13 PM Peter Smith wrote: > > > > == > > > > 1.2 doc/src/sgml/protocol.sgml - Protocol constants > > > > Previously I wrote that since there are protocol changes here, > > shouldn’t

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

2022-07-06 Thread shiy.f...@fujitsu.com
On Tue, Jun 28, 2022 11:22 AM Wang, Wei/王 威 wrote: > > I also improved patches as suggested by Peter-san in [1] and [2]. > Thanks for Shi Yu to improve the patches by addressing the comments in [2]. > > Attach the new patches. > Thanks for updating the patch. Here are some comments. 0001

Re: tuplesort Generation memory contexts don't play nicely with index builds

2022-07-06 Thread Tom Lane
David Rowley writes: > On Thu, 7 Jul 2022 at 13:41, John Naylor wrote: >> Hmm, the commit appeared on git.postgresql.org, but apparently not in >> my email nor the list archives. > Strange. I'd suspect a temporary hiccup in whatever code pushes the > commits onto the mailing list, but I see

Re: Fast COPY FROM based on batch insert

2022-07-06 Thread Ian Barwick
2022年3月24日(木) 15:44 Andrey V. Lepikhov : > > On 3/22/22 06:54, Etsuro Fujita wrote: > > On Fri, Jun 4, 2021 at 5:26 PM Andrey Lepikhov > > wrote: > >> We still have slow 'COPY FROM' operation for foreign tables in current > >> master. > >> Now we have a foreign batch insert operation And I tried

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-06 Thread Masahiko Sawada
On Wed, Jul 6, 2022 at 5:55 PM Amit Kapila wrote: > > On Wed, Jul 6, 2022 at 12:19 PM Masahiko Sawada wrote: > > > > On Tue, Jul 5, 2022 at 8:00 PM Amit Kapila wrote: > > > > > > 2. Are we anytime removing transaction ids from catchanges->xip array? > > > > No. > > > > > If not, is there a

Re: tuplesort Generation memory contexts don't play nicely with index builds

2022-07-06 Thread David Rowley
On Thu, 7 Jul 2022 at 13:41, John Naylor wrote: > > On Thu, Jul 7, 2022 at 3:16 AM David Rowley wrote: > > > > Pushed. > > Hmm, the commit appeared on git.postgresql.org, but apparently not in > my email nor the list archives. Strange. I'd suspect a temporary hiccup in whatever code pushes the

Re: Issue with pg_stat_subscription_stats

2022-07-06 Thread Masahiko Sawada
On Thu, Jul 7, 2022 at 1:28 AM Andres Freund wrote: > > On 2022-07-05 14:52:45 -0700, Andres Freund wrote: > > On 2022-07-04 11:01:01 +0900, Masahiko Sawada wrote: > > > I've attached the patch, fix_drop_subscriptions_stats.patch, to fix it. > > > > LGTM. Unless somebody sees a reason not to, I'm

Re: Issue with pg_stat_subscription_stats

2022-07-06 Thread Masahiko Sawada
On Thu, Jul 7, 2022 at 12:53 AM Andres Freund wrote: > > Hi, > > On 2022-07-06 11:41:46 +0900, Masahiko Sawada wrote: > > diff --git a/src/test/regress/sql/subscription.sql > > b/src/test/regress/sql/subscription.sql > > index 74c38ead5d..6a46956f6e 100644 > > ---

Re: tuplesort Generation memory contexts don't play nicely with index builds

2022-07-06 Thread John Naylor
On Thu, Jul 7, 2022 at 3:16 AM David Rowley wrote: > > Pushed. Hmm, the commit appeared on git.postgresql.org, but apparently not in my email nor the list archives. -- John Naylor EDB: http://www.enterprisedb.com

Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

2022-07-06 Thread Michael Paquier
On Wed, Jul 06, 2022 at 04:26:38PM +0300, Maxim Orlov wrote: > Yeah, it looks even better now. Especially knowing that the test uses a segment size of 1MB via initdb to be cheaper. v2 looks fine by itself, so applied. -- Michael signature.asc Description: PGP signature

Re: pg_parameter_aclcheck() and trusted extensions

2022-07-06 Thread Michael Paquier
On Wed, Jul 06, 2022 at 03:47:27PM -0700, Nathan Bossart wrote: > I think the call to superuser_arg() in pg_parameter_aclmask() is causing > set_config_option() to bypass the normal privilege checks, as > execute_extension_script() will have set the user ID to the bootstrap > superuser for trusted

Re: defGetBoolean - Fix comment

2022-07-06 Thread Michael Paquier
On Thu, Jul 07, 2022 at 09:53:01AM +1000, Peter Smith wrote: > Really this code is for the case when there *was* a parameter given > (e.g. "copy_data" in my example above) but when there is no parameter > *value* given. > > Suggested comment fix: > BEFORE > If no parameter given, assume "true" is

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-07-06 Thread Michael Paquier
On Wed, Jul 06, 2022 at 05:13:27PM -0400, Andrew Dunstan wrote: > On 2022-07-06 We 16:46, Thomas Munro wrote: >> The build farm also has frogmouth and currawong, 32 bit systems >> running Windows XP, but they are only testing REL_10_STABLE so I >> assume Andrew will decommission them in November.

Re: Backup command and functions can cause assertion failure and segmentation fault

2022-07-06 Thread Michael Paquier
On Wed, Jul 06, 2022 at 11:27:58PM +0900, Fujii Masao wrote: > For the test, BASE_BACKUP needs to be canceled after it finishes > do_pg_backup_start(), i.e., checkpointing, and before it calls > do_pg_backup_stop(). So the timing to cancel that seems more severe > than the test added in 0475a97f.

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

2022-07-06 Thread Andres Freund
Hi, On 2022-06-13 19:08:35 +0530, Nitin Jadhav wrote: > > Have you measured the performance effects of this? On fast storage with > > large > > shared_buffers I've seen these loops in profiles. It's probably fine, but > > it'd > > be good to verify that. > > To understand the performance

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

2022-07-06 Thread Michael Paquier
On Wed, Jul 06, 2022 at 11:05:51AM -0700, Jacob Champion wrote: > [CFM hat] Looking through the history here, this has been bumped to > Ready for Committer a few times and then bumped back to Needs Review > after a required rebase. What's the best way for us to provide support > for contributors

defGetBoolean - Fix comment

2022-07-06 Thread Peter Smith
Hi. IMO the comment ("If no parameter given, ...") is a bit misleading: (gdb) list 108 defGetBoolean(DefElem *def) 109 { 110 /* 111 * If no parameter given, assume "true" is meant. 112 */ 113 if (def->arg == NULL) 114 return true; 115 116 /* 117 * Allow 0, 1, "true", "false", "on", "off"

Re:

2022-07-06 Thread Peter Smith
On Thu, Jun 16, 2022 at 10:59 AM Peter Smith wrote: > > On Thu, Jun 9, 2022 at 11:50 PM Tom Lane wrote: > > > > Peter Eisentraut writes: > > > Initially, that chapter did not document any system views. > > > > Maybe we could make the system views a separate chapter? > > +1 There has not been

Fwd: Add red-black tree missing comparison searches

2022-07-06 Thread Steve Chavez
-- Forwarded message - From: Steve Chavez Date: Wed, 6 Jul 2022 at 18:14 Subject: Re: Add red-black tree missing comparison searches To: Alexander Korotkov Thanks Alexander! wrt to the new patch. I think the following comment is misleading since keyDeleted can be true or

pg_parameter_aclcheck() and trusted extensions

2022-07-06 Thread Nathan Bossart
Hi hackers, I found that as of a0ffa88, it's possible to set a PGC_SUSET GUC defined by a trusted extension as a non-superuser. I've confirmed that this only affects v15 and later versions. postgres=# CREATE ROLE testuser; CREATE ROLE postgres=# GRANT CREATE ON DATABASE

Re: tuplesort Generation memory contexts don't play nicely with index builds

2022-07-06 Thread Robert Haas
On Tue, Jul 5, 2022 at 9:34 PM David Rowley wrote: > I voiced my dislike for the patch I came up with to fix this issue to > Andres. He suggested that I just add a version of index_form_tuple > that can be given a MemoryContext pointer to allocate the returned > tuple into. > > I like that idea

Re: automatically generating node support functions

2022-07-06 Thread Tom Lane
I wrote: > I have gone through this and made some proposed changes (attached), > and I think it is almost committable. I see from the cfbot that it now needs to be taught about RelFileNumber... regards, tom lane

Re: making relfilenodes 56 bits

2022-07-06 Thread Robert Haas
On Wed, Jul 6, 2022 at 11:57 AM Robert Haas wrote: > I think 0002 and 0003 need more work yet; I'll try to write a review > of those soon. Regarding 0002: I don't particularly like the names BufTagCopyRelFileLocator and BufTagRelFileLocatorEquals. My suggestion is to rename

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-07-06 Thread Andrew Dunstan
On 2022-07-06 We 16:46, Thomas Munro wrote: > On Wed, Jul 6, 2022 at 7:28 PM Michael Paquier wrote: >> On Thu, Jun 16, 2022 at 03:14:16PM +0900, Michael Paquier wrote: >>> Actually, this can go with the bump of MIN_WINNT as it uses one of the >>> IsWindows*OrGreater() macros as a runtime check.

Re: EINTR in ftruncate()

2022-07-06 Thread Thomas Munro
On Thu, Jul 7, 2022 at 9:03 AM Andres Freund wrote: > On 2022-07-07 08:56:33 +1200, Thomas Munro wrote: > > On Thu, Jul 7, 2022 at 8:39 AM Andres Freund wrote: > > > So I think we need: 1) block most signals, 2) a retry loop *without* > > > interrupt checks. > > > > Yeah. I was also wondering

Re: EINTR in ftruncate()

2022-07-06 Thread Andres Freund
Hi, On 2022-07-07 08:56:33 +1200, Thomas Munro wrote: > On Thu, Jul 7, 2022 at 8:39 AM Andres Freund wrote: > > So I think we need: 1) block most signals, 2) a retry loop *without* > > interrupt checks. > > Yeah. I was also wondering about wrapping the whole function in > PG_SETMASK(),

Re: EINTR in ftruncate()

2022-07-06 Thread Thomas Munro
On Thu, Jul 7, 2022 at 8:39 AM Andres Freund wrote: > On 2022-07-06 21:29:41 +0200, Alvaro Herrera wrote: > > On 2022-Jul-05, Andres Freund wrote: > > > > > I think we'd be better off disabling at least some signals during > > > dsm_impl_posix_resize(). I'm afraid we'll otherwise just find

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-07-06 Thread Thomas Munro
On Wed, Jul 6, 2022 at 7:28 PM Michael Paquier wrote: > On Thu, Jun 16, 2022 at 03:14:16PM +0900, Michael Paquier wrote: > > Actually, this can go with the bump of MIN_WINNT as it uses one of the > > IsWindows*OrGreater() macros as a runtime check. And there are two > > more places in pg_ctl.c

Re: automatically generating node support functions

2022-07-06 Thread Tom Lane
Peter Eisentraut writes: > [ v7-0001-Automatically-generate-node-support-functions.patch ] I have gone through this and made some proposed changes (attached), and I think it is almost committable. There is one nasty problem we need a solution to, which is that pgindent is not at all on board

Re: EINTR in ftruncate()

2022-07-06 Thread Andres Freund
Hi, On 2022-07-06 21:29:41 +0200, Alvaro Herrera wrote: > On 2022-Jul-05, Andres Freund wrote: > > > I think we'd be better off disabling at least some signals during > > dsm_impl_posix_resize(). I'm afraid we'll otherwise just find another > > variation of these problems. I haven't checked the

Re: tuplesort Generation memory contexts don't play nicely with index builds

2022-07-06 Thread David Rowley
On Wed, 6 Jul 2022 at 13:34, David Rowley wrote: > If there are no objections, I plan to push this in the next 24 hours. Pushed. David

Re: EINTR in ftruncate()

2022-07-06 Thread Alvaro Herrera
On 2022-Jul-05, Andres Freund wrote: > I think we'd be better off disabling at least some signals during > dsm_impl_posix_resize(). I'm afraid we'll otherwise just find another > variation of these problems. I haven't checked the source of ftruncate, but > what Thomas dug up for fallocate makes

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

2022-07-06 Thread Andres Freund
Hi, On 2022-07-05 13:24:55 -0400, Melanie Plageman wrote: > From 2d089e26236c55d1be5b93833baa0cf7667ba38d Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Tue, 28 Jun 2022 11:33:04 -0400 > Subject: [PATCH v22 1/3] Add BackendType for standalone backends > > All backends should have a

Re: Add red-black tree missing comparison searches

2022-07-06 Thread Alexander Korotkov
Hi, Steve! On Sat, Jul 2, 2022 at 10:38 PM Steve Chavez wrote: > > But I think we can support strict inequalities too (e.g. > less and greater without equals). Could you please make it a bool > argument equal_matches? > > Sure, an argument is a good idea to keep the code shorter. > > > Could

Re: Make name optional in CREATE STATISTICS

2022-07-06 Thread Matthias van de Meent
On Sun, 15 May 2022 at 14:20, Simon Riggs wrote: > > Currently, CREATE STATS requires you to think of a name for each stats > object, which is fairly painful, so users would prefer an > automatically assigned name. > > Attached patch allows this, which turns out to be very simple, since a > name

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

2022-07-06 Thread Jacob Champion
On Mon, Mar 28, 2022 at 11:07 PM Kyotaro Horiguchi wrote: > > Rebased. Unfortunately this will need another rebase over latest. [CFM hat] Looking through the history here, this has been bumped to Ready for Committer a few times and then bumped back to Needs Review after a required rebase.

Re: Custom tuplesorts for extensions

2022-07-06 Thread Alexander Korotkov
.Hi! On Wed, Jul 6, 2022 at 6:01 PM Andres Freund wrote: > I think this needs to be evaluated for performance... Surely, this needs. > I agree with the nearby comment that the commits need a bit of justification > at least to review them. Will do this. > > From

Re: doc: Move enum storage commentary to top of section

2022-07-06 Thread David G. Johnston
On Wed, Jul 6, 2022 at 10:24 AM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Thu, 9 Jun 2022 at 18:12, David G. Johnston > wrote: > > > > Per suggestion over on -docs: > > > > >

Re: doc: Move enum storage commentary to top of section

2022-07-06 Thread Matthias van de Meent
On Thu, 9 Jun 2022 at 18:12, David G. Johnston wrote: > > Per suggestion over on -docs: > > https://www.postgresql.org/message-id/bl0pr06mb4978f6c0b69f3f03aebed0fbb3...@bl0pr06mb4978.namprd06.prod.outlook.com I agree with moving the size of an enum into the top, but I don't think that the label

Re: AIX support - alignment issues

2022-07-06 Thread Robert Haas
On Wed, Jul 6, 2022 at 12:27 PM Andres Freund wrote: > I think my proposal of introducing a version of double that is marked to be 8 > byte aligned should do the trick as well, and doesn't have the problem of > changing the meaning of 'double' references in external headers. In fact, we > already

Re: Possible fails in pg_stat_statements test

2022-07-06 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:00 PM Julien Rouhaud wrote: > > Indeed. Then there is a very simple solution for this particular case as > > wal_records counter may only sometime becomes greater but never less. > > The corresponding patch is attached. > > +1 for this approach, and the patch looks good

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

2022-07-06 Thread Nathan Bossart
Here's a new revision where I've attempted to address all the feedback I've received thus far. Notably, the custodian now uses a queue for registering tasks and determining which tasks to execute. Other changes include splitting the temporary file functions apart to avoid consecutive boolean

Re: archive modules

2022-07-06 Thread Nathan Bossart
On Wed, Jul 06, 2022 at 06:21:24PM +0200, talk to ben wrote: > I am not sure why, but I can't find "basic_archive.archive_directory" in > pg_settings the same way I would find for example : > "pg_stat_statements.max". > > [local]:5656 benoit@postgres=# SELECT count(*) FROM pg_settings WHERE name

Re: Issue with pg_stat_subscription_stats

2022-07-06 Thread Andres Freund
On 2022-07-05 14:52:45 -0700, Andres Freund wrote: > On 2022-07-04 11:01:01 +0900, Masahiko Sawada wrote: > > I've attached the patch, fix_drop_subscriptions_stats.patch, to fix it. > > LGTM. Unless somebody sees a reason not to, I'm planning to commit that to 15 > and HEAD. Pushed.

Re: AIX support - alignment issues

2022-07-06 Thread Andres Freund
Hi, On 2022-07-06 11:55:57 -0400, Robert Haas wrote: > On Sat, Jul 2, 2022 at 2:34 PM Andres Freund wrote: > > I strikes me as a remarkably bad idea to manually try to maintain the > > correct > > alignment. Even with the tests added it's still quite manual and requires > > contorted struct

Re: archive modules

2022-07-06 Thread talk to ben
Hi, I am not sure why, but I can't find "basic_archive.archive_directory" in pg_settings the same way I would find for example : "pg_stat_statements.max". [local]:5656 benoit@postgres=# SELECT count(*) FROM pg_settings WHERE name = 'basic_archive.archive_directory'; count --- 0 (1 row)

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-07-06 Thread Fujii Masao
On 2022/03/16 10:29, Kyotaro Horiguchi wrote: At Wed, 16 Mar 2022 09:19:13 +0900 (JST), Kyotaro Horiguchi wrote in In short, I split out the two topics other than checkpoint log to other threads. So, this is about the main topic of this thread, adding LSNs to checkpint log. Other topics

Re: making relfilenodes 56 bits

2022-07-06 Thread Robert Haas
On Wed, Jul 6, 2022 at 7:55 AM Dilip Kumar wrote: > Okay, changed that and changed a few more occurrences in 0001 which > were on similar lines. I also tested the performance of pg_bench > where concurrently I am running the script which creates/drops > relation but I do not see any regression

Re: AIX support - alignment issues

2022-07-06 Thread Robert Haas
On Sat, Jul 2, 2022 at 2:34 PM Andres Freund wrote: > I strikes me as a remarkably bad idea to manually try to maintain the correct > alignment. Even with the tests added it's still quite manual and requires > contorted struct layouts (see e.g. [1]). > > I think we should either teach our system

Re: Issue with pg_stat_subscription_stats

2022-07-06 Thread Andres Freund
Hi, On 2022-07-06 11:41:46 +0900, Masahiko Sawada wrote: > diff --git a/src/test/regress/sql/subscription.sql > b/src/test/regress/sql/subscription.sql > index 74c38ead5d..6a46956f6e 100644 > --- a/src/test/regress/sql/subscription.sql > +++ b/src/test/regress/sql/subscription.sql > @@ -30,6

Re: In-placre persistance change of a relation

2022-07-06 Thread Jacob Champion
On Thu, Mar 31, 2022 at 2:36 AM Kyotaro Horiguchi wrote: > > At Thu, 31 Mar 2022 18:33:18 +0900 (JST), Kyotaro Horiguchi > wrote in > > I don't think this can be commited to 15. So I post the fixed version > > then move this to the next CF. > > Then done. Thanks! Hello! This patchset will need

Re: [RFC] Improving multi-column filter cardinality estimation using MCVs and HyperLogLog

2022-07-06 Thread Matthias van de Meent
Sorry for waking a dead thread, I had this in my drafts folder that I was cleaning, and wanted to share this so anyone interested can reuse these thoughts. On Thu, 26 May 2022 at 03:19, Bruce Momjian wrote: > I read this email today and participated in an unconference session on > this topic

Re: Custom tuplesorts for extensions

2022-07-06 Thread Andres Freund
Hi, I think this needs to be evaluated for performance... I agree with the nearby comment that the commits need a bit of justification at least to review them. On 2022-06-23 15:12:27 +0300, Maxim Orlov wrote: > From 03b78cdade3b86a0e97723721fa1d0bd64d0c7df Mon Sep 17 00:00:00 2001 > From:

Re: Use outerPlanState macro instead of referring to leffttree

2022-07-06 Thread Tom Lane
Richard Guo writes: > On Sat, Jul 2, 2022 at 5:32 AM Tom Lane wrote: >> Backing up a little bit, one thing not to like about the outerPlanState >> and innerPlanState macros is that they lose all semblance of type >> safety: > Your concern makes sense. I think outerPlan and innerPlan macros

Re: Custom tuplesorts for extensions

2022-07-06 Thread Matthias van de Meent
On Thu, 23 Jun 2022 at 14:12, Maxim Orlov wrote: > > Hi! > > I've reviewed the patchset and noticed some minor issues: > - extra semicolon in macro (lead to warnings) > - comparison of var isWorker should be done in different way > > Here is an upgraded version of the patchset. > > Overall, I

Re: transformLockingClause() bug

2022-07-06 Thread Tom Lane
Dean Rasheed writes: > The problem is that the parser has generated a join rte with > eref->aliasname = "unnamed_join", and then transformLockingClause() > finds that before finding the relation rte for t3 whose user-supplied > alias is also "unnamed_join". > I think the answer is that

Re: Backup command and functions can cause assertion failure and segmentation fault

2022-07-06 Thread Fujii Masao
On 2022/07/01 15:41, Michael Paquier wrote: On Fri, Jul 01, 2022 at 03:32:50PM +0900, Fujii Masao wrote: Sounds good idea to me. I updated the patch in that way. Attached. Skimming quickly through the thread, this failure requires a termination of a backend running BASE_BACKUP. This is

Re: AIX support - alignment issues

2022-07-06 Thread Tom Lane
I wrote: > Our HEAD does work on that NetBSD installation. I can try this > patch, but it'll take an hour or two to get results ... stay tuned. Indeed, I still get a clean build and "make check" passes with this patch. regards, tom lane

transformLockingClause() bug

2022-07-06 Thread Dean Rasheed
While doing more testing of [1], I realised that it has a bug, which reveals a pre-existing problem in transformLockingClause(): CREATE TABLE t1(a int); CREATE TABLE t2(a int); CREATE TABLE t3(a int); SELECT 1 FROM t1 JOIN t2 ON t1.a = t2.a, t3 AS unnamed_join FOR UPDATE OF unnamed_join;

Re: Making the subquery alias optional in the FROM clause

2022-07-06 Thread Dean Rasheed
On Tue, 5 Jul 2022 at 19:00, Tom Lane wrote: > > Dean Rasheed writes: > > This was discussed previously in [1], and there seemed to be general > > consensus in favour of it, but no new patch emerged. > > As I said in that thread, I'm not super enthused about this, but I was > clearly in the

Re: AIX support - alignment issues

2022-07-06 Thread Tom Lane
Peter Eisentraut writes: > On 06.07.22 04:21, Thomas Munro wrote: >> /* >> * Do not try to collapse these into one "w+" mode file. Doesn't work on >> - * some platforms (eg, HPUX 10.20). >> + * some platforms. >> */ >> termin = fopen("/dev/tty", "r"); >> termout = fopen("/dev/tty", "w");

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

2022-07-06 Thread Masahiko Sawada
On Tue, Jul 5, 2022 at 5:09 PM Andres Freund wrote: > > Hi, > > On 2022-07-05 16:33:17 +0900, Masahiko Sawada wrote: > > On Tue, Jul 5, 2022 at 6:18 AM Andres Freund wrote: > > A datum value is convenient to represent both a pointer and a value so > > I used it to avoid defining node types for

Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

2022-07-06 Thread Maxim Orlov
> > I'm sorry for some nitpicking about changes in the comments: > - The number of WAL segments advanced hasn't changed from 5 to 1, it just > advances as 1+4 as previously. So the original comment is right. I reverted > this in v2. > Yeah, it looks even better now. -- Best regards, Maxim

Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

2022-07-06 Thread Pavel Borisov
On Wed, Jul 6, 2022 at 5:05 PM Maxim Orlov wrote: > Hi! > > This is an obvious change, I totally for it. Hope it will be commited soon. > I'm sorry for some nitpicking about changes in the comments: - The number of WAL segments advanced hasn't changed from 5 to 1, it just advances as 1+4 as

Re: [RFC] building postgres with meson -v9

2022-07-06 Thread Andres Freund
Hi On 2022-07-06 11:03:31 +0200, Peter Eisentraut wrote: > On 01.07.22 11:33, Andres Freund wrote: > > Attached is an updated version of the meson patchset. There has been a > > steady > > stream of incremental work over the last month, with patches from Peter > > Eisentraut and Nazir Yavuz. > >

Re: First draft of the PG 15 release notes

2022-07-06 Thread Bruce Momjian
On Tue, Jul 5, 2022 at 07:45:57PM -0700, Noah Misch wrote: > On Tue, Jul 05, 2022 at 07:47:52PM -0400, Bruce Momjian wrote: > > Yes, I think it is a question of practicality vs. desirability. We are > > basically telling people they have to do research to get the old > > behavior in their new

Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

2022-07-06 Thread Maxim Orlov
Hi! This is an obvious change, I totally for it. Hope it will be commited soon. -- Best regards, Maxim Orlov.

Re: AIX support - alignment issues

2022-07-06 Thread Peter Eisentraut
On 06.07.22 04:21, Thomas Munro wrote: /* * Do not try to collapse these into one "w+" mode file. Doesn't work on -* some platforms (eg, HPUX 10.20). +* some platforms. */ termin = fopen("/dev/tty", "r"); termout = fopen("/dev/tty", "w");

Re: Custom tuplesorts for extensions

2022-07-06 Thread Maxim Orlov
Hi! Overall patch looks good let's mark it as ready for committer, shall we? -- Best regards, Maxim Orlov.

Re: doc: Fix description of how the default user name is chosen

2022-07-06 Thread Peter Eisentraut
On 06.07.22 14:30, Matthias van de Meent wrote: If we're going to change this anyway, could we replace 'user name' with 'username' in the connection documentation? It irks me to see so much 'user name' while our connection parameter is 'username', and we use the username of the OS user, not the

Re: doc: Fix description of how the default user name is chosen

2022-07-06 Thread Matthias van de Meent
On Wed, 6 Jul 2022 at 02:43, David G. Johnston wrote: > > On Tue, Jul 5, 2022 at 5:20 PM Tom Lane wrote: >> >> "David G. Johnston" writes: >> > In passing, the authentication error examples use the phrase >> > "database user name" in a couple of locations. The word >> > database in

Re: pg15b2: large objects lost on upgrade

2022-07-06 Thread Robert Haas
On Wed, Jul 6, 2022 at 7:56 AM Justin Pryzby wrote: > I'm looking into it, but it'd help to hear suggestions about where to put it. > My current ideas aren't very good. In main() there is a comment that begins "Most failures happen in create_new_objects(), which has just completed at this

Re[2]: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-07-06 Thread Svetlana Derevyanko
  >Вторник, 5 июля 2022, 18:29 +03:00 от Tom Lane : >  >=?UTF-8?B?U3ZldGxhbmEgRGVyZXZ5YW5rbw==?= < s.derevya...@postgrespro.ru > >writes: >> It seems useful to have [OR REPLACE] option in CREATE OPERATOR statement, as >> in CREATE FUNCTION. This option may be good for writing extension update

Re: pg15b2: large objects lost on upgrade

2022-07-06 Thread Justin Pryzby
On Tue, Jul 05, 2022 at 02:40:21PM -0400, Robert Haas wrote: > On Tue, Jul 5, 2022 at 12:56 PM Justin Pryzby wrote: > > My patch also leaves a 0 byte file around from initdb, which is harmless, > > but > > dirty. > > > > I've seen before where a bunch of 0 byte files are abandoned in an > >

Re: Handle infinite recursion in logical replication setup

2022-07-06 Thread Amit Kapila
On Tue, Jul 5, 2022 at 9:33 PM vignesh C wrote: > > Since the existing test is already handling the verification of this > scenario, I felt no need to add the test. Updated v29 patch removes > the 0001 patch which had the test case. > I have again looked at the first and it looks good to me. I

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

2022-07-06 Thread Dilip Kumar
On Wed, Jul 6, 2022 at 2:48 PM Amit Kapila wrote: > > On Wed, Jul 6, 2022 at 1:47 PM Dilip Kumar wrote: > > > > On Wed, Jul 6, 2022 at 9:06 AM Amit Kapila wrote: > > > > > > How would you choose the slot name for the table sync, right now it > > > contains the relid of the table for which it

Re: automatically generating node support functions

2022-07-06 Thread Peter Eisentraut
On 06.07.22 02:54, Tom Lane wrote: It might be enough to invent a struct-level attribute allowing manual assignment of node tags, ie typedef struct MyNewNode pg_node_attr(nodetag=466) where it'd be the programmer's responsibility to pick a nonconflicting tag number. We'd only ever use that in

Re: automatically generating node support functions

2022-07-06 Thread Peter Eisentraut
The new patch addresses almost all of these issues. > Also, I share David's upthread allergy to the option names > "path_hackN" and to documenting those only inside the conversion > script. I have given these real names now and documented them with the other attributes. > BTW, I think this:

Re: Logging query parmeters in auto_explain

2022-07-06 Thread Dagfinn Ilmari Mannsåker
On Wed, 6 Jul 2022, at 02:02, Michael Paquier wrote: > On Fri, Jul 01, 2022 at 09:58:52AM +0900, Michael Paquier wrote: >> I have kept things as I originally intended, and applied 0001 for the >> refactoring pieces. > > And done as well with 0002. So we are good for this thread. Thanks! -

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

2022-07-06 Thread Jehan-Guillaume de Rorthais
On Tue, 5 Jul 2022 09:59:42 -0400 Andrew Dunstan wrote: > On 2022-07-03 Su 16:12, Jehan-Guillaume de Rorthais wrote: > > On Sun, 3 Jul 2022 10:40:21 -0400 > > Andrew Dunstan wrote: > > > >> On 2022-06-29 We 05:09, Jehan-Guillaume de Rorthais wrote: > >>> On Tue, 28 Jun 2022 18:17:40 -0400 >

Re: Use outerPlanState macro instead of referring to leffttree

2022-07-06 Thread Richard Guo
Thanks for reviewing this patch. On Sat, Jul 2, 2022 at 5:32 AM Tom Lane wrote: > Richard Guo writes: > > In the executor code, we mix use outerPlanState macro and referring to > > leffttree. Commit 40f42d2a tried to keep the code consistent by > > replacing referring to lefftree with

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

2022-07-06 Thread Amit Kapila
On Wed, Jul 6, 2022 at 1:47 PM Dilip Kumar wrote: > > On Wed, Jul 6, 2022 at 9:06 AM Amit Kapila wrote: > > > > How would you choose the slot name for the table sync, right now it > > contains the relid of the table for which it needs to perform sync? > > Say, if we ignore to include the

Re: [RFC] building postgres with meson -v9

2022-07-06 Thread Peter Eisentraut
On 01.07.22 11:33, Andres Freund wrote: Attached is an updated version of the meson patchset. There has been a steady stream of incremental work over the last month, with patches from Peter Eisentraut and Nazir Yavuz. I tried to address the review comments Peter had downthread about the prep

Re: [PATCH] Optimize json_lex_string by batching character copying

2022-07-06 Thread John Naylor
On Wed, Jul 6, 2022 at 12:18 PM Andres Freund wrote: > I think before committing something along those lines we should make the > relevant bits also be applicable when ->strval is NULL, as several functions > use that (notably json_in IIRC). Afaics we'd just need to move the strval > check to be

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-06 Thread Amit Kapila
On Wed, Jul 6, 2022 at 12:19 PM Masahiko Sawada wrote: > > On Tue, Jul 5, 2022 at 8:00 PM Amit Kapila wrote: > > > > 2. Are we anytime removing transaction ids from catchanges->xip array? > > No. > > > If not, is there a reason for the same? I think we can remove it > > either at commit/abort or

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

2022-07-06 Thread Dilip Kumar
On Wed, Jul 6, 2022 at 9:06 AM Amit Kapila wrote: > > How would you choose the slot name for the table sync, right now it > contains the relid of the table for which it needs to perform sync? > Say, if we ignore to include the appropriate identifier in the slot > name, we won't be able to

Re: Patch proposal: New hooks in the connection path

2022-07-06 Thread Drouvot, Bertrand
Hi, On 7/6/22 12:11 AM, Joe Conway wrote: On 7/5/22 03:37, Bharath Rupireddy wrote: On Mon, Jul 4, 2022 at 6:23 PM Drouvot, Bertrand wrote: On 7/2/22 1:00 AM, Nathan Bossart wrote: > Could we model this after fmgr_hook?  The first argument in that hook > indicates where it is being called

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-07-06 Thread David Rowley
Thanks for looking at this. On Wed, 6 Jul 2022 at 12:32, Andres Freund wrote: > > On 2022-06-29 11:40:45 +1200, David Rowley wrote: > > Another small thing which I considered doing was to put the > > hash_fcinfo_data field as the final field in > > ScalarArrayOpExprHashTable so that we could

Re: doc: BRIN indexes and autosummarize

2022-07-06 Thread Alvaro Herrera
On 2022-Jul-05, Justin Pryzby wrote: > One issue: > > + summarized range, the range that the new page belongs into > + does not automatically acquire a summary tuple; > > "belongs into" sounds wrong - "belongs to" is better. Hah, and I was wondering if "belongs in" was any better. > I'll

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-07-06 Thread Michael Paquier
On Thu, Jun 16, 2022 at 03:14:16PM +0900, Michael Paquier wrote: > Actually, this can go with the bump of MIN_WINNT as it uses one of the > IsWindows*OrGreater() macros as a runtime check. And there are two > more places in pg_ctl.c that can be similarly cleaned up. > > It is possible that I

Re: refactor some protocol message sending in walsender and basebackup

2022-07-06 Thread Peter Eisentraut
On 01.07.22 23:36, Nathan Bossart wrote: On Thu, Jun 23, 2022 at 04:36:36PM +0200, Peter Eisentraut wrote: Some places in walsender.c and basebackup_copy.c open-code the sending of RowDescription and DataRow protocol messages. But there are already more compact and robust solutions available

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-06 Thread Masahiko Sawada
On Tue, Jul 5, 2022 at 8:00 PM Amit Kapila wrote: > > On Mon, Jul 4, 2022 at 6:12 PM Amit Kapila wrote: > > > > On Mon, May 30, 2022 at 11:13 AM Masahiko Sawada > > wrote: > > > > > > I've attached three POC patches: > > > > > > > I think it will be a good idea if you can add a short commit

Re: Improve TAP tests of pg_upgrade for cross-version tests

2022-07-06 Thread Michael Paquier
On Thu, Jun 09, 2022 at 04:49:01PM +0900, Michael Paquier wrote: > Rebased to cope with the recent changes in this area. Please find attached an updated version of this patch, where I have extended the support of the upgrade script down to 9.5 as origin version, as ~9.4 now fail because of

Re: Unify DLSUFFIX on Darwin

2022-07-06 Thread Peter Eisentraut
On 24.06.22 16:13, Tom Lane wrote: [ thinks for a bit... ] Might be worth double-checking that pg_upgrade doesn't get confused in a cross-version upgrade. A quick grep doesn't find that it refers to DLSUFFIX anywhere, but it definitely does pay attention to extensions' shared library names.

  1   2   >