Re: meson oddities

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 10:53:59 +0100, Peter Eisentraut wrote: > On 16.11.22 00:40, Andres Freund wrote: > > Somewhat relatedly, I wonder if we should have a better way to > > enable/disable > > the 'pgsql' path logic. It's pretty annoying that prefix basically doesn't > > work if it doesn't contain

RE: Data is copied twice when specifying both child and parent table in publication

2022-11-16 Thread wangw.f...@fujitsu.com
On Mon, Nov 14, 2022 at 0:56 AM vignesh C wrote: > > > > Attach new patches. > Thanks for your comments. > Here we are having tables list to store the relids and table_infos > list which stores pubid along with relid. Here tables list acts as a > temporary list to get filter_partitions and

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

2022-11-16 Thread Bharath Rupireddy
On Wed, Nov 16, 2022 at 2:28 PM Simon Riggs wrote: > > On Wed, 16 Nov 2022 at 06:47, Bharath Rupireddy > wrote: > > > > On Tue, Nov 15, 2022 at 10:55 PM Robert Haas wrote: > > > > > > On Tue, Nov 15, 2022 at 8:33 AM Bharath Rupireddy > > > wrote: > > > > Please review the v2 patch. > > > > > >

Re: pg_basebackup's --gzip switch misbehaves

2022-11-16 Thread Daniel Gustafsson
> On 16 Nov 2022, at 02:02, Michael Paquier wrote: > On Tue, Nov 15, 2022 at 11:09:54AM +0100, Daniel Gustafsson wrote: >>> On 15 Nov 2022, at 00:58, Michael Paquier wrote: >>> It looks like there is a second one in install-windows.sgml. >> >> Not sure I follow. IPC::Run is already linked to

Re: meson oddities

2022-11-16 Thread Peter Eisentraut
On 16.11.22 00:40, Andres Freund wrote: Somewhat relatedly, I wonder if we should have a better way to enable/disable the 'pgsql' path logic. It's pretty annoying that prefix basically doesn't work if it doesn't contain 'pgsql' or 'postgres'. Could you explain this in more detail?

Re: Skipping schema changes in publication

2022-11-16 Thread vignesh C
On Wed, 16 Nov 2022 at 09:34, Ian Lawrence Barwick wrote: > > 2022年11月7日(月) 22:39 vignesh C : > > > > On Fri, 4 Nov 2022 at 08:19, Ian Lawrence Barwick wrote: > > > > > > Hi > > > > > > cfbot reports the patch no longer applies [1]. As CommitFest 2022-11 is > > > currently underway, this would

Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment

2022-11-16 Thread David Rowley
On Wed, 16 Nov 2022 at 08:19, Andres Freund wrote: > We already rely on memory context returning MAXIMUM_ALIGNOF aligned > allocations. Adding the special case, I think, means that the we could safely > over-allocate by "only" > alignto + sizeof(MemoryChunk) - MAXIMUM_ALIGNOF > > Which would be

Re: PGDOCS - Logical replication GUCs - added some xrefs

2022-11-16 Thread vignesh C
On Tue, 15 Nov 2022 at 11:17, Peter Smith wrote: > > On Sun, Nov 13, 2022 at 11:47 AM vignesh C wrote: > > > > On Mon, 24 Oct 2022 at 13:15, Peter Smith wrote: > > > > > > Hi hackers. > > > > > > There is a docs Logical Replication section "31.10 Configuration > > > Settings" [1] which

Re: out of memory in crosstab()

2022-11-16 Thread Joe Conway
On 11/16/22 02:47, Amit Langote wrote: A customer seems to have run into $subject. Here's a reproducer they shared: With the following logged: LOG: server process (PID 121846) was terminated by signal 9: Killed That's the Linux OOM killer. Was this running in a container or under

Re: const qualifier for list APIs

2022-11-16 Thread Tom Lane
Ashutosh Bapat writes: > Functions like lappend_*() in list.c do not modify the second > argument. So it can be qualified as const. Any reason why we don't do > that? Is it because the target pointer ptr_value is not const > qualified? It would be a lie in many (most?) cases, wherever somebody

Re: Reducing power consumption on idle servers

2022-11-16 Thread Simon Riggs
On Wed, 16 Nov 2022 at 12:47, Bharath Rupireddy wrote: > > On Wed, Nov 16, 2022 at 2:34 PM Simon Riggs > wrote: > > > > Reposting v6 now so that patch tester doesn't think this has failed > > when the patch on other thread gets applied. > > Intention of the patch, that is, to get rid of

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

2022-11-16 Thread Masahiko Sawada
On Wed, Nov 16, 2022 at 4:39 PM John Naylor wrote: > > > On Wed, Nov 16, 2022 at 12:33 PM Masahiko Sawada > wrote: > > > > On Wed, Nov 16, 2022 at 1:46 PM John Naylor > > wrote: > > > > > > > > > On Tue, Nov 15, 2022 at 11:59 AM Masahiko Sawada > > > wrote: > > > > Thanks! Please let me know

