Re: Avoiding smgrimmedsync() during nbtree index builds

2022-01-16 Thread Justin Pryzby
On Thu, Jan 13, 2022 at 09:52:55AM -0600, Justin Pryzby wrote: > This is failing on windows CI when I use initdb --data-checksums, as attached. > > https://cirrus-ci.com/task/5612464120266752 > https://api.cirrus-ci.com/v1/artifact/task/5612464120266752/regress_diffs/src/

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2022-01-15 Thread Justin Pryzby
On Sat, Jan 15, 2022 at 08:39:14PM +0300, Michail Nikolaev wrote: > Hello, Junien. > > Thanks for your attention. > > > The cfbot reports that this patch is currently failing at least on > > Linux and Windows, e.g. https://cirrus-ci.com/task/6532060239101952. > > Fixed. It was the issue with the

Re: MultiXact/SLRU buffers configuration

2022-01-15 Thread Justin Pryzby
On Sat, Jan 15, 2022 at 12:16:59PM +0500, Andrey Borodin wrote: > > 15 янв. 2022 г., в 03:20, Shawn Debnath написал(а): > > On Fri, Jan 14, 2022 at 05:28:38PM +0800, Julien Rouhaud wrote: > >>> PFA rebase of the patchset. Also I've added a patch to combine > >>> page_number, page_status, and page

Re: Add 64-bit XIDs into PostgreSQL 15

2022-01-14 Thread Justin Pryzby
I tried to pg_upgrade from a v13 instance like: time make check -C src/bin/pg_upgrade oldsrc=`pwd`/13 oldbindir=`pwd`/13/tmp_install/usr/local/pgsql/bin I had compiled and installed v13 into `pwd`/13. First, test.sh failed, because of an option in initdb which doesn't exist in the old version: -

Re: extended stats on partitioned tables

2022-01-14 Thread Justin Pryzby
On Mon, Dec 13, 2021 at 09:40:09PM +0100, Tomas Vondra wrote: > 1) If the table is a separate relation (not part of an inheritance > tree), this should make no difference. -> OK > > 2) If the table is using "old" inheritance, this reverts back to > pre-regression behavior. So people will keep usin

Re: Adding CI to our tree

2022-01-14 Thread Justin Pryzby
On Fri, Jan 14, 2022 at 03:34:11PM -0800, Andres Freund wrote: > Hi, > > On 2022-01-13 15:27:40 -0500, Andrew Dunstan wrote: > > I can probably adjust to whatever we decide to do. But I think we're > > really just tinkering at the edges here. What I think we really need is > > the moral equivalent

Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)

2022-01-14 Thread Justin Pryzby
Rebased before Julian asks. >From cf57143c85a2a6088fe6038e6d41771fd60aae34 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 13 Jul 2021 21:25:48 -0500 Subject: [PATCH 1/4] Add pg_am_size(), pg_namespace_size() .. See also: 358a897fa, 528ac10c7 --- src/backend/utils/adt/dbsize.c |

Re: support for MERGE

2022-01-14 Thread Justin Pryzby
Resending some language fixes to the public documentation. >From 28b8532976ddb3e8b617ca007fae6b4822b36527 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 13 Nov 2021 12:11:46 -0600 Subject: [PATCH] f!typos --- doc/src/sgml/mvcc.sgml | 8 ++--- doc/src/sgml/

Re: libpq compression (part 2)

2022-01-13 Thread Justin Pryzby
atch has a couple "noise" hunks that get rid of ^M characters added in previous patches. The ^M shouldn't be added in the first place. Did you apply my fixes using git-am or something else ? On Fri, Jan 14, 2022 at 02:12:17AM +0500, Daniil Zakhlystov wrote: > > On 12 Ja

Re: Adding CI to our tree

2022-01-13 Thread Justin Pryzby
installcheck. I added pg_regress --initdb-opts since that seems to be a deficiency. -- Justin >From 10121f588d0b3cab67ee810a718511879d6f24a8 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sun, 9 Jan 2022 18:25:02 -0600 Subject: [PATCH 1/7] vcregress/ci: test modules/contrib with N

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-01-13 Thread Justin Pryzby
0266752/regress_diffs/src/test/regress/regression.diffs +++ c:/cirrus/src/test/regress/results/bitmapops.out2022-01-13 00:47:46.704621200 + .. +ERROR: could not read block 0 in file "base/16384/30310": read only 0 of 8192 bytes -- Justin >From e1a88c25725bc5b34ca9deb1a0b78

Re: libpq compression (part 2)

2022-01-12 Thread Justin Pryzby
zlib still causes check-world to get stuck. I first mentioned this last March: 20210319062800.gi11...@telsasoft.com Actually all the compression methods seems to get stuck with time make check -C src/bin/pg_rewind time make check -C src/test/isolation For CI purposes, there should be an 0003 pat

Re: pg_dump/restore --no-tableam

2022-01-11 Thread Justin Pryzby
On Tue, Jan 11, 2022 at 04:50:23PM +0900, Michael Paquier wrote: > On Mon, Jan 03, 2022 at 03:44:24PM -0600, Justin Pryzby wrote: > > + > > + > > + --no-table-am > > + > > + > > +Do not output commands to select table

