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

2022-02-20 Thread Noah Misch
On Sun, Feb 20, 2022 at 02:15:37PM -0800, Andres Freund wrote: > On 2022-02-19 20:57:57 -0800, Noah Misch wrote: > > On Wed, Feb 16, 2022 at 03:43:12PM +0700, John Naylor wrote: > > > On Wed, Feb 16, 2022 at 6:17 AM Peter Geoghegan wrote: > > > > On Tue, Feb 15, 2

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-03-03 Thread Noah Misch
On Sun, Jan 16, 2022 at 01:02:41PM -0800, Noah Misch wrote: > My next steps: > > - Report a Debian bug for the sparc64+ext4 zeros problem. Reported to Debian, then upstream: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006157 https://marc.info/?t=16453926991 Last week

Re: Replication slot drop message is sent after pgstats shutdown.

2022-03-18 Thread Noah Misch
(errcode(ERRCODE_QUERY_CANCELED), I plan to fix this as attached, similar to how commit c04c767 fixed the same challenge in detach-partition-concurrently-[34]. Author: Noah Misch Commit: Noah Misch Close race condition in slot_creation_err

Re: Replication slot drop message is sent after pgstats shutdown.

2022-03-18 Thread Noah Misch
On Fri, Mar 18, 2022 at 01:24:15PM -0700, Andres Freund wrote: > On 2022-03-18 00:28:37 -0700, Noah Misch wrote: > > === > > diff -U3 > > /export/home/nm/farm/studio64v12_6/HEAD/pgsql/contrib/test_decoding/expected/slot_creation_error.out > > > > /expor

Re: Why is src/test/modules/committs/t/002_standby.pl flaky?

2022-03-19 Thread Noah Misch
On Mon, Jan 10, 2022 at 04:25:27PM -0500, Tom Lane wrote: > Apropos of that, it's worth noting that wait_for_catchup *is* > dependent on up-to-date stats, and here's a recent run where > it sure looks like the timeout cause is AWOL stats collector: > > https://buildfarm.postgresql.org/cgi-bin/show

Re: Recent eelpout failures on 9.x branches

2020-12-01 Thread Noah Misch
On Tue, Dec 01, 2020 at 06:07:17PM -0500, Tom Lane wrote: > Thomas Munro writes: > > Unfortunately, eelpout got kicked off the nice shiny ARM server it was > > running on so last week I moved it to a rack mounted Raspberry Pi. It > > seems to be totally I/O starved causing some timeouts to be rea

Re: convert elog(LOG) calls to ereport

2020-12-02 Thread Noah Misch
On Wed, Dec 02, 2020 at 02:26:24PM +0100, Peter Eisentraut wrote: > There are a number of elog(LOG) calls that appear to be user-facing, so they > should be ereport()s. > @@ -8591,25 +8604,46 @@ LogCheckpointEnd(bool restartpoint) > CheckpointStats.ckpt_sync_rels; > ave

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-12-09 Thread Noah Misch
On Wed, Dec 02, 2020 at 01:50:25PM +0530, Amit Kapila wrote: > On Wed, Dec 2, 2020 at 1:20 PM Dilip Kumar wrote: > > > On Mon, Nov 30, 2020 at 6:49 PM Amit Kapila > > > wrote: > > > > On Mon, Nov 30, 2020 at 3:14 AM Noah Misch wrote: > > > > >

Re: pg_basebackup test coverage

2020-12-10 Thread Noah Misch
On Thu, Dec 10, 2020 at 12:32:52PM -0500, Robert Haas wrote: > It would probably be good to fix as much of this as we can, but there > are a couple of cases I think would be particularly good to cover. One > is 'pg_basebackup -Ft -Xnone -D -', which tries to write the output as > a single tar file

Re: pg_basebackup test coverage

2020-12-11 Thread Noah Misch
On Fri, Dec 11, 2020 at 12:23:10PM -0500, Robert Haas wrote: > On Fri, Dec 11, 2020 at 3:04 AM Michael Paquier wrote: > > Why don't you just use Archive::Tar [1] instead of looking for some system > > commands? Combining list_files() with extract(), it is possible to > > extract an archive, with

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-13 Thread Noah Misch
On Sun, Dec 13, 2020 at 11:49:31AM -0500, Tom Lane wrote: > But what jumps out at me here is that this sort of error seems way > too easy to make, and evidently way too hard to detect. What can we > do to make it more obvious if one has incorrectly used or omitted > HASH_BLOBS? Both directions of

Re: HASH_BLOBS hazards (was Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions)

2020-12-15 Thread Noah Misch
On Mon, Dec 14, 2020 at 01:59:03PM -0500, Tom Lane wrote: > * Should we just have a blanket insistence that all callers supply > HASH_ELEM? The default sizes that dynahash.c uses without that are > undocumented and basically useless. +1 > we should just rip out all those memsets as pointless, si

Re: [PATCH] Logical decoding of TRUNCATE

2020-12-19 Thread Noah Misch
On Sat, Apr 07, 2018 at 07:40:11PM -0400, Peter Eisentraut wrote: > Committed with those changes. Since commit 039eb6e added logical replication support for TRUNCATE, logical apply of the TRUNCATE fails if it chooses a parallel index build: cat >/tmp/most_parallel.conf <

Re: [PATCH] Logical decoding of TRUNCATE

2020-12-21 Thread Noah Misch
On Sun, Dec 20, 2020 at 03:54:31PM -0800, Peter Geoghegan wrote: > On Sun, Dec 20, 2020 at 3:13 PM Andres Freund wrote: > > Hm. Do I understand correctly that this problem is hit solely because > > the parallel mode code relies on there already have been a transaction > > snapshot set, thus avoidi

Invalidate acl.c caches for pg_authid.rolinherit changes

2020-12-21 Thread Noah Misch
ets the bulk of traffic, since SELECT, INSERT, UPDATE and DELETE use it. cached_membership_roles pertains to DDL and such. Author: Noah Misch Commit: Noah Misch Invalidate acl.c caches when pg_authid changes. This makes existing sessions reflect "ALTER ROLE ... [NO]I

Re: [PATCH] Logical decoding of TRUNCATE

2020-12-23 Thread Noah Misch
On Mon, Dec 21, 2020 at 09:42:47AM -0800, Andres Freund wrote: > On 2020-12-20 15:54:31 -0800, Peter Geoghegan wrote: > > On Sun, Dec 20, 2020 at 3:13 PM Andres Freund wrote: > > > Hm. Do I understand correctly that this problem is hit solely because > > > the parallel mode code relies on there al

Re: Temporary tables versus wraparound... again

2020-12-25 Thread Noah Misch
On Tue, Nov 10, 2020 at 04:10:57PM +0900, Masahiko Sawada wrote: > On Mon, Nov 9, 2020 at 3:23 PM Greg Stark wrote: > > On Mon, 9 Nov 2020 at 00:17, Noah Misch wrote: > > > > @@ -3340,6 +3383,7 @@ heap_truncate_one_rel(Relation rel) > > > > > > > &

Tying an object's ownership to datdba

2020-12-27 Thread Noah Misch
ntication, may necessitate IndexScanOK()'s treatment of pg_auth_members.) For now, just in case I missed the early read, I've made IndexScanOK() treat pg_database like pg_auth_members. Thanks, nm Author: Noah Misch Commit: Noah Misch Merge similar algorithms into roles_is_mem

Dump public schema ownership & seclabels

2020-12-29 Thread Noah Misch
implicitly. If anyone thinks I should unbundle these two, let me know. All this is arguably a fix for an ancient bug. Some sites may need to compensate for the behavior change, so I plan not to back-patch. Thanks, nm Author: Noah Misch Commit: Noah Misch Dump public schema ownersh

Re: Dump public schema ownership & seclabels

2020-12-30 Thread Noah Misch
On Tue, Dec 29, 2020 at 05:49:24AM -0800, Noah Misch wrote: > https://postgr.es/m/20201031163518.gb4039...@rfd.leadboat.com gave $SUBJECT as > one of the constituent projects for changing the public schema default ACL. > This ended up being simple. Attached. This is defective; it

Re: Buildfarm's cross-version-upgrade tests

2020-12-30 Thread Noah Misch
On Wed, Dec 30, 2020 at 04:28:44PM -0500, Andrew Dunstan wrote: > On 12/30/20 3:42 PM, Tom Lane wrote: > > Since I'd just seen Noah's commit 52202bb39 go by, I tried > > modifying src/bin/pg_upgrade/test.sh to do the drop, but that > > isn't helping. I recall now from prior discussions that we > >

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2021-01-01 Thread Noah Misch
On Fri, Jan 01, 2021 at 11:05:29PM +0500, Andrey Borodin wrote: > I've found this thread in CF looking for something to review. Thanks for taking a look. > > 9 нояб. 2020 г., в 09:53, Noah Misch написал(а): > > > > Rebased both patches, necessitated by commit c

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2021-01-02 Thread Noah Misch
On Sat, Jan 02, 2021 at 12:31:45PM +0500, Andrey Borodin wrote: > Do I understand correctly that this is bugfix that needs to be back-patched? The slru-truncate-modulo patch fixes a bug. The slru-truncate-t-insurance patch does not. Neither _needs_ to be back-patched, though I'm proposing to bac

Re: pg_upgrade fails with non-standard ACL

2021-01-03 Thread Noah Misch
On Thu, Jun 11, 2020 at 07:58:43PM +0300, Anastasia Lubennikova wrote: > On 08.06.2020 19:31, Alvaro Herrera wrote: > >I'm thinking what's a good way to have a test that's committable. Maybe > >it would work to add a TAP test to pg_upgrade that runs initdb, does a > >few GRANTS as per your attachm

Re: Context diffs

2021-01-04 Thread Noah Misch
On Tue, Jan 05, 2021 at 11:21:07AM +1300, Thomas Munro wrote: > On Tue, Jan 5, 2021 at 8:07 AM Bruce Momjian wrote: > > * "git apply" and "git am" can't process context diffs (they throw an > >error once a context-like section of the diff is hit; simple > >adding/removing lines in a block

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2021-01-09 Thread Noah Misch
On Wed, Jan 06, 2021 at 11:28:36AM +0500, Andrey Borodin wrote: > First patch fixes a bug with possible SLRU truncation around wrapping point > too early. > Basic idea of the patch is "If we want to delete a range we must be eligible > to delete it's beginning and ending". > So to test if page is

pg_dump vs. GRANT OPTION among initial privileges

2021-01-09 Thread Noah Misch
reviewing "diff -w" output first. I'm not certain the test suite will always find those REVOKE statements in the same order; if that order varies, one regex will need more help. Author: Noah Misch Commit: Noah Misch Fix pg_dump for GRANT OPTION among initial privilege

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2021-01-09 Thread Noah Misch
On Sat, Jan 09, 2021 at 08:25:39PM +0500, Andrey Borodin wrote: > > 9 янв. 2021 г., в 15:17, Noah Misch написал(а): > >> I'm a little bit afraid that this kind of patch can hide bugs (while > >> potentially saving some users data). Besides this patch seems like a

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2021-01-10 Thread Noah Misch
On Sun, Jan 10, 2021 at 11:44:14AM +0500, Andrey Borodin wrote: > > 10 янв. 2021 г., в 03:15, Noah Misch написал(а): > > > > No; it deletes the most recent ~1B and leaves the older segments. An > > exception is multixact, as described in the commit message and the

Re: Inconsistent "" use

2021-01-10 Thread Noah Misch
On Sun, Jan 10, 2021 at 08:22:42PM +0900, Tatsuo Ishii wrote: > In doc/src/sgml/func.sgml description of SHOW command use > "SQL", while SET command description the same > section does not use "". Shouldn't the description of SET use > "" for "SQL" as well? Patch attached. https://tdg.docbook.org/

Re: Dump public schema ownership & seclabels

2021-02-12 Thread Noah Misch
On Thu, Feb 11, 2021 at 04:08:34AM -0800, Noah Misch wrote: > On Sun, Jan 17, 2021 at 12:00:06PM +0100, Vik Fearing wrote: > > On 1/17/21 10:41 AM, Noah Misch wrote: > > > On Sat, Jan 16, 2021 at 02:05:43PM +0100, Vik Fearing wrote: > > >> On 12/30/20 12:59 PM, No

Re: public schema default ACL

2021-02-13 Thread Noah Misch
I'm attaching the patch for $SUBJECT, which applies atop the four patches from the two other threads below. For convenience of testing, I've included a rollup patch, equivalent to applying all five patches. On Sat, Oct 31, 2020 at 09:35:18AM -0700, Noah Misch wrote: > More d

Re: increase size of pg_commit_ts buffers

2021-02-15 Thread Noah Misch
On Fri, Jan 15, 2021 at 07:07:44PM -0300, Alvaro Herrera wrote: > I wrote this patch last year in response to a customer issue and I > thought I had submitted it here, but evidently I didn't. So here it is. > > The short story is: in commit 5364b357fb11 we increased the size of > pg_commit (née p

Re: We should stop telling users to "vacuum that database in single-user mode"

2021-03-01 Thread Noah Misch
On Mon, Mar 01, 2021 at 04:32:23PM +0100, Hannu Krosing wrote: > It looks like we are unnecessarily instructing our usiers to vacuum their > databases in single-user mode when just vacuuming would be enough. > When I started looking at improving the situation I discovered, that there > already is

Re: Some regular-expression performance hacking

2021-03-06 Thread Noah Misch
On Sat, Feb 13, 2021 at 06:19:34PM +0100, Joel Jacobson wrote: > To test the correctness of the patches, > I thought it would be nice with some real-life regexes, > and just as important, some real-life text strings, > to which the real-life regexes are applied to. > > I therefore patched Chromium

Re: pg_upgrade fails with non-standard ACL

2021-03-08 Thread Noah Misch
On Thu, Feb 11, 2021 at 08:16:30PM +0300, Anastasia Lubennikova wrote: > On 28.01.2021 09:55, Noah Misch wrote: > >On Wed, Jan 27, 2021 at 07:32:42PM +0300, Anastasia Lubennikova wrote: > >>On 27.01.2021 14:21, Noah Misch wrote: > >>>On Mon, Jan 25, 2021 at 10:14:43P

Re: Procedures versus the "fastpath" API

2021-03-11 Thread Noah Misch
On Wed, Mar 10, 2021 at 10:03:24AM +0100, Laurenz Albe wrote: > On Tue, 2021-03-09 at 14:15 -0500, Tom Lane wrote: > > As for procedures, I'm of the opinion that we should just reject those > > too, but some other security team members were not happy with that > > idea. Conceivably we could attemp

Re: pg_amcheck contrib application

2021-03-12 Thread Noah Misch
On Sat, Mar 13, 2021 at 01:07:15AM -0500, Tom Lane wrote: > I wrote: > >> ... btw, prairiedog (which has a rather old Perl) has a > >> different complaint: > >> Invalid type 'q' in unpack at t/004_verify_heapam.pl line 104. > > > Hmm ... "man perlfunc" on that system quoth > >q

Re: pg_amcheck contrib application

2021-03-12 Thread Noah Misch
On Sat, Mar 13, 2021 at 01:36:11AM -0500, Tom Lane wrote: > Mark Dilger writes: > > On Mar 12, 2021, at 10:22 PM, Tom Lane wrote: > >> Coping with both endiannesses might be painful. > > > Not too bad if the bigint value is zero, as both the low and high 32bits > > will be zero, regardless of e

Re: pg_amcheck contrib application

2021-03-13 Thread Noah Misch
On Fri, Mar 12, 2021 at 05:04:09PM -0800, Mark Dilger wrote: > > On Mar 12, 2021, at 3:24 PM, Mark Dilger > > wrote: > > > > and the second deals with an apparent problem with IPC::Run shell expanding > > an asterisk on some platforms but not others. That second one, if true, > > seems like a

Re: pg_amcheck contrib application

2021-03-13 Thread Noah Misch
On Sat, Mar 13, 2021 at 10:51:27AM -0800, Mark Dilger wrote: > > On Mar 13, 2021, at 10:46 AM, Noah Misch wrote: > > On Fri, Mar 12, 2021 at 05:04:09PM -0800, Mark Dilger wrote: > >>> On Mar 12, 2021, at 3:24 PM, Mark Dilger > >>> wrote: > >>> an

Re: Tying an object's ownership to datdba

2021-03-15 Thread Noah Misch
A cfbot failure showed I had missed ORDER BY in some test queries. On Sun, Dec 27, 2020 at 08:31:48PM -0800, Noah Misch wrote: > I ended up blocking DDL that creates role memberships involving the new role; > see reasons in user.c comments. Lifting those restrictions looked feasible, &g

Re: pg_amcheck contrib application

2021-03-15 Thread Noah Misch
On Mon, Mar 15, 2021 at 02:57:20PM -0400, Tom Lane wrote: > Mark Dilger writes: > > On Mar 15, 2021, at 10:04 AM, Tom Lane wrote: > >> These animals have somewhat weird alignment properties: MAXALIGN is 8 > >> but ALIGNOF_DOUBLE is only 4. I speculate that that is affecting their > >> choices ab

Re: Multiple hosts in connection string failed to failover in non-hot standby mode

2020-10-28 Thread Noah Misch
On Tue, Oct 27, 2020 at 07:14:14AM +, Hubert Zhang wrote: > Libpq has supported to specify multiple hosts in connection string and enable > auto failover when the previous PostgreSQL instance cannot be accessed. > But when I tried to enable this feature for a non-hot standby, it cannot do > t

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2020-10-28 Thread Noah Misch
On Sat, Aug 29, 2020 at 10:34:33PM -0700, Noah Misch wrote: > On Mon, May 25, 2020 at 12:00:33AM -0700, Noah Misch wrote: > > On Mon, Apr 06, 2020 at 09:18:47PM -0700, Noah Misch wrote: > > > On Mon, Apr 06, 2020 at 02:46:09PM -0400, Tom Lane wrote: > > > > Noah M

Re: public schema default ACL

2020-10-31 Thread Noah Misch
On Thu, Aug 06, 2020 at 12:48:17PM +0200, Magnus Hagander wrote: > On Mon, Aug 3, 2020 at 5:26 PM Stephen Frost wrote: > > * Noah Misch (n...@leadboat.com) wrote: > > > Between (b)(2)(X) and (b)(3)(X), what are folks' preferences?  Does anyone > > > strongly favor

Re: public schema default ACL

2020-11-02 Thread Noah Misch
On Mon, Nov 02, 2020 at 12:42:26PM -0500, Tom Lane wrote: > Robert Haas writes: > > On Mon, Nov 2, 2020 at 5:51 AM Peter Eisentraut > > wrote: > >> I'm not convinced, however, that this would would really move the needle > >> in terms of the general security-uneasiness about the public schema and

Re: Rethinking LOCK TABLE's behavior on views

2020-11-07 Thread Noah Misch
On Sat, Nov 07, 2020 at 11:57:20AM -0500, Tom Lane wrote: > The problems discussed in bug #16703 [1] show that pg_dump needs a > version of LOCK TABLE that behaves differently for views than > what we have now. Since v11, LOCK TABLE on a view recurses to all > tables and views named in the view, a

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2020-11-08 Thread Noah Misch
On Wed, Oct 28, 2020 at 09:01:59PM -0700, Noah Misch wrote: > On Sat, Aug 29, 2020 at 10:34:33PM -0700, Noah Misch wrote: > > On Mon, May 25, 2020 at 12:00:33AM -0700, Noah Misch wrote: > > > [last non-rebase change] > > > > Rebased the second patch. The fir

Re: Temporary tables versus wraparound... again

2020-11-08 Thread Noah Misch
On Sun, Nov 08, 2020 at 06:19:57PM -0500, Greg Stark wrote: > However in the case of ON COMMIT DELETE ROWS we can do better. Why not > just reset the relfrozenxid and other stats as if the table was > freshly created when it's truncated? That concept is sound. > 1) Should we update relpages and r

Re: Rethinking LOCK TABLE's behavior on views

2020-11-10 Thread Noah Misch
On Mon, Nov 09, 2020 at 11:42:33AM -0300, Alvaro Herrera wrote: > On 2020-Nov-07, Noah Misch wrote: > > On Sat, Nov 07, 2020 at 11:57:20AM -0500, Tom Lane wrote: > > > A completely different approach we could consider is to weaken the > > > permissions requirements for

Re: public schema default ACL

2020-11-12 Thread Noah Misch
On Mon, Nov 09, 2020 at 02:56:53PM -0500, Bruce Momjian wrote: > On Mon, Nov 2, 2020 at 11:05:15PM -0800, Noah Misch wrote: > > My plan is for the default to become: > > > > GRANT USAGE ON SCHEMA public TO PUBLIC; > > ALTER SCHEMA public OWNER TO DATABASE_OWNER;

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-11-29 Thread Noah Misch
On Mon, Sep 07, 2020 at 12:00:41PM +0530, Amit Kapila wrote: > Thanks, I have pushed the last patch. Let's wait for a day or so to > see the buildfarm reports https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sungazer&dt=2020-09-08%2006%3A24%3A14 failed the new 015_stream.pl test with the su

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2021-01-12 Thread Noah Misch
On Mon, Jan 11, 2021 at 11:22:05AM +0500, Andrey Borodin wrote: > I'm marking patch as ready for committer. Thanks. > I can't tell should we backpatch insurance patch or not: it potentially fixes > unknown bugs, and potentially contains unknown bugs. I can't reason because > of such uncertainty

Re: Wrong usage of RelationNeedsWAL

2021-01-15 Thread Noah Misch
On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > The definition of the macro RelationNeedsWAL has been changed by > c6b92041d3 to include conditions related to the WAL-skip optimization > but some uses of the macro are not relevant to the optimization. That > misuses are harmles

Re: Pg14, pg_dumpall and "password_encryption=true"

2021-01-15 Thread Noah Misch
On Fri, Jan 15, 2021 at 01:35:50PM +0900, Ian Lawrence Barwick wrote: > $ tail -3 pg_upgrade_utility.log > ALTER ROLE "postgres" SET "password_encryption" TO 'true'; > psql:pg_upgrade_dump_globals.sql:75: ERROR: invalid value for > parameter "password_encryption": "true" > HINT: A

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-16 Thread Noah Misch
On Wed, Jan 13, 2021 at 10:28:26AM -0500, Tom Lane wrote: > So a non-rewriting conversion would only be possible if local time is > identical to UTC; which is true for few enough people that nobody has > bothered with attempting the optimization. PostgreSQL 12 and later do have that optimization.

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-16 Thread Noah Misch
On Sat, Jan 16, 2021 at 12:03:19PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Wed, Jan 13, 2021 at 10:28:26AM -0500, Tom Lane wrote: > >> So a non-rewriting conversion would only be possible if local time is > >> identical to UTC; which is true for few en

Re: Dump public schema ownership & seclabels

2021-01-17 Thread Noah Misch
On Sat, Jan 16, 2021 at 02:05:43PM +0100, Vik Fearing wrote: > On 12/30/20 12:59 PM, Noah Misch wrote: > > On Tue, Dec 29, 2020 at 05:49:24AM -0800, Noah Misch wrote: > >> https://postgr.es/m/20201031163518.gb4039...@rfd.leadboat.com gave > >> $SUBJECT as > >>

Re: Pg14, pg_dumpall and "password_encryption=true"

2021-01-17 Thread Noah Misch
On Sun, Jan 17, 2021 at 01:51:35PM +0100, Magnus Hagander wrote: > On Sat, Jan 16, 2021 at 8:27 AM Noah Misch wrote: > > On Fri, Jan 15, 2021 at 01:35:50PM +0900, Ian Lawrence Barwick wrote: > > > $ tail -3 pg_upgrade_utility.log > > > ALTER ROLE "postgr

Re: Wrong usage of RelationNeedsWAL

2021-01-17 Thread Noah Misch
On Mon, Jan 18, 2021 at 03:08:38PM +0900, Kyotaro Horiguchi wrote: > At Fri, 15 Jan 2021 20:38:16 -0800, Noah Misch wrote in > > On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > > > --- a/src/include/utils/snapmgr.h > > > +++ b/src/include/utils/sna

Re: Wrong usage of RelationNeedsWAL

2021-01-17 Thread Noah Misch
On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: > On Mon, Jan 18, 2021 at 03:08:38PM +0900, Kyotaro Horiguchi wrote: > > At Fri, 15 Jan 2021 20:38:16 -0800, Noah Misch wrote in > > > On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > > >

Re: Wrong usage of RelationNeedsWAL

2021-01-19 Thread Noah Misch
On Tue, Jan 19, 2021 at 01:48:31PM +0900, Kyotaro Horiguchi wrote: > At Mon, 18 Jan 2021 17:30:22 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Sun, 17 Jan 2021 23:02:18 -0800, Noah Misch wrote in > > > On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: >

Re: pg_upgrade fails with non-standard ACL

2021-01-20 Thread Noah Misch
On Thu, Jan 21, 2021 at 01:03:58AM +0300, Anastasia Lubennikova wrote: > On 03.01.2021 14:29, Noah Misch wrote: > >On Thu, Jun 11, 2020 at 07:58:43PM +0300, Anastasia Lubennikova wrote: > Thank you for the review. > New version of the patch is attached, though I haven't test

Re: Wrong usage of RelationNeedsWAL

2021-01-21 Thread Noah Misch
On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > At Wed, 20 Jan 2021 17:34:44 +0900 (JST), Kyotaro Horiguchi > wrote in > > Anyway, it seems actually dangerous that cause pruning on wal-skipped > > relation. > > > > > with your patch versions. Could you try implementing bot

Re: Wrong usage of RelationNeedsWAL

2021-01-21 Thread Noah Misch
On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > At Thu, 21 Jan 2021 00:19:58 -0800, Noah Misch wrote in > > On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > > > However, with the previous patch, two existing tests sto_usin

Re: Very misleading documentation for PQreset()

2021-01-21 Thread Noah Misch
On Thu, Jan 21, 2021 at 05:32:56PM -0500, Tom Lane wrote: > I happened to notice that PQreset is documented thus: > > This function will close the connection to the server and attempt to > reestablish a new connection to the same server, using all the same > parameters previously used.

Re: pg_upgrade fails with non-standard ACL

2021-01-24 Thread Noah Misch
On Thu, Jan 21, 2021 at 01:03:58AM +0300, Anastasia Lubennikova wrote: > On 03.01.2021 14:29, Noah Misch wrote: > >Overall, this patch predicts a subset of cases where pg_dump will emit a > >failing GRANT or REVOKE that targets a pg_catalog object. Can you write a > >code co

Re: PG vs LLVM 12 on seawasp, next round

2021-01-24 Thread Noah Misch
On Mon, Jan 18, 2021 at 09:29:53PM +0100, Fabien COELHO wrote: > >>>The "no such file" error seems more like a machine local issue to me. > >> > >>I'll look into it when I have time, which make take some time. Hopefully > >>over the holidays. > > > >This is still happening ... Any chance you can ha

Re: Add SQL function for SHA1

2021-01-25 Thread Noah Misch
On Mon, Jan 25, 2021 at 10:12:28PM +0900, Michael Paquier wrote: > SHA-1 is now an option available for cryptohashes, and like the > existing set of functions of SHA-2, I don't really see a reason why we > should not have a SQL function for SHA1. NIST deprecated SHA1 over ten years ago. It's too

Re: Wrong usage of RelationNeedsWAL

2021-01-27 Thread Noah Misch
On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote: > On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > > At Thu, 21 Jan 2021 00:19:58 -0800, Noah Misch wrote in > > > On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > > > &

Re: pg_upgrade fails with non-standard ACL

2021-01-27 Thread Noah Misch
On Mon, Jan 25, 2021 at 10:14:43PM +0300, Anastasia Lubennikova wrote: > On 24.01.2021 11:39, Noah Misch wrote: > >On Thu, Jan 21, 2021 at 01:03:58AM +0300, Anastasia Lubennikova wrote: > >>On 03.01.2021 14:29, Noah Misch wrote: > >>>Overall, this patch predicts a

Re: pg_upgrade fails with non-standard ACL

2021-01-27 Thread Noah Misch
On Wed, Jan 27, 2021 at 07:32:42PM +0300, Anastasia Lubennikova wrote: > On 27.01.2021 14:21, Noah Misch wrote: > >On Mon, Jan 25, 2021 at 10:14:43PM +0300, Anastasia Lubennikova wrote: > > > >>1) Could you please clarify, what do you mean by REVOKE failures? > >&