Re: [PoC] Let libpq reject unexpected authentication requests

2022-11-16 Thread Jacob Champion
On Tue, Nov 15, 2022 at 11:07 PM Michael Paquier wrote: > I am beginning to look at the last version proposed, which has been > marked as RfC. Does this patch need a refresh in light of a9e9a9f and > 0873b2d? The changes for libpq_append_conn_error() should be > straight-forward. Updated in

Re: [PoC] configurable out of disk space elog level

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 15:59:09 +0300, Maxim Orlov wrote: > Patch is posted as PoC is attached. > --- a/src/backend/storage/smgr/md.c > +++ b/src/backend/storage/smgr/md.c > @@ -40,6 +40,7 @@ > #include "storage/sync.h" > #include "utils/hsearch.h" > #include "utils/memutils.h" > +#include

Re: Small miscellaneous fixes

2022-11-16 Thread Ranier Vilela
Em qua., 16 de nov. de 2022 às 03:59, Michael Paquier escreveu: > On Tue, Oct 04, 2022 at 08:23:16AM -0300, Ranier Vilela wrote: > > Both are correct, I missed the pqsignal calls. > > > > Attached patch to change this. > > The change for pgbench is missing and this is only changing >

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

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 16:01:55 +0530, Bharath Rupireddy wrote: > -1 for CheckpointerShmemStruct as it is being used for running > checkpoints and I don't think adding stats to it is a great idea. Why? Imo the data needed for progress reporting aren't really "stats". We'd not accumulate counters

Re: MERGE regress test

2022-11-16 Thread Alvaro Herrera
On 2022-Nov-16, Teja Mupparti wrote: > A quick question on merge regress-test > > https://github.com/postgres/postgres/blob/REL_15_STABLE/src/test/regress/expected/merge.out#L846 j > should there be an ERROR or comment needs a fix? What's the expected behavior? Hmm, good find. As I recall, I

Re: Make a 100_bugs.pl test more faster.

2022-11-16 Thread Tom Lane
"Anton A. Melnikov" writes: > Here is a separate patch for the node usage optimization mentioned above. > It decreases the CPU usage during 100_bugs.pl by about 30%. Hmm ... as written, this isn't testing the same thing, because you didn't disable the FOR ALL TABLES publications created in the

Re: Add sub-transaction overflow status in pg_stat_activity

2022-11-16 Thread Robert Haas
On Tue, Nov 15, 2022 at 2:29 PM Andres Freund wrote: > Hence the suggestion to show the pid of the session with the most subxacts. We > probably also should add a bunch of accessor functions for people that want > more detail... But just seeing in one place what's problematic would be the > big

Make a 100_bugs.pl test more faster.

2022-11-16 Thread Anton A. Melnikov
Hello! The previous discussion was here: https://www.postgresql.org/message-id/flat/b570c367-ba38-95f3-f62d-5f59b9808226%40inbox.ru On 15.11.2022 04:59, Tom Lane wrote: "Anton A. Melnikov" writes: Additionally i've tried to reduce overall number of nodes previously used in this test in a

Re: heapgettup refactoring

2022-11-16 Thread Peter Eisentraut
On 04.11.22 16:51, Melanie Plageman wrote: Thanks for the review! Attached is v2 with feedback addressed. Your 0001 had already been pushed. I have pushed your 0002. I have also pushed the renaming of page -> block, dp -> page separately. This should reduce the size of your 0003 a bit.

Re: [PoC] Reducing planning time when tables have many partitions

2022-11-16 Thread Thom Brown
On Mon, 7 Nov 2022 at 06:33, Zhang Mingli wrote: > > HI, > > Regards, > Zhang Mingli > On Nov 7, 2022, 14:26 +0800, Tom Lane , wrote: > > Andrey Lepikhov writes: > > I'm still in review of your patch now. At most it seems ok, but are you > really need both eq_sources and eq_derives lists now? >

Re: HOT chain validation in verify_heapam()

2022-11-16 Thread Robert Haas
On Wed, Nov 16, 2022 at 4:51 AM Himanshu Upadhyaya wrote: > yes, got it, have tried to test and it is giving false corruption in case of > subtransaction. > I think a better way to have this check is, we need to check that if > pred_xmin is > aborted then current_xmin should be aborted only. So

MERGE regress test

2022-11-16 Thread Teja Mupparti
Hi, A quick question on merge regress-test

Re: [BUG] Logical replica crash if there was an error in a function.