Re: pg_upgrade should truncate/remove its logs before running

2022-01-11 Thread Justin Pryzby
On Wed, Jan 12, 2022 at 12:59:54PM +0900, Michael Paquier wrote: > On Tue, Jan 11, 2022 at 02:03:07PM -0600, Justin Pryzby wrote: > > There's no reason not to. We created the dir, and the user didn't specify > > to > > preserve it. It'd be their fault if the

Re: do only critical work during single-user vacuum?

2022-01-11 Thread Justin Pryzby
On Tue, Jan 11, 2022 at 07:58:56PM -0500, John Naylor wrote: > + // FIXME: also check reloption > + // WIP: 95% is a starting point for discussion > + if ((table_xid_age < autovacuum_freeze_max_age * 0.95) || > + (table_mxid_age < autovacuum_m

Re: Column Filtering in Logical Replication

2022-01-11 Thread Justin Pryzby
Is there any coordination between the "column filter" patch and the "row filter" patch ? Are they both on track for PG15 ? Has anybody run them together ? Whichever patch is merged 2nd should include tests involving a subset of columns along with a WHERE clause. I have a suggestion: for the fun

Re: pg_upgrade should truncate/remove its logs before running

2022-01-11 Thread Justin Pryzby
On Tue, Jan 11, 2022 at 04:41:58PM +0900, Michael Paquier wrote: > On Sat, Jan 08, 2022 at 12:48:57PM -0600, Justin Pryzby wrote: > > I fixed it by calling get_restricted_token() before parseCommandLine(). > > There's precedent for that in pg_regress (but the 3 other callers d

Re: Use -fvisibility=hidden for shared libraries

2022-01-10 Thread Justin Pryzby
On Mon, Jan 10, 2022 at 07:01:36PM -0500, Tom Lane wrote: > Andres Freund writes: > > [ v2-0001-Use-hidden-visibility-for-shared-libraries-where-.patch ] > > This seems like a good idea, but it's failing to apply right now, > mainly because of some cleanup I did in e04a8059a. As far as I can > t

Re: Adding CI to our tree

2022-01-10 Thread Justin Pryzby
On Sun, Jan 09, 2022 at 11:57:44AM -0800, Andres Freund wrote: > On 2022-01-09 13:16:50 -0600, Justin Pryzby wrote: > > diff --git a/contrib/test_decoding/Makefile b/contrib/test_decoding/Makefile > > index 9a31e0b8795..14fd847ba7f 100644 > > --- a/contrib/test_decoding/Makef

Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

2022-01-09 Thread Justin Pryzby
On Sun, Jan 09, 2022 at 01:59:02PM -0500, Tom Lane wrote: > Given the POSIX requirements, it's basically impossible to believe > that there are interesting cases where $HOME isn't set. I've run into this before - children of init may not have HOME set. It's easy enough to add it if it's needed, b

Re: Adding CI to our tree

2022-01-09 Thread Justin Pryzby
I noticed a patch failing in cfbot everywhere except windows: https://commitfest.postgresql.org/36/3476/ | Invalid relcache when ADD PRIMARY KEY USING INDEX It's because vcregress skips tests which have NO_INSTALLCHECK=1. Is it desirable to enable more module/contrib tests for windows CI ? This

Re: warn if GUC set to an invalid shared library

2022-01-08 Thread Justin Pryzby
having to do with timing. So I'm planning to drop the 0001 patch. > On Tue, Dec 28, 2021 at 9:45 AM Justin Pryzby wrote: > > 0002 adds context when failing to start. > > > > 2021-12-27 17:01:12.996 CST postmaster[1403] WARNING: could not > > load libr

Re: CLUSTER on partitioned index

2022-01-08 Thread Justin Pryzby
On Fri, Dec 03, 2021 at 10:16:24AM +0900, Michael Paquier wrote: > On Thu, Sep 23, 2021 at 06:56:26PM -0500, Justin Pryzby wrote: > > On Thu, Sep 23, 2021 at 08:18:41PM +0200, Matthias van de Meent wrote: > >> Note: The following review is based on the assumption that this v11

Re: pg_upgrade should truncate/remove its logs before running

2022-01-08 Thread Justin Pryzby
lled something other than "logdir" since it also outputs dumps there. But the dumps are more or less not user-facing. But -d and -o are already used. Maybe it shouldn't be configurable at all? -- Justin >From 740ef9422ba6cc92d3d4ae2ff23ee51e8e9891e9 Mon Sep 17 00:00:00 2001

Re: \dP and \dX use ::regclass without "pg_catalog."

2022-01-07 Thread Justin Pryzby
;s where \dX is. > > If any of you can make a patch, that would be great. Thanks! I'd propose these. >From d1e337daf81faa9a0a8c33a26091cbae396df7bb Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Thu, 6 Jan 2022 20:23:52 -0600 Subject: [PATCH 1/3] psql: qualify ::text with p

Re: libpq compression (part 2)