Re: Wrong usage of RelationNeedsWAL

2021-01-27 Thread Noah Misch
On Thu, Jan 28, 2021 at 12:06:27PM +0900, Kyotaro Horiguchi wrote: > At Wed, 27 Jan 2021 02:48:48 -0800, Noah Misch wrote in > > On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote: > > > On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > >

Re: Why does creating logical replication subscriptions require superuser?

2021-01-31 Thread Noah Misch
On Fri, Jan 22, 2021 at 02:08:02PM -0800, Paul Martinez wrote: > Some of the original justifications for requiring superuser to create > subscriptions include: > - Replication inherently adds significant network traffic and extra background > process, and we wouldn't want unprivileged users to be

Race between KeepFileRestoredFromArchive() and restartpoint

2021-02-02 Thread Noah Misch
XmQ%40mail.gmail.com Author: Noah Misch Commit: Noah Misch Not for commit; for demonstration only. Before applying this, apply https://postgr.es/m/CAPpHfdtSEOHX8dSk9Qp%2BZ%2B%2Bi4BGQoffKip6JDWngEA%2Bg7Z-XmQ%40mail.gmail.com diff --git a/src/backend/access/transam/x

Re: 2021-02-11 release announcement draft

2021-02-08 Thread Noah Misch
On Mon, Feb 08, 2021 at 05:40:41PM -0500, Jonathan S. Katz wrote: > This update also fixes over 80 bugs that were reported in the last several > months. Some of these issues only affect version 13, but may also apply to > other > supported versions. Did you want s/may/many/? > * Fix an issue wit