2022-11-16 Thread Anton A. Melnikov
Thanks a lot for the fast reply! On 03.11.2022 18:29, Tom Lane wrote: If we were just adding a query or two to an existing scenario, that could be okay; but spinning up and syncing a whole new primary and standby database is *expensive* when you multiply it by the number of times developers and

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-11-16 Thread Tom Lane
Simon Riggs writes: > On Wed, 16 Nov 2022 at 00:09, Tom Lane wrote: >> No, that's not what XidInMVCCSnapshot does. If snapshot->suboverflowed >> is set (ie, somebody somewhere/somewhen overflowed), then it does >> SubTransGetTopmostTransaction and searches only the xips with the result. >> This

Re: meson oddities

2022-11-16 Thread Tom Lane
Andres Freund writes: > On 2022-11-16 10:53:59 +0100, Peter Eisentraut wrote: >> Could you explain this in more detail? > If I just want to install postgres into a prefix without 'postgresql' added in > a bunch of directories, e.g. because I already have pg-$version to be in the > prefix,

Re: meson oddities

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 11:54:10 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-11-16 10:53:59 +0100, Peter Eisentraut wrote: > >> Could you explain this in more detail? > > > If I just want to install postgres into a prefix without 'postgresql' added > > in > > a bunch of directories,

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 14:49:59 +0100, Mats Kindahl wrote: > I think the discussion went a little sideways, so let me recap what I'm > suggesting: > >1. I mentioned that there is a missing callback when the filenode is >unlinked and this is particularly evident when dropping a table. >2.

Re: [PoC] configurable out of disk space elog level

2022-11-16 Thread Pavel Borisov
Hi, Maxim! > My proposal is to add a tablespace option in order to be able to configure > which behaviour is appropriate for a > particular user. I've decided to call this option “on_no_space” for now. If > anyone has a better naming for this feature, > please, report. > > So, the idea is to add

Re: Add 64-bit XIDs into PostgreSQL 15