2022-01-07 Thread Justin Pryzby
On Fri, Jan 07, 2022 at 01:46:00PM -0500, Bruce Momjian wrote: > On Sat, Jan 1, 2022 at 11:25:05AM -0600, Justin Pryzby wrote: > > Thanks for working on this. The patch looks to be in good shape - I hope > > more > > people will help to review and test it. I took the

Re: Python Plain Text Sender

2022-01-07 Thread Justin Pryzby
On Fri, Jan 07, 2022 at 03:48:24PM +0300, Ali Koca wrote: > to Dear Hackers, > > I decided to we need basic e-mail sender in command line when coding > somethings and asking one-line questions. Why ? Are there mail clients for which this is hard to do ? I don't think a custom MUA/mail client is

Re: Add 64-bit XIDs into PostgreSQL 15

2022-01-07 Thread Justin Pryzby
On Fri, Jan 07, 2022 at 03:53:51PM +, Finnerty, Jim wrote: > I'd still like a plan to retire the "double xmax" representation eventually. > Previously I suggested that this could be done as a post-process, before > upgrade is complete, but that could potentially make upgrade very slow. > >

Re: Map WAL segment files on PMEM as WAL buffers

2022-01-06 Thread Justin Pryzby
On Fri, Jan 07, 2022 at 12:50:01PM +0900, Takashi Menjo wrote: > > But in this case it really doesn't work :( > > > > running bootstrap script ... 2022-01-05 23:17:30.244 CST [12088] FATAL: > > file not on PMEM: path "pg_wal/00010001" > > Do you have a real PMEM device such as NV

Re: \dP and \dX use ::regclass without "pg_catalog."

2022-01-06 Thread Justin Pryzby
https://www.postgresql.org/message-id/flat/7ad8cd13-db5b-5cf6-8561-dccad1a934cb%40nttcom.co.jp https://www.postgresql.org/message-id/flat/20210827193151.GN26465%40telsasoft.com On Sat, Aug 28, 2021 at 08:57:32AM -0400, Álvaro Herrera wrote: > On 2021-Aug-27, Justin Pryzby wrote: > >

Re: Emit "checkpoint skipped because system is idle" message at LOG level if log_checkpoints is set

2022-01-06 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 10:45:06AM +0530, Dilip Kumar wrote: > +1 to convert to LOG when log_checkpoints is set. On Thu, Jan 06, 2022 at 04:34:38PM +0900, Kyotaro Horiguchi wrote: > Agreed. -1 to just raising elevel of the message. On Thu, Jan 06, 2022 at 06:58:14PM +0800, Julien Rouhaud wrote: >

Re: terminate called after throwing an instance of 'std::bad_alloc' (llvmjit)

2022-01-06 Thread Justin Pryzby
rwise , I'm planning to restart the DB soon and go back to running the pgdg rpm binaries with jit=off rather than what I compiled and patched locally. On Thu, Nov 18, 2021 at 03:20:39PM -0600, Justin Pryzby wrote: > On Wed, Nov 10, 2021 at 09:56:44AM -0600, Justin Pryzby wrote: > > T

Re: GUC flags

2022-01-05 Thread Justin Pryzby
On Thu, Jan 06, 2022 at 02:19:08PM +0900, Michael Paquier wrote: > On Wed, Jan 05, 2022 at 05:55:17PM -0600, Justin Pryzby wrote: > > pg_settings is currently defined with "SELECT *". Is it fine to enumerate a > > list of columns instead ? > > I'd like to

Re: Map WAL segment files on PMEM as WAL buffers

2022-01-05 Thread Justin Pryzby
On Thu, Jan 06, 2022 at 05:52:01PM +1300, Thomas Munro wrote: > On Thu, Jan 6, 2022 at 5:00 PM Justin Pryzby wrote: > > I'm attaching a probable fix. Unfortunately, for patches like this, most of > > the functionality isn't exercised unless the library is installe

Re: Map WAL segment files on PMEM as WAL buffers

2022-01-05 Thread Justin Pryzby
rno = errno; + (void) pmem_unmap(addr, len); + errno = saved_errno; +} + +#endif /* USE_LIBPMEM */ diff --git a/src/include/access/xlogpmem.h b/src/include/access/xlogpmem.h new file mode 100644 index 000..3978640b82f --- /dev/null +++ b/src/include/access/xlogpmem.h @@ -0,0 +1,59 @@ +/* + * xlogpmem.h + * + * Definitions for PM

Re: make tuplestore helper function

2022-01-05 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 12:09:16PM -0500, Melanie Plageman wrote: > On Fri, Dec 17, 2021 at 3:04 PM Justin Pryzby wrote: > > The rest of these are questions more than comments, and I'm not necessarily > > suggesting to change the patch: > > > > This isn't new

Re: Add 64-bit XIDs into PostgreSQL 15

2022-01-05 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 06:51:37PM -0500, Bruce Momjian wrote: > On Tue, Jan 4, 2022 at 10:22:50PM +, Finnerty, Jim wrote: > > I'm concerned about the maintainability impact of having 2 new > > on-disk page formats. It's already complex enough with XIDs and > > multixact-XIDs. > > > > If the l

