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: 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 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: 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: 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

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: 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: Parallel Full Hash Join

2022-11-16 Thread Thomas Munro
On Thu, Nov 17, 2022 at 5:22 PM Ian Lawrence Barwick wrote: > This patch is marked as "Waiting for Committer" in the current commitfest [1] > with yourself as committer; do you have any plans to move ahead with this? Yeah, sorry for lack of progress. Aiming to get this in shortly.

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

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: Fix order of checking ICU options in initdb and create database

2022-11-16 Thread Peter Eisentraut
On 29.10.22 13:33, Marina Polyakova wrote: 2. initdb/create database report problems with the ICU locale/encoding although they may already report that ICU is not supported in this build: 2.1. $ initdb --locale-provider icu hoge ... initdb: error: ICU locale must be specified $ initdb

Re: Fix order of checking ICU options in initdb and create database

2022-11-16 Thread Peter Eisentraut
On 29.10.22 15:09, Marina Polyakova wrote: On 2022-10-29 14:33, Marina Polyakova wrote: Hello! This is the last proposed patch on this subject [1] moved to a separate thread for Commitfest.. Also added a patch to export with_icu when running src/bin/scripts tests [1]. I have committed the

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:

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

2022-11-16 Thread Bharath Rupireddy
On Wed, Nov 16, 2022 at 6:55 PM Maxim Orlov wrote: > >> These functions are marked as 'STRICT', meaning a null is returned, >> without even calling the function, if any of the input parameters is >> null. I think we can keep the behaviour the same as its friends. > > Thanks for the explanations.

Re: Supporting TAP tests with MSVC and Windows

2022-11-16 Thread Noah Misch
On Mon, Aug 22, 2022 at 09:44:42AM -0400, Andrew Dunstan wrote: > On 2022-08-21 Su 20:40, Noah Misch wrote: > > This (commit 13d856e of 2015-07-29) added the following: > > > > --- a/src/test/perl/TestLib.pm > > +++ b/src/test/perl/TestLib.pm > > @@ -242,7 +288,17 @@ sub command_exit_is > >

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

2022-11-16 Thread vignesh C
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 store the relids and table_infos > > list which stores pubid along with

RE: Fix the README file for MERGE command

2022-11-16 Thread Waithant Myo (Fujitsu)
Hi Richard, Thank you for your time. Best Regards, Myo Wai Thant From: Richard Guo Sent: Thursday, November 17, 2022 10:31 AM To: Myo, Waithant/Myo W. Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Fix the README file for MERGE command On Wed, Nov 16, 2022 at 4:37 PM Waithant Myo

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:

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: 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: 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: 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: CI and test improvements

2022-11-16 Thread Justin Pryzby
On Wed, Nov 16, 2022 at 08:08:32PM -0800, Andres Freund wrote: > I also don't like my "cores_script". Not quite sure yet how to do that > more cleanly. I don't know which is cleaner: ls /core* && mv /tmp/core* /tmp/cores find / -maxdepth 1 -type f -name 'core*' -print0 | xargs -r0 mv

Re: CI and test improvements

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 21:58:39 -0600, Justin Pryzby wrote: > On Wed, Nov 16, 2022 at 07:48:14PM -0800, Andres Freund wrote: > > I've used this a bunch on personal branches, and I think it's the way to > > go. It doesn't take long, saves a lot of cycles when one pushes something > > broken. Starts to

Re: CI and test improvements

2022-11-16 Thread Justin Pryzby
On Wed, Nov 16, 2022 at 07:48:14PM -0800, Andres Freund wrote: > I've used this a bunch on personal branches, and I think it's the way to > go. It doesn't take long, saves a lot of cycles when one pushes something > broken. Starts to runs the CompilerWarnings task after a minimal amount of >

Re: HOT chain validation in verify_heapam()

2022-11-16 Thread Himanshu Upadhyaya
On Wed, Nov 16, 2022 at 11:23 PM Robert Haas wrote: > 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 >

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: CI and test improvements

2022-11-16 Thread Andres Freund
Hi, On 2022-10-02 14:54:21 -0700, Andres Freund wrote: > On 2022-10-02 16:35:06 -0500, Justin Pryzby wrote: > > On Sun, Oct 02, 2022 at 01:52:01PM -0700, Andres Freund wrote: > > > On 2022-10-01 18:36:41 -0700, Andres Freund wrote: > > > > I am wondering if we should instead introduce a new

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 Dmitry Koterov
Hi. 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 choose identical plans for them

Re: pg_upgrade test failure

2022-11-16 Thread Justin Pryzby
On Tue, Nov 08, 2022 at 01:16:09AM +1300, Thomas Munro wrote: > So [1] on its own didn't fix this. My next guess is that the attached > might help. I took the liberty of adding a CF entry for this https://commitfest.postgresql.org/41/4011/ And afterwards figured I could be a little bit wasteful

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: logical decoding and replication of sequences, take 2

2022-11-16 Thread Andres Freund
Hi, On 2022-11-17 02:41:14 +0100, Tomas Vondra wrote: > Well, yeah - we can either try to perform the stuff independently of the > transactions that triggered it, or we can try making it part of some of > the transactions. Each of those options has problems, though :-( > > The first version of

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: Allow file inclusion in pg_hba and pg_ident files

2022-11-16 Thread Michael Paquier
On Wed, Nov 16, 2022 at 10:53:02AM +0800, Julien Rouhaud wrote: > While being the same inclusion infrastructure, it's likely that people will > have different usage. I'm assuming that for GUCs the main usage is to have > your automation tool put one of your template conf for instance >

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: logical decoding and replication of sequences, take 2

2022-11-16 Thread Tomas Vondra
On 11/16/22 22:05, Robert Haas wrote: > 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

Re: Fix the README file for MERGE command

2022-11-16 Thread Richard Guo
On Wed, Nov 16, 2022 at 4:37 PM Waithant Myo (Fujitsu) < myo.waith...@fujitsu.com> wrote: > The actions of MERGE command can be specified as follows: INSERT, UPDATE, > DELETE and DO NOTHING. > > However, in the README file, the ‘UPDATE’ word is described 2 times > instead of ‘DELETE’. > > > >

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

2022-11-16 Thread Thomas Munro
On Thu, Nov 17, 2022 at 7:51 AM Robert Haas wrote: + * up, since standby mode is a state that is intendeded to persist typo Otherwise LGTM.

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: libpq compression (part 2)

2022-11-16 Thread Andrey Borodin
On Tue, Nov 15, 2022 at 7:17 PM Justin Pryzby wrote: > Also I've found one more TODO item for the patch. Currently in fe-connect.c patch is doing buffer reset: conn->inStart = conn->inCursor = conn->inEnd = 0; This effectively consumes butes up tu current cursor. However, packet inspection is

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: 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

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: 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: 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

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: [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 '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: 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: 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: 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: 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 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: 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: [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: 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

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: 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: 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: 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

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: 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: 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: 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: 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: 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: 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 > >

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: 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

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: 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: 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: 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: 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

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: 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

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: 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: 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: [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: 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: 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: [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: 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: 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: 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: [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: 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: [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

MERGE regress test

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

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

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: 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: 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: [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 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: 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: 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 >

[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: 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

  1   2   >