2022-11-16 Thread Aleksander Alekseev
Hi hackers, > Dilip Kumar asked a good question in the thread about the 0001..0003 > subset [1]. I would like to duplicate it here to make sure it was not > missed by mistake: > > """ > Have we measured the WAL overhead because of this patch set? maybe > these particular patches will not impact

const qualifier for list APIs

2022-11-16 Thread Ashutosh Bapat
Hi All, Functions like lappend_*() in list.c do not modify the second argument. So it can be qualified as const. Any reason why we don't do that? Is it because the target pointer ptr_value is not const qualified? In my code, I am using lappend() and passing it the output of pq_getmsgstring()

Re: Slow standby snapshot

2022-11-16 Thread Michail Nikolaev
Hello everyone. > However ... I tried to reproduce the original complaint, and > failed entirely. I do see KnownAssignedXidsGetAndSetXmin > eating a bit of time in the standby backends, but it's under 1% > and doesn't seem to be rising over time. Perhaps we've already > applied some

Re: closing file in adjust_data_dir

2022-11-16 Thread Ted Yu
On Wed, Nov 16, 2022 at 12:28 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 16.11.22 04:31, Ted Yu wrote: > > On Wed, 16 Nov 2022 at 11:15, Ted Yu > > wrote: > > > On Tue, Nov 15, 2022 at 7:12 PM Japin Li >

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

2022-11-16 Thread Simon Riggs
On Wed, 16 Nov 2022 at 06:47, Bharath Rupireddy wrote: > > On Tue, Nov 15, 2022 at 10:55 PM Robert Haas wrote: > > > > On Tue, Nov 15, 2022 at 8:33 AM Bharath Rupireddy > > wrote: > > > Please review the v2 patch. > > > > It seems to me that this will call disable_startup_progress_timeout > >

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-11-16 Thread Mats Kindahl
Hello all, I think the discussion went a little sideways, so let me recap what I'm suggesting: 1. I mentioned that there is a missing callback when the filenode is unlinked and this is particularly evident when dropping a table. 2. It was correctly pointed out to me that an implementor

Re: Reducing power consumption on idle servers

2022-11-16 Thread Bharath Rupireddy
On Wed, Nov 16, 2022 at 2:34 PM Simon Riggs wrote: > > Reposting v6 now so that patch tester doesn't think this has failed > when the patch on other thread gets applied. Intention of the patch, that is, to get rid of promote_trigger_file GUC sometime in future, looks good to me. However, the

Re: Assertion failure in SnapBuildInitialSnapshot()

2022-11-16 Thread Amit Kapila
On Wed, Nov 16, 2022 at 7:30 AM Andres Freund wrote: > > On 2022-11-15 16:20:00 +0530, Amit Kapila wrote: > > On Tue, Nov 15, 2022 at 8:08 AM Andres Freund wrote: > > > nor do we enforce in an obvious place that we > > > don't already hold a snapshot. > > > > > > > We have a check for

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

2022-11-16 Thread Bharath Rupireddy
On Wed, Nov 16, 2022 at 1:20 AM David Christensen wrote: > > Enclosed is v9. > > - code style consistency (FPI instead of FPW) internally. > - cleanup of no-longer needed checksum-related pieces from code and tests. > - test cleanup/simplification. > - other comment cleanup. > > Passes all CI

Re: Meson add host_system to PG_VERSION_STR

2022-11-16 Thread Peter Eisentraut
On 16.11.22 01:01, Michael Paquier wrote: On Wed, Nov 16, 2022 at 12:08:56AM +0100, Juan José Santamaría Flecha wrote: As mentioned here [1] it might be interesting to complete the returned information by version() when compiled with meson by including the host_system. The meson build

Re: HOT chain validation in verify_heapam()

2022-11-16 Thread Himanshu Upadhyaya
On Wed, Nov 16, 2022 at 1:58 AM Robert Haas wrote: > On Tue, Nov 15, 2022 at 2:50 PM Andres Freund wrote: > > On 2022-11-15 11:36:21 -0500, Robert Haas wrote: > > > On Mon, Nov 14, 2022 at 5:02 PM Andres Freund > wrote: > > > > It seems like we should do a bit more validation within a chain of

Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands

2022-11-16 Thread Yugo NAGATA
On Thu, 10 Nov 2022 15:33:37 -0500 Tom Lane wrote: > Yugo NAGATA writes: > > Tom Lane wrote: > >> Hmm. Maybe the right way to think about this is "if we have completed an > >> EXECUTE, and not yet received a following SYNC, then report that we are in > >> a transaction block"? But I'm not

Re: Avoid overhead open-close indexes (catalog updates)

2022-11-16 Thread Ranier Vilela
Em qua., 16 de nov. de 2022 às 04:23, Michael Paquier escreveu: > On Wed, Nov 16, 2022 at 06:58:01AM +0900, Michael Paquier wrote: > > This one has been left out on purpose. I was tempting to use > > WithInfo() with a CatalogIndexState opened optionally but I got the > > impression that it

Re: Commit fest 2022-11

2022-11-16 Thread Ian Lawrence Barwick
2022年11月14日(月) 22:38 Ian Lawrence Barwick : > > 2022年11月14日(月) 22:23 James Coleman : > > > > On Mon, Nov 14, 2022 at 7:08 AM Ian Lawrence Barwick > > wrote: > > > > > > 2022年11月9日(水) 8:12 Justin Pryzby : > > > > > > If my script is not wrong, these patches add TAP tests, but don't update >

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-11-16 Thread Maxim Orlov
On Tue, 15 Nov 2022 at 13:02, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Fri, Nov 11, 2022 at 5:52 PM Maxim Orlov wrote: > > > But, in my view, some improvements may be proposed. We should be more, > let's say, cautious (or a paranoid if you wish), > > in

Re: Reducing power consumption on idle servers

2022-11-16 Thread Simon Riggs
On Sun, 13 Nov 2022 at 23:07, Simon Riggs wrote: > > On Sun, 13 Nov 2022 at 21:28, Thomas Munro wrote: > > > > On Mon, Nov 14, 2022 at 5:52 AM Simon Riggs > > wrote: > > > The attached patch is a reduced version of the original. It covers only: > > > * deprecation of the promote_trigger_file -

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

2022-11-16 Thread Bharath Rupireddy
On Wed, Nov 16, 2022 at 1:35 AM Robert Haas wrote: > > On Fri, Nov 4, 2022 at 4:27 AM Drouvot, Bertrand > wrote: > > Please find attached a rebase in v7. > > I don't think it's a good thing that this patch is using the > progress-reporting machinery. The point of that machinery is that we > want

Re: Add sub-transaction overflow status in pg_stat_activity

2022-11-16 Thread Dilip Kumar
On Tue, Nov 15, 2022 at 7:34 PM Robert Haas wrote: > > On Mon, Nov 14, 2022 at 4:17 PM Andres Freund wrote: > > Perhaps this would better be tackled by a new "visibility" view. It could > > show > > - number of sessions with a snapshot > > - max age of backend xmin > > - pid with max backend

[PoC] configurable out of disk space elog level

2022-11-16 Thread Maxim Orlov
Hi! PROBLEM Our customer stumble onto the next behaviour of the Postgres cluster: if disk space is exhausted, Postgres continues to work until WAL can be successfully written. Thus, upon disk space exhaustion, clients will get an “ERROR: could not extend file “base/X/X”: No space left

Re: Meson add host_system to PG_VERSION_STR

2022-11-16 Thread Juan José Santamaría Flecha
On Wed, Nov 16, 2022 at 10:50 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 16.11.22 01:01, Michael Paquier wrote: > > > > The meson build provides extra_version, which would be able to do the > > same, no? The information would be appended to PG_VERSION_STR through > >

Re: Meson add host_system to PG_VERSION_STR

2022-11-16 Thread Juan José Santamaría Flecha
On Wed, Nov 16, 2022 at 8:02 PM Andres Freund wrote: > > Given we're looking at improving this, should we also add 32/64-bit piece? > > If so, we probably should move building PG_VERSION_STR to later so we can > use > SIZEOF_VOID_P - configure.ac does that too. > > With extra_version set to

Re: libpq support for NegotiateProtocolVersion

2022-11-16 Thread Jacob Champion
On Tue, Nov 15, 2022 at 2:19 AM Peter Eisentraut wrote: > I think for the current code, the following would be an appropriate > adjustment: > > diff --git a/src/interfaces/libpq/fe-connect.c > b/src/interfaces/libpq/fe-connect.c > index 746e9b4f1efc..d15fb96572d9 100644 > ---

Re: Index not getting cleaned even though vacuum is running

2022-11-16 Thread Matheus Alcantara
Hi --- Original Message --- On Tuesday, November 15th, 2022 at 12:38, Karthik Jagadish (kjagadis) wrote: > Hi, > > We notice that vacuum is happening at regular intervals but the space > occupied by indexes is always increasing. Any pointers as to why would this > happen? > > Some

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

2022-11-16 Thread Robert Haas
On Wed, Nov 16, 2022 at 1:47 AM Bharath Rupireddy wrote: > That can be done, only if we can disable the timeout in another place > when the StandbyMode is set to true in ReadRecord(), that is, after > the standby server finishes crash recovery and enters standby mode. Oh, interesting. I didn't

locale -a missing on Alpine Linux?

2022-11-16 Thread Peter Eisentraut
Since 2fe3bdbd691a, initdb has been failing on malleefowl: performing post-bootstrap initialization ... sh: locale: not found 2022-11-15 23:48:44.288 EST [10436] FATAL: could not execute command "locale -a": command not found 2022-11-15 23:48:44.288 EST [10436] STATEMENT: SELECT

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

2022-11-16 Thread Robert Haas
On Wed, Nov 16, 2022 at 5:32 AM Bharath Rupireddy wrote: > -1 for CheckpointerShmemStruct as it is being used for running > checkpoints and I don't think adding stats to it is a great idea. > Instead, extending PgStat_CheckpointerStats and using shared memory > stats for reporting progress/last

Re: predefined role(s) for VACUUM and ANALYZE

2022-11-16 Thread Andrew Dunstan
On 2022-11-15 Tu 00:08, Nathan Bossart wrote: > On Mon, Nov 14, 2022 at 03:40:04PM -0800, Nathan Bossart wrote: >> Thanks for taking a look! Here is a rebased version of the patch set. > Oops, apparently object_aclcheck() cannot be used for pg_class. Here is > another version that uses

Re: logical decoding and replication of sequences, take 2

2022-11-16 Thread Robert Haas
On Fri, Nov 11, 2022 at 5:49 PM Tomas Vondra wrote: > The other option might be to make these messages non-transactional, in > which case we'd separate the ordering from COMMIT ordering, evading the > reordering problem. > > That'd mean we'd ignore rollbacks (which seems fine), we could probably

Re: About displaying NestLoopParam

2022-11-16 Thread Greg Stark
So I guess I don't have much to add since I don't really understand the Param infrastructure, certainly not any better than you seem to. I do note that the code in question was added in this commit in 2010. That predates the addition of LATERAL in 2013. I suppose those comments may be talking

Re: PATCH: Using BRIN indexes for sorted output

2022-11-16 Thread Greg Stark
Fwiw tuplesort does do something like what you want for the top-k case. At least it used to last I looked -- not sure if it went out with the tapesort ... For top-k it inserts new tuples into the heap data structure and then pops the top element out of the hash. That keeps a fixed number of

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

2022-11-16 Thread 'Sandro Santilli'
On Sun, Nov 13, 2022 at 11:46:50PM -0500, Regina Obe wrote: > > Re: Sandro Santilli > > > I'm attaching an updated version of the patch. This time the patch is > > > tested. Nothing changes unless the .control file for the subject > > > extension doesn't have a "wildcard_upgrades = true"

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

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 14:19:32 -0500, Robert Haas wrote: > I have never really understood why we drive background writer or > checkpointer statistics through the statistics collector. To some degree it is required for durability - the stats system needs to know how to write out those stats. But that

Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs

2022-11-16 Thread Peter Geoghegan
On Wed, Nov 16, 2022 at 3:27 PM Andres Freund wrote: > The "(also...) formulation seems a bit odd. How about "an obsolescent heap > tuple that the caller is physically removing, e.g. via HOT pruning or index > deletion." or such? Okay, WFM. > > + * snapshotConflictHorizon format values are how

Re: PATCH: Using BRIN indexes for sorted output

2022-11-16 Thread Tomas Vondra
On 11/16/22 22:52, Greg Stark wrote: > Fwiw tuplesort does do something like what you want for the top-k > case. At least it used to last I looked -- not sure if it went out > with the tapesort ... > > For top-k it inserts new tuples into the heap data structure and then > pops the top element out

Re: Meson add host_system to PG_VERSION_STR

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 09:01:04 +0900, Michael Paquier wrote: > On Wed, Nov 16, 2022 at 12:08:56AM +0100, Juan José Santamaría Flecha wrote: > > As mentioned here [1] it might be interesting to complete the returned > > information by version() when compiled with meson by including the > >

Re: locale -a missing on Alpine Linux?

2022-11-16 Thread Christoph Moench-Tegeder
## Peter Eisentraut (peter.eisentr...@enterprisedb.com): > First of all, is this a standard installation of this OS, or is perhaps > something incomplete, broken, or unusual about the current OS installation? Alpine uses musl libc, on which you need package musl-locales to get a

Re: Split index and table statistics into different types of stats

2022-11-16 Thread Andres Freund
Hi, On 2022-11-15 10:48:40 +0100, Drouvot, Bertrand wrote: > diff --git a/src/backend/utils/adt/pgstatfuncs.c > b/src/backend/utils/adt/pgstatfuncs.c > index ae3365d917..be7f175bf1 100644 > --- a/src/backend/utils/adt/pgstatfuncs.c > +++ b/src/backend/utils/adt/pgstatfuncs.c > @@ -36,24 +36,34

Re: Making Vars outer-join aware

2022-11-16 Thread Tom Lane
Richard Guo writes: > I'm reviewing the part about multiple version clauses, and I find a case > that may not work as expected. I tried with some query as below > (A leftjoin (B leftjoin C on (Pbc)) on (Pab)) left join D on (Pcd) > Assume Pbc is strict for B and Pcd is strict for C. > According

ScanSourceDatabasePgClass

2022-11-16 Thread David Christensen
Hi Robert, In 9c08aea6a you introduce the block-by-block strategy for creating a copy of the database. In the main loop, this utilizes this call: buf = ReadBufferWithoutRelcache(rlocator, MAIN_FORKNUM, blkno, RBM_NORMAL, bstrategy, false); Here, the last parameter is "false" for the permanence

Re: [DOCS] Stats views and functions not in order?

2022-11-16 Thread David G. Johnston
On Tue, Nov 15, 2022 at 6:39 PM Peter Smith wrote: > > I was also wondering (but have not yet done) if the content *outside* > the tables should be reordered to match the table 28.1/28.2 order. > > Thoughts? > > I would love to do away with the ToC listing of view names in 28.2 altogether.

Re: Allow single table VACUUM in transaction block

2022-11-16 Thread Greg Stark
I think the idea of being able to request an autovacuum worker for a specific table is actually very good. I think it's what most users actually want when they are running vacuum. In fact in previous jobs people have built infrastructure that basically duplicates autovacuum just so they could do

Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs

2022-11-16 Thread Peter Geoghegan
On Tue, Nov 15, 2022 at 8:48 PM Peter Geoghegan wrote: > Okay, let's go with snapshotConflictHorizon. I'll use that name in the > next revision, which I should be able to post tomorrow. Attached is a somewhat cleaned up version that uses that symbol name for everything. -- Peter Geoghegan

Re: Allow single table VACUUM in transaction block

2022-11-16 Thread Tom Lane
Greg Stark writes: > I think this requesting autovacuum worker should be a distinct > command. Or at least an explicit option to vacuum. +1. That'd reduce confusion, and perhaps we could remove some of the restrictions. regards, tom lane

Re: Assertion failure in SnapBuildInitialSnapshot()

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 14:22:01 +0530, Amit Kapila wrote: > On Wed, Nov 16, 2022 at 7:30 AM Andres Freund wrote: > > > > On 2022-11-15 16:20:00 +0530, Amit Kapila wrote: > > > On Tue, Nov 15, 2022 at 8:08 AM Andres Freund wrote: > > > > nor do we enforce in an obvious place that we > > > > don't

Re: locale -a missing on Alpine Linux?

2022-11-16 Thread Tom Lane
Christoph Moench-Tegeder writes: > ## Peter Eisentraut (peter.eisentr...@enterprisedb.com): >> First of all, is this a standard installation of this OS, or is perhaps >> something incomplete, broken, or unusual about the current OS installation? > Alpine uses musl libc, on which you need

Re: Suppressing useless wakeups in walreceiver

2022-11-16 Thread Thomas Munro
On Wed, Nov 16, 2022 at 5:24 PM Nathan Bossart wrote: > On Wed, Nov 16, 2022 at 04:57:08PM +1300, Thomas Munro wrote: > > On Tue, Nov 15, 2022 at 5:49 PM Nathan Bossart > > wrote: > >> Another option might be to just force initial reply/feedback messages when > >> streaming starts. The

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

2022-11-16 Thread Regina Obe
> On Sun, Nov 13, 2022 at 11:46:50PM -0500, Regina Obe wrote: > > > Re: Sandro Santilli > > > > I'm attaching an updated version of the patch. This time the patch > > > > is tested. Nothing changes unless the .control file for the > > > > subject extension doesn't have a "wildcard_upgrades = true"

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

2022-11-16 Thread Justin Pryzby
Note that the patch is passing tests when using autoconf build but failing for meson builds. http://cfbot.cputube.org/sandro-santilli.html I imagine you need to make the corresponding change to ./meson.build that you made to ./Makefile. https://wiki.postgresql.org/wiki/Meson_for_patch_authors

Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 14:14:30 -0800, Peter Geoghegan wrote: > /* > - * If 'tuple' contains any visible XID greater than latestRemovedXid, > - * ratchet forwards latestRemovedXid to the greatest one found. > - * This is used as the basis for generating Hot Standby conflicts, so > - * if a tuple was

Odd behavior with pg_stat_statements and queries called from SQL functions

2022-11-16 Thread Maciek Sakrejda
I noticed an odd behavior today in pg_stat_statements query normalization for queries called from SQL-language functions. If I have three functions that call an essentially identical query (the functions are only marked SECURITY DEFINER to prevent inlining): maciek=# create or replace function

Re: ubsan fails on 32bit builds

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 17:42:30 -0800, Andres Freund wrote: > Afaict the problem is that > proc = (PGPROC *) &(waitQueue->links); > > is a gross gross hack - this isn't actually a PGPROC, it's pointing to an > SHM_QUEUE, but *not* one embedded in PGPROC. It kinda works because ->links

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

2022-11-16 Thread Bharath Rupireddy
On Thu, Nov 17, 2022 at 12:21 AM Robert Haas wrote: > > On Wed, Nov 16, 2022 at 1:47 AM Bharath Rupireddy > wrote: > > That can be done, only if we can disable the timeout in another place > > when the StandbyMode is set to true in ReadRecord(), that is, after > > the standby server finishes

Re: Assertion failure with barriers in parallel hash join

2022-11-16 Thread Thomas Munro
On Thu, Nov 17, 2022 at 8:01 PM David Geier wrote: > Can we make progress with this patch in the current commit fest, or discuss > what is still missing to bring this in? Hi David, Sorry for the delay. I'll aim to get this done in the next few days.

Re: Reducing power consumption on idle servers

2022-11-16 Thread Bharath Rupireddy
On Wed, Nov 16, 2022 at 8:35 PM Simon Riggs wrote: > > On Wed, 16 Nov 2022 at 12:47, Bharath Rupireddy > wrote: > > > > On Wed, Nov 16, 2022 at 2:34 PM Simon Riggs > > wrote: > > > > > > Reposting v6 now so that patch tester doesn't think this has failed > > > when the patch on other thread

RE: Data is copied twice when specifying both child and parent table in publication

2022-11-16 Thread wangw.f...@fujitsu.com
On Thurs, Nov 17, 2022 at 13:58 PM vignesh C wrote: > On Wed, 16 Nov 2022 at 14:28, wangw.f...@fujitsu.com > wrote: > > > > On Mon, Nov 14, 2022 at 0:56 AM vignesh C wrote: > > > > > > > > Attach new patches. > > > > > > > Thanks for your comments. > > > > > Here we are having tables list to

Re: Reducing power consumption on idle servers

2022-11-16 Thread Simon Riggs
On Thu, 17 Nov 2022 at 07:36, Bharath Rupireddy wrote: > > promote_trigger_file is not tested and there are better ways, so > > deprecating it in this release is fine. > > Hm, but.. > > > Anyone that relies on it can update their mechanisms to a supported > > one with a one-line change.

Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 15:37:40 -0800, Peter Geoghegan wrote: > On Wed, Nov 16, 2022 at 3:27 PM Andres Freund wrote: > > What are "snapshotConflictHorizon format XIDs"? I guess you mean format in > > the > > sense of having the semantics of snapshotConflictHorizon? > > Yes. That is the only

Re: Standardizing how pg_waldump presents recovery conflict XID cutoffs

2022-11-16 Thread Peter Geoghegan
On Wed, Nov 16, 2022 at 4:25 PM Andres Freund wrote: > > Anyway, worth calling this out directly in these comments IMV. We're > > addressing two closely related things that assign opposite meanings to > > InvalidTransactionId, which is rather confusing. > > It makes sense to call this out, but

Re: Is the plan for IN(1,2,3) always the same as for =ANY('{1,2,3}') when using PQexec with no params?

2022-11-16 Thread Tom Lane
Dmitry Koterov writes: > PG13+. Assume we have two identical queries with no arguments (as a plain > text, e.g. passed to PQexec - NOT to PQexecParams!): > - one with "a=X AND b IN(...)" > - and one with "a=X and b=ANY('{...}') > The question: is it guaranteed that the planner will always

Re: pglz compression performance, take two

2022-11-16 Thread Ian Lawrence Barwick
2021年11月5日(金) 14:51 Andrey Borodin : > > Thanks for the review Mark! Sorry it took too long to reply on my side. > > > 28 июня 2021 г., в 21:05, Mark Dilger > > написал(а): > > > >> #define PGLZ_HISTORY_SIZE 0x0fff - 1 /* to avoid compare in > >> iteration */ > > ... > >> static

Re: Assertion failure with barriers in parallel hash join

2022-11-16 Thread David Geier
Hi Thomas, Can we make progress with this patch in the current commit fest, or discuss what is still missing to bring this in? Thanks! -- David Geier (ServiceNow) On 6/6/22 17:01, David Geier wrote: Hi Thomas, Correct. We're running with disabled parallel leader participation and we have

Re: User functions for building SCRAM secrets

2022-11-16 Thread Michael Paquier
On Thu, Nov 10, 2022 at 11:14:34PM -0500, Jonathan S. Katz wrote: > On 10/31/22 8:56 PM, Michael Paquier wrote: >> Well, one could pass a salt based on something generated by random() >> to emulate what we currently do in the default case, as well. The >> salt length is an extra possibility,

Re: ps command does not show walsender's connected db

2022-11-16 Thread Ian Lawrence Barwick
2022年10月11日(火) 20:06 Bharath Rupireddy : > > On Tue, Oct 11, 2022 at 2:11 PM bt22nakamorit > wrote: > > > > 2022-10-10 16:12 Bharath Rupireddy wrote: > > > Thanks. LGTM. > > Thank you for your review! > > I have this issue posted on Commitfest 2022-11 with title "show > > walsender's connected db

Re: predefined role(s) for VACUUM and ANALYZE

2022-11-16 Thread Nathan Bossart
On Wed, Nov 16, 2022 at 03:09:47PM -0500, Andrew Dunstan wrote: > OK, reading the history I think everyone is on board with expanding > AclMode from uint32 to uint64. Is that right? I skimmed through this thread again, and AFAICT folks are okay with this approach. I'm not aware of any remaining

Re: Assertion failure in SnapBuildInitialSnapshot()

2022-11-16 Thread Amit Kapila
On Wed, Nov 16, 2022 at 11:56 PM Andres Freund wrote: > > On 2022-11-16 14:22:01 +0530, Amit Kapila wrote: > > On Wed, Nov 16, 2022 at 7:30 AM Andres Freund wrote: > > > > > > On 2022-11-15 16:20:00 +0530, Amit Kapila wrote: > > > > On Tue, Nov 15, 2022 at 8:08 AM Andres Freund > > > > wrote:

Typo for xl_running_xacts

2022-11-16 Thread Japin Li
Hi, hackers I find some typo about xl_running_xacts in comments. Attached a patch to fix those. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd. diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index

ubsan fails on 32bit builds

2022-11-16 Thread Andres Freund
Hi, I am working on polishing my patch to make CI use sanitizers. Unfortunately using -fsanitize=alignment,undefined causes tests to fail on 32bit builds. https://cirrus-ci.com/task/5092504471601152

Re: Meson add host_system to PG_VERSION_STR

2022-11-16 Thread Michael Paquier
On Wed, Nov 16, 2022 at 02:12:05PM +0100, Juan José Santamaría Flecha wrote: > On Wed, Nov 16, 2022 at 10:50 AM Peter Eisentraut < > peter.eisentr...@enterprisedb.com> wrote: >> Perhaps some examples before and after on different platforms could be >> shown. > > Yes, that would make clear what

Re: Parallel Full Hash Join

2022-11-16 Thread Ian Lawrence Barwick
2022年4月8日(金) 20:30 Thomas Munro : > > On Wed, Jan 12, 2022 at 10:30 AM Melanie Plageman > wrote: > > On Fri, Nov 26, 2021 at 3:11 PM Thomas Munro wrote: > > > #3 0x009cf57e in ExceptionalCondition (conditionName=0x29cae8 > > > "BarrierParticipants(>shared->batch_barrier) == 1", > > >

Re: About displaying NestLoopParam

2022-11-16 Thread Tom Lane
Greg Stark writes: > I do note that the code in question was added in this commit in 2010. > That predates the addition of LATERAL in 2013. Yeah. It's pretty clear from the comments that I was concerned about false matches of PARAM_EXEC numbers. I think that was a live issue at the time but is

  1   2   >