Re: GUC flags

2022-01-05 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 02:17:11PM +0900, Michael Paquier wrote: > On Tue, Jan 04, 2022 at 09:06:48PM -0600, Justin Pryzby wrote: > > I think pg_get_guc_flags() may be best, but I'm interested to hear other > > opinions. > > My opinion on this matter is rather close

Re: Emit "checkpoint skipped because system is idle" message at LOG level if log_checkpoints is set

2022-01-05 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 10:45:06AM +0530, Dilip Kumar wrote: > On Wed, Jan 5, 2022 at 10:24 AM Bharath Rupireddy > wrote: > > > > Postgres server emits a message at DEBUG1 level when it skips a > > checkpoint. At times, developers might be surprised after figuring out > > from server logs that th

Re: GUC flags

2022-01-04 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 11:47:57AM +0900, Kyotaro Horiguchi wrote: > At Tue, 28 Dec 2021 20:32:40 -0600, Justin Pryzby > wrote in > > On Thu, Dec 09, 2021 at 09:53:23AM -0600, Justin Pryzby wrote: > > > On Thu, Dec 09, 2021 at 05:17:54PM +0900, Michael Paquier wrote: &

Re: SKIP LOCKED assert triggered

2022-01-04 Thread Justin Pryzby
On Tue, Jan 04, 2022 at 11:15:30AM -0500, Tom Lane wrote: > Alvaro Herrera writes: > > Pushed, thanks Simon for reporting this problem. > > Umm ... > >Assert(TM_WouldBlock || !(tuple->t_data->t_infomask & > HEAP_XMAX_INVALID)); > > AFAICS, this assertion condition is constant-true, Th

Re: psql: \dl+ to list large objects privileges

2022-01-03 Thread Justin Pryzby
On Tue, Aug 31, 2021 at 05:14:12PM +0300, Pavel Luzanov wrote: > I decided to move the do_lo_list function to describe.c in order to use the > printACLColumn helper function. And at the same time I renamed do_lo_list to > listLargeObjects to unify with the names of other similar functions. The tab

Re: pg_dump/restore --no-tableam

2022-01-03 Thread Justin Pryzby
@cfbot: rebased >From 69ae2ed5d00a97d351e1f6c45a9e406f33032898 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sun, 7 Mar 2021 19:35:37 -0600 Subject: [PATCH] Add pg_dump/restore --no-table-am.. This was for some reason omitted from 3b925e905. --- doc/src/sgml/ref/pg_dump.sgml|

Re: [PATCH] pg_stat_toast v6