Re: Tightening up allowed custom GUC names

2021-02-09 Thread Noah Misch
On Tue, Feb 09, 2021 at 05:34:37PM -0500, Tom Lane wrote: > Now granting that the best answer is just to forbid these cases, > there are still a couple of decisions about how extensive the > prohibition ought to be: > > * We could forbid these characters only when you try to actually > put such a

Re: Dump public schema ownership & seclabels

2021-02-11 Thread Noah Misch
On Sun, Jan 17, 2021 at 12:00:06PM +0100, Vik Fearing wrote: > On 1/17/21 10:41 AM, Noah Misch wrote: > > On Sat, Jan 16, 2021 at 02:05:43PM +0100, Vik Fearing wrote: > >> On 12/30/20 12:59 PM, Noah Misch wrote: > >>> On Tue, Dec 29, 2020 at 05:49:24AM -0800,

Re: enable certain TAP tests for MSVC builds

2021-12-05 Thread Noah Misch
On Sun, Dec 05, 2021 at 11:57:31AM -0500, Andrew Dunstan wrote: > Certain TAP tests rely on settings that the Make files provide for them. > However vcregress.pl doesn't provide those settings. This patch remedies > that, and I propose to apply it shortly (when we have a fix for the SSL > tests tha

Re: enable certain TAP tests for MSVC builds