2022-01-03 Thread Justin Pryzby
> +pgstat_report_toast_activity(Oid relid, int attr, > + bool externalized, > + bool compressed, > + int32 old_size, > +

Re: [PATCH] pg_stat_toast v6

2022-01-03 Thread Justin Pryzby
On Mon, Jan 03, 2022 at 08:40:50PM +0100, Gunnar "Nick" Bluth wrote: > I wonder why "track_toast.sql" test fails on Windows (with "ERROR: > compression method lz4 not supported"), but "compression.sql" doesn't. > Any hints? The windows CI doesn't have LZ4, so the SQL command fails, but there's an

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Justin Pryzby
On Mon, Jan 03, 2022 at 05:00:45PM +0100, Gunnar "Nick" Bluth wrote: > Am 03.01.22 um 16:52 schrieb Gunnar "Nick" Bluth: > > > pg_stat_toast_v0.4.patch attached. Note that the cfbot says this fails under windows http://cfbot.cputube.org/gunnar-quotnickquot-bluth.html ... [16:47:05.347] Could not

Re: Column Filtering in Logical Replication

2022-01-03 Thread Justin Pryzby
On Mon, Jan 03, 2022 at 11:31:39AM -0300, Alvaro Herrera wrote: > > Did the DatumGetBool issue expose a deficiency in testing ? > > I think the !am_partition path was never being hit. > > Hmm, the TAP test creates a subscription that contains both types of > tables. I tried adding an assert for e

Re: Refactoring the regression tests for more independence

2022-01-02 Thread Justin Pryzby
On Fri, Dec 24, 2021 at 05:00:17PM -0500, Tom Lane wrote: > While I've not done so here, I'm tempted to rename > create_function_0 to create_function_c and create_function_3 to > create_function_sql, to give them better-defined charters and > eliminate the confusion with trailing digits for variant

Re: Column Filtering in Logical Replication

2021-12-31 Thread Justin Pryzby
> @@ -5963,8 +5967,20 @@ describePublications(const char *pattern) > { > /* Get the tables for the specified publication */ > printfPQExpBuffer(&buf, > - "SELECT n.nspname, > c.relname\n

Re: Adding CI to our tree

2021-12-30 Thread Justin Pryzby
commit message: agithub the the the buildfarm. => the access too. => to # Due to that it using concurrency within prove is helpful. => Due to that, it's useful to run prove with multiple jobs. further details src/tools/ci/README => further details , see src/tools/ci/README script uses a pseudo

Re: Column Filtering in Logical Replication

2021-12-30 Thread Justin Pryzby
> + boolam_partition = false; >... > Assert(!isnull); > lrel->relkind = DatumGetChar(slot_getattr(slot, 3, &isnull)); > Assert(!isnull); > + am_partition = DatumGetChar(slot_getattr(slot, 4, &isnull)); I think this needs to be GetBool. You should Assert(!isnul

Re: Add index scan progress to pg_stat_progress_vacuum

2021-12-29 Thread Justin Pryzby
http://cfbot.cputube.org/sami-imseih.html You should run "make check" and update rules.out. You should also use make check-world - usually something like: make check-world -j4 >check-world.out 2>&1 ; echo ret $? > indrelid: The relid of the index currently being vacuumed I think it should be cal

Re: PublicationActions - use bit flags.

2021-12-29 Thread Justin Pryzby
On Mon, Dec 20, 2021 at 11:18:41AM +1100, Peter Smith wrote: > For some reason the current HEAD PublicationActions is a struct of > boolean representing combinations of the 4 different "publication > actions". > > I felt it is more natural to implement boolean flag combinations using > a bitmask i

Re: Proposal: More structured logging

2021-12-29 Thread Justin Pryzby
> Subject: [PATCH v3 2/3] Add test module for the new tag functionality. ... > +test_logging(PG_FUNCTION_ARGS) > +{ ... > + (errmsg("%s", message), > + ({ > + forboth(lk, keys, lv, values) > + { > + (errtag(lfirst(lk), "%s", (char *) lfirst(lv)

Re: GUC flags

2021-12-28 Thread Justin Pryzby
On Thu, Dec 09, 2021 at 09:53:23AM -0600, Justin Pryzby wrote: > On Thu, Dec 09, 2021 at 05:17:54PM +0900, Michael Paquier wrote: > > On Wed, Dec 08, 2021 at 01:23:51PM +0100, Peter Eisentraut wrote: > > > I wasn't really aware of this script either. But I think it's

warn if GUC set to an invalid shared library

2021-12-28 Thread Justin Pryzby
"asdf": No such file or directory 2021-12-18 23:13:57.862 CST postmaster[11956] LOG: database system is shut down After 0003: 2021-12-18 23:16:05.719 CST postmaster[13481] FATAL: could not load library: asdf: cannot open shared object file: No such file or directory

Re: Add index scan progress to pg_stat_progress_vacuum

2021-12-27 Thread Justin Pryzby
Please send your patches as *.diff or *.patch, so they're processed by the patch tester. Preferably with commit messages; git format-patch is the usual tool for this. http://cfbot.cputube.org/sami-imseih.html (Occasionally, it's also useful to send a *.txt to avoid the cfbot processing the wrong

default to to ON_ERROR_STOP=on (Re: psql: exit status with multiple -c and -f)

2021-12-27 Thread Justin Pryzby
On Mon, Dec 06, 2021 at 09:08:56AM -0600, Justin Pryzby wrote: > I raised this issue a few years ago. > https://www.postgresql.org/message-id/20181217175841.GS13019%40telsasoft.com > > |[pryzbyj@database ~]$ psql -v VERBOSITY=terse ts -xtc 'ONE' -c "SELECT

Re: Write visibility map during CLUSTER/VACUUM FULL

2021-12-26 Thread Justin Pryzby
On Mon, Nov 15, 2021 at 04:38:56PM -0600, Justin Pryzby wrote: > On Sun, Aug 29, 2021 at 07:26:42PM -0500, Justin Pryzby wrote: > > On Mon, Jun 28, 2021 at 11:22:01AM +0300, Anna Akenteva wrote: > > > On 2019-11-29 05:32, Michael Paquier wrote: > > > > These comments

Re: Inconsistent ellipsis in regression test error message?

2021-12-26 Thread Justin Pryzby
On Fri, Dec 24, 2021 at 11:41:47AM +1100, Peter Smith wrote: > The most recent cfbot run for a patch I am interested in has failed a > newly added regression test. > > Please see http://cfbot.cputube.org/ for 36/2906 > > The failure logs [2] are very curious because the error message is > what wa

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-25 Thread Justin Pryzby
On Fri, Dec 24, 2021 at 08:04:08PM +0530, Bharath Rupireddy wrote: > On Fri, Dec 24, 2021 at 7:19 PM Justin Pryzby wrote: > > On Sun, Dec 12, 2021 at 06:08:05PM +0530, Bharath Rupireddy wrote: > > > Another idea could be to use the infrastructure laid out by the commit >

Re: correct the sizes of values and nulls arrays in pg_control_checkpoint

2021-12-25 Thread Justin Pryzby
On Thu, Dec 23, 2021 at 05:09:28PM +0530, Bharath Rupireddy wrote: > Hi, > > pg_control_checkpoint emits 18 columns whereas the values and nulls > arrays are defined to be of size 19. Although it's not critical, > attaching a tiny patch to fix this. LGTM It's helpful to check the history to find

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-24 Thread Justin Pryzby
On Sun, Dec 12, 2021 at 06:08:05PM +0530, Bharath Rupireddy wrote: > Another idea could be to use the infrastructure laid out by the commit > 9ce346e [1]. With ereport_startup_progress, we can emit the LOGs(of > current recovering WAL file) for every log_startup_progress_interval > seconds/millisec

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2021-12-23 Thread Justin Pryzby
ype "|git am" (or |git am -3). >From b8ed86daad1bf9fbb647f7c007130bb0878a2a94 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Mon, 16 Mar 2020 14:12:55 -0500 Subject: [PATCH v32 01/11] Document historic behavior of links to directories.. Backpatch to 9.5: pg_stat_file --- doc/src/sgml/func.sgml | 2 +- 1 file changed

Re: \d with triggers: more than one row returned by a subquery used as an expression

2021-12-22 Thread Justin Pryzby
On Fri, Dec 17, 2021 at 09:43:56AM -0600, Justin Pryzby wrote: > I want to mention that the 2nd problem I mentioned here is still broken. > https://www.postgresql.org/message-id/20210717010259.gu20...@telsasoft.com > > It happens if non-inheritted triggers on child and parent have t

Re: pg_upgrade should truncate/remove its logs before running

2021-12-22 Thread Justin Pryzby
On Wed, Dec 22, 2021 at 09:52:26AM -0500, Tom Lane wrote: > Michael Paquier writes: > > On Mon, Dec 20, 2021 at 09:39:26PM -0600, Justin Pryzby wrote: > >> Are you suggesting to remove these ? > >> -/pg_upgrade_internal.log > >> -/loadable_libraries.txt >

Re: Schema variables - new implementation for Postgres 15

2021-12-21 Thread Justin Pryzby
On Tue, Dec 21, 2021 at 01:29:00PM +0100, Pavel Stehule wrote: > Hi > > út 21. 12. 2021 v 0:09 odesílatel Justin Pryzby > napsal: > > > I don't understand what 0002 patch does relative to the 0001 patch. > > Is 0002 to change the error messages from "schema

Re: pg_upgrade should truncate/remove its logs before running

2021-12-20 Thread Justin Pryzby
On Mon, Dec 20, 2021 at 08:21:51PM +0900, Michael Paquier wrote: > On Fri, Dec 17, 2021 at 11:21:13AM -0600, Justin Pryzby wrote: > + log_opts.basedir = "pg_upgrade_log.d"; > we could choose something simpler for the default, like > "pg_upgrade_log".

Re: Schema variables - new implementation for Postgres 15

2021-12-20 Thread Justin Pryzby
I don't understand what 0002 patch does relative to the 0001 patch. Is 0002 to change the error messages from "schema variables" to "session variables" , in a separate commit to show that the main patch doesn't change regression results ? Could you add commit messages ? I mentioned before that th

Re: Add index scan progress to pg_stat_progress_vacuum

2021-12-20 Thread Justin Pryzby
have something similar. -- Justin Pryzby System Administrator Telsasoft +1-952-707-8581

sqlsmith: ERROR: XX000: bogus varno: 2

2021-12-19 Thread Justin Pryzby
I reduced the problematic query to this. SELECT 1 FROM pg_rewrite WHERE pg_get_function_arg_default(ev_class, 1) !~~ pg_get_expr(ev_qual, ev_class, false); #0 pg_re_throw () at elog.c:1800 #1 0x563f5d027932 in errfinish () at elog.c:593 #2 0x563f5cb874ee in resolve_special_varno (node=

Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)

2021-12-18 Thread Justin Pryzby
Remove bogus ACL check for AMs. Rebased on cf0cab868. Use ForkNumber rather than int. Update comments and commit message. Also move the Size column of \l and \dt >From a1d33780e4c61a7bdb64ee6ab5c248e1175a3efd Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 13 Jul 2021 21:25:48 -0

Re: make tuplestore helper function

2021-12-17 Thread Justin Pryzby
On Mon, Dec 13, 2021 at 05:27:52PM -0500, Melanie Plageman wrote: > Done in attached v4 Thanks. I think these comments can be removed from the callers: /* it's a simple type, so don't use get_call_result_type */ You removed one call to tuplestore_donestoring(), but not the others. I guess you co

Re: In-placre persistance change of a relation

2021-12-17 Thread Justin Pryzby
On Fri, Dec 17, 2021 at 02:33:25PM +, Jakub Wartak wrote: > > Justin wrote: > > On Fri, Dec 17, 2021 at 09:10:30AM +, Jakub Wartak wrote: > > > As the thread didn't get a lot of traction, I've registered it into > > > current > > commitfest > > https://eur02.safelinks.protection.outlook.c

Re: pg_upgrade should truncate/remove its logs before running

2021-12-17 Thread Justin Pryzby
ade, as opposed to the other logs, which are typically removed at that point. -- Justin >From 7b608a415645682a9853bb4fbfde54caa6ccc137 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 11 Dec 2021 19:19:50 -0600 Subject: [PATCH] pg_upgrade: write logfiles and dumps in subdir.. The subdir must not exist when pg_upgrade

\d with triggers: more than one row returned by a subquery used as an expression

2021-12-17 Thread Justin Pryzby
I want to mention that the 2nd problem I mentioned here is still broken. https://www.postgresql.org/message-id/20210717010259.gu20...@telsasoft.com It happens if non-inheritted triggers on child and parent have the same name. On Fri, Jul 16, 2021 at 08:02:59PM -0500, Justin Pryzby wrote: >

Re: In-placre persistance change of a relation

2021-12-17 Thread Justin Pryzby
On Fri, Dec 17, 2021 at 09:10:30AM +, Jakub Wartak wrote: > I'm especially worried if I didn't screw up something/forgot something > related to the last one (rd->rd_smgr changes), but I'm getting "All 210 tests > passed". > As the thread didn't get a lot of traction, I've registered it into

Re: Add sub-transaction overflow status in pg_stat_activity

2021-12-16 Thread Justin Pryzby
On Fri, Dec 17, 2021 at 09:00:04AM +0530, Dilip Kumar wrote: > On Tue, Dec 14, 2021 at 3:57 AM Bossart, Nathan wrote: > > > > On 12/13/21, 6:30 AM, "Dilip Kumar" wrote: > > > On Tue, Dec 7, 2021 at 11:11 AM Justin Pryzby > > > wrote: > > >&

Re: GUC flags

2021-12-16 Thread Justin Pryzby
On Thu, Dec 09, 2021 at 09:53:23AM -0600, Justin Pryzby wrote: > On Thu, Dec 09, 2021 at 05:17:54PM +0900, Michael Paquier wrote: > > On Wed, Dec 08, 2021 at 01:23:51PM +0100, Peter Eisentraut wrote: > > > I wasn't really aware of this script either. But I think it's

Re: pg_dump versus ancient server versions

2021-12-15 Thread Justin Pryzby
On Wed, Dec 15, 2021 at 10:08:07PM -0600, Justin Pryzby wrote: > Is it possible to clean up pg_upgrade, too ? Nevermind - I found yesterday's e469f0aaf3 after git-fetch. I think you missed a few parts though ? src/bin/pg_upgrade/function.c if (GET_MAJOR

Re: pg_dump versus ancient server versions

2021-12-15 Thread Justin Pryzby
On Tue, Dec 14, 2021 at 05:18:44PM -0500, Tom Lane wrote: > I wrote: > > Anyway, it seems like there's some consensus that 9.2 is a good > > stopping place for today. I'll push forward with > > (1) back-patching as necessary to make 9.2 and up build cleanly > > on the platforms I have handy; > > (

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

2021-12-15 Thread Justin Pryzby
On Fri, Dec 03, 2021 at 03:02:24PM -0500, Melanie Plageman wrote: > Thanks again! I really appreciate the thorough review. > > I have combined responses to all three of your emails below. > Let me know if it is more confusing to do it this way. One email is better than three - I'm just not a mode

Re: pg_upgrade should truncate/remove its logs before running

2021-12-15 Thread Justin Pryzby
On Wed, Dec 15, 2021 at 05:04:54PM -0500, Andrew Dunstan wrote: > On 12/15/21 16:23, Bruce Momjian wrote: > > On Wed, Dec 15, 2021 at 04:17:23PM -0500, Tom Lane wrote: > >> Bruce Momjian writes: > >>> On Sat, Dec 11, 2021 at 08:50:17PM -0600, Justin Pryzby wrote: >

Re: pg_upgrade should truncate/remove its logs before running

2021-12-15 Thread Justin Pryzby
On Wed, Dec 15, 2021 at 04:09:16PM -0500, Bruce Momjian wrote: > On Sat, Dec 11, 2021 at 08:50:17PM -0600, Justin Pryzby wrote: > > I have seen this numerous times but had not dug into it, until now. > > > > If pg_upgrade fails and is re-run, it appends to its logfiles, w

Re: Adding CI to our tree

2021-12-15 Thread Justin Pryzby
On Mon, Dec 13, 2021 at 03:45:23PM -0800, Andres Freund wrote: > Hi, > > On 2021-12-13 18:14:52 -0500, Tom Lane wrote: > > Andres Freund writes: > > > On 2021-12-13 16:02:50 -0600, Justin Pryzby wrote: > > >> sudo is used exactly twice; maybe it's not n

Re: Adding CI to our tree

2021-12-13 Thread Justin Pryzby
On Mon, Dec 13, 2021 at 01:12:23PM -0800, Andres Freund wrote: > Hi, > > Attached is an updated version of the CI patches. An example of a test run > with the attached version of this > https://cirrus-ci.com/build/6501998521483264 sudo is used exactly twice; maybe it's not needed at all ? > +tas

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

2021-12-13 Thread Justin Pryzby
On Mon, Dec 13, 2021 at 08:53:37AM -0500, Robert Haas wrote: > On Fri, Dec 10, 2021 at 2:03 PM Bossart, Nathan wrote: > > Well, I haven't had a chance to look at your patch, and my patch set > > still only has handling for CheckPointSnapBuild() and > > RemovePgTempFiles(), but I thought I'd share

Re: extended stats on partitioned tables

2021-12-13 Thread Justin Pryzby
On Sun, Dec 12, 2021 at 11:23:19PM +0100, Tomas Vondra wrote: > On 12/12/21 22:32, Justin Pryzby wrote: > > On Sun, Dec 12, 2021 at 05:17:10AM +0100, Tomas Vondra wrote: > > > The one thing bugging me a bit is that the regression test checks only a > > > GROUP BY query.

Re: extended stats on partitioned tables

2021-12-13 Thread Justin Pryzby
On Sun, Dec 12, 2021 at 10:29:39PM +0100, Tomas Vondra wrote: > > In your 0003 patch, the "if inh: break" isn't removed from > > examine_variable(), > > but the corresponding thing is removed everywhere else. > > Ah, you're right. And it wasn't updated in the 0002 patch either - it > should do th

Re: extended stats on partitioned tables

2021-12-12 Thread Justin Pryzby
On Sun, Dec 12, 2021 at 10:29:39PM +0100, Tomas Vondra wrote: > On 12/12/21 18:52, Justin Pryzby wrote: > That's mostly a conscious choice, so that I don't have to include > parsetree.h. But maybe that'd be better ... > > > The regression tests changed as a res

Re: extended stats on partitioned tables

2021-12-12 Thread Justin Pryzby
On Sun, Dec 12, 2021 at 05:17:10AM +0100, Tomas Vondra wrote: > The one thing bugging me a bit is that the regression test checks only a > GROUP BY query. It'd be nice to add queries testing MCV/dependencies > too, but that seems tricky because most queries will use per-partitions > stats. You mea

Re: extended stats on partitioned tables

2021-12-12 Thread Justin Pryzby
RE s.stxname = 'ab1_a_b_stats'; There's this part about documentation for the changes in backbranches: On Sun, Sep 26, 2021 at 03:25:50PM -0500, Justin Pryzby wrote: > Also, I think in backbranches we should document what's being stored in > pg_statistic_ext, since it'

pg_upgrade should truncate/remove its logs before running

2021-12-11 Thread Justin Pryzby
e calls to exec_progs(), like this. - "\"%s/pg_restore\" %s %s --exit-on-error --verbose " + "\"%s/pg_restore\" %s %s --exit-on-error --verboose " >From 1b1a86df1febce5f55257c625b81e1499f6bfce3 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat,

Re: pg_upgrade failing for 200+ million Large Objects

2021-12-11 Thread Justin Pryzby
On Wed, Mar 24, 2021 at 12:05:27PM -0400, Jan Wieck wrote: > On 3/24/21 12:04 PM, Jan Wieck wrote: > > In any case I changed the options so that they behave the same way, the > > existing -o and -O (for old/new postmaster options) work. I don't think > > it would be wise to have option forwarding w

Re: Probable memory leak with ECPG and AIX

2021-12-10 Thread Justin Pryzby
On Fri, Dec 10, 2021 at 03:40:50PM +0100, Guillaume Lelarge wrote: > Hello, > > Our customer thinks he has found a memory leak on ECPG and AIX. > > The code is quite simple. It declares a cursor, opens it, and fetches the > only line available in the table many times. After some time, the client

Re: pg_dump/restore --no-table-am

2021-12-09 Thread Justin Pryzby
I forgot but had actually implemented this 6 months ago. >From 748da82347f1bfc793ef58de0fa2cb9664e18c52 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sun, 7 Mar 2021 19:35:37 -0600 Subject: [PATCH 2/2] Add pg_dump/restore --no-table-am.. This was for some reason omitted from 3b925e

Re: GUC flags

2021-12-09 Thread Justin Pryzby
dding it for regression tests. The only other alternative I can think of is to make a sql-callable function like pg_get_guc_flags(text guc). >From 2cd8cdbe9f79d88cc920a6e093fa61780ea07a44 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sun, 5 Dec 2021 23:22:04 -0600 Subject: [PATCH 1/2]

Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?

2021-12-07 Thread Justin Pryzby
On Tue, Dec 07, 2021 at 11:18:37PM +0100, Tomas Vondra wrote: > On 12/7/21 15:36, Bharath Rupireddy wrote: > > Currently one can know the kind of on-going/last checkpoint (shutdown, > > end-of-recovery, immediate, force etc.) only via server logs that to > > when log_checkpoints GUC is on. > > The

pg_dump/restore --no-tableam

2021-12-07 Thread Justin Pryzby
I first suggested this a couple years ago. Is it desirable to implement in pg_dump and pg_restore ? It'd be just like --tablespace. On Tue, Jan 28, 2020 at 07:33:17AM -0600, Justin Pryzby wrote: > I made these casual comments. If there's any agreement on their merit, it'

Re: Add sub-transaction overflow status in pg_stat_activity

2021-12-06 Thread Justin Pryzby
> + > + subxact_count xid > + > + > + The current backend's active subtransactions count. subtransaction (no s) > + Set to true if current backend's subtransaction cache is overflowed. Say "has overflowed" > + if (local_beentry->subxact_count > 0)

<    6   7   8   9   10   11   12   13   14   15   >