2021-12-05 Thread Noah Misch
On Sun, Dec 05, 2021 at 06:00:08PM -0500, Andrew Dunstan wrote: > On 12/5/21 14:47, Noah Misch wrote: > > On Sun, Dec 05, 2021 at 11:57:31AM -0500, Andrew Dunstan wrote: > >> Certain TAP tests rely on settings that the Make files provide for them. > >> However vcregre

Re: Do we need pre-allocate WAL files during end-of-recovery checkpoint?

2021-12-06 Thread Noah Misch
On Mon, Dec 06, 2021 at 06:21:40PM +0530, Bharath Rupireddy wrote: > The function PreallocXlogFiles doesn't get called during > end-of-recovery checkpoint in CreateCheckPoint, see [1]. The server > becomes operational after the end-of-recovery checkpoint and may need > WAL files. PreallocXlogFiles

Re: Probable memory leak with ECPG and AIX

2021-12-11 Thread Noah Misch
On Fri, Dec 10, 2021 at 03:40:50PM +0100, Guillaume Lelarge wrote: > After some time, the client > crashes with a segfault error. According to him, it consumed around 256MB. > What's weird is that it works great on Linux, but crashed on AIX. That almost certainly means he's using a 32-bit binary w

Re: Probable memory leak with ECPG and AIX

2021-12-31 Thread Noah Misch
On Wed, Dec 15, 2021 at 04:20:42PM +0100, Benoit Lobréau wrote: > * with LDR_CNTRL=MAXDATA=0x1000, we reach 256Mo but there is no > segfault, the program just continues running ; > * with LDR_CNTRL=MAXDATA=0x8000, we reach 2Go and there is no segfault > either, the program just continues ru

Re: Probable memory leak with ECPG and AIX

2022-01-01 Thread Noah Misch
On Sat, Jan 01, 2022 at 11:35:02AM -0500, Tom Lane wrote: > Noah Misch writes: > > I get the same results. The leak arises because AIX freelocale() doesn't > > free > > all memory allocated in newlocale(). The following program uses trivial > > memory on GNU

Re: null iv parameter passed to combo_init()

2022-01-08 Thread Noah Misch
On Fri, Jan 07, 2022 at 04:32:01PM -0800, Zhihong Yu wrote: > In contrib/pgcrypto/pgcrypto.c : > > err = px_combo_init(c, (uint8 *) VARDATA_ANY(key), klen, NULL, 0); > > Note: NULL is passed as iv. > > When combo_init() is called, > > if (ivlen > ivs) > memcpy(ivbuf, iv,

Re: null iv parameter passed to combo_init()

2022-01-08 Thread Noah Misch
On Sat, Jan 08, 2022 at 06:52:14PM -0800, Zhihong Yu wrote: > On Sat, Jan 8, 2022 at 5:52 PM Noah Misch wrote: > > On Fri, Jan 07, 2022 at 04:32:01PM -0800, Zhihong Yu wrote: > > I agree it's time to fix cases like this, given > > https://postgr.es/m/

Re: null iv parameter passed to combo_init()

2022-01-09 Thread Noah Misch
On Sun, Jan 09, 2022 at 04:37:32AM -0800, Zhihong Yu wrote: > On Sat, Jan 8, 2022 at 11:32 PM Tom Lane wrote: > > Noah Misch writes: > > > On further thought, I would write it this way: > > > > > - else > > > + else if (ivlen != 0

Re: null iv parameter passed to combo_init()

2022-01-12 Thread Noah Misch
On Mon, Jan 10, 2022 at 03:34:27PM -0800, Zhihong Yu wrote: > On Sun, Jan 9, 2022 at 6:45 PM Zhihong Yu wrote: > > gcc -Wall -Wmissing-prototypes -Wpointer-arith > > -Wdeclaration-after-statement -Werror=vla -Wendif-labels > > -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-typ

Re: null iv parameter passed to combo_init()

2022-01-13 Thread Noah Misch
On Sun, Jan 09, 2022 at 06:45:09PM -0800, Zhihong Yu wrote: > On Sun, Jan 9, 2022 at 1:27 PM Zhihong Yu wrote: > > After installing gcc-11, ./configure passed (with 0003-memcpy-null.patch). > > In the output of `make check-world`, I don't see `runtime error`. That's expected. With -fsanitize-und

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-15 Thread Noah Misch
On Fri, Nov 19, 2021 at 09:18:23PM -0800, Noah Misch wrote: > On Wed, Nov 17, 2021 at 11:05:06PM -0800, Noah Misch wrote: > > On Wed, Nov 17, 2021 at 05:47:10PM -0500, Tom Lane wrote: > > > Noah Misch writes: > > > > Each of the three failures happened on a

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-16 Thread Noah Misch
Cancel that kernel upgrade idea. I no longer expect it to help... On Sun, Jan 16, 2022 at 10:19:30PM +1300, Thomas Munro wrote: > On Sun, Jan 16, 2022 at 8:12 PM Noah Misch wrote: > > For specifics of the kernel bug, see the attached test program. In brief, > > the > &

Re: A test for replay of regression tests

2022-01-16 Thread Noah Misch
On Mon, Jan 17, 2022 at 05:25:19PM +1300, Thomas Munro wrote: > Here's how it failed on fairywren, in case someone knowledgeable of > MSYS path translation etc can spot the problem: > > psql::1: ERROR: directory > "/home/pgrunner/bf/root/HEAD/pgsql.build/src/test/modules/test_misc/tmp_check/t_002

Re: cleaning up a few CLOG-related things

2021-03-21 Thread Noah Misch
On Wed, Jan 27, 2021 at 12:35:30PM -0500, Robert Haas wrote: > On Mon, Jan 25, 2021 at 2:11 PM Heikki Linnakangas wrote: > > Having a separate FullTransactionIdToLatestPageNumber() function for > > this seems like overkill to me. > > I initially thought so too, but it turned out to be pretty usef

Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres

2021-03-24 Thread Noah Misch
On Thu, Mar 25, 2021 at 07:44:02AM +0900, Michael Paquier wrote: > On Wed, Mar 24, 2021 at 10:50:50AM -0400, Robert Haas wrote: > > On Wed, Mar 24, 2021 at 5:56 AM Christoph Berg wrote: > >> Maybe creating the tablespace directory from within the testsuite > >> would suffice? > >> > >> CREATE TABL

Re: Tying an object's ownership to datdba

2021-03-24 Thread Noah Misch
On Wed, Mar 24, 2021 at 11:57:37AM -0400, John Naylor wrote: > On Mon, Dec 28, 2020 at 12:32 AM Noah Misch wrote: > > [v2] > > Hi Noah, > > In the refactoring patch, there is a lingering comment reference to > roles_has_privs_of(). Aside from that, it looks good to me

Re: non-HOT update not looking at FSM for large tuple update

2021-03-27 Thread Noah Misch
t;try the last page" logic does so. An FSM-using test would contain a VACUUM.) I plan to commit the attached version; compared to v5, it updates comments and renames this variable. Thanks, nm Author: Noah Misch Commit: Noah Misch Accept slightly-filled pages for tuples lar

Re: public schema default ACL

2021-03-27 Thread Noah Misch
On Sat, Feb 13, 2021 at 04:56:29AM -0800, Noah Misch wrote: > I'm attaching the patch for $SUBJECT, which applies atop the four patches from > the two other threads below. For convenience of testing, I've included a > rollup patch, equivalent to applying all five pa

Re: non-HOT update not looking at FSM for large tuple update

2021-03-27 Thread Noah Misch
On Sat, Mar 27, 2021 at 11:26:47AM -0400, John Naylor wrote: > On Sat, Mar 27, 2021 at 3:00 AM Noah Misch wrote: > > Does anyone have a strong opinion on whether to back-patch?  I am weakly > > inclined not to back-patch, because today's behavior might happen to per

Re: policies with security definer option for allowing inline optimization

2021-04-04 Thread Noah Misch
On Fri, Apr 02, 2021 at 02:24:59PM -0700, Dan Lynch wrote: > Does anyone know details of, or where to find more information about the > implications of the optimizer on the quals/checks for the policies being > functions vs inline? Roughly, the PostgreSQL optimizer treats LANGUAGE SQL functions li

  1   2   3   4   5   6   7   8   9   10   >