Re: PGDOCS - Logical replication GUCs - added some xrefs

2022-11-23 Thread Peter Smith
On Wed, Nov 23, 2022 at 9:16 AM Peter Smith wrote: > > On Wed, Nov 16, 2022 at 10:24 PM vignesh C wrote: > > > ... > > > One suggestion: > > The format of subscribers includes the data type and default values, > > the format of publishers does not include data type and default > > values. We can

Re: predefined role(s) for VACUUM and ANALYZE

2022-11-23 Thread Nathan Bossart
On Wed, Nov 23, 2022 at 02:56:28PM -0500, Andrew Dunstan wrote: > I have committed the first couple of these to get them out of the way. Thanks! > But I think we need a bit of cleanup in the next patch. > vacuum_is_relation_owner() looks like it's now rather misnamed. Maybe > vacuum_is_permitted_

Re: drop postmaster symlink

2022-11-23 Thread Daniel Gustafsson
> On 23 Nov 2022, at 21:10, Robert Haas wrote: > I don't actually care very much whether we get rid of the postmaster > symlink or not, but if we aren't going to, we should stop calling it > deprecated. If 15 years isn't enough time to remove it, what ever will > be? +1. If we actively add supp

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

2022-11-23 Thread Nathan Bossart
On Sun, Nov 06, 2022 at 02:38:42PM -0800, Nathan Bossart wrote: > rebased another rebase for cfbot -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From b2c36a6d0d8ca5cde374b1c8b34aafaabbd7f6c2 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 5 Jan 2022 19:24:22 + Subj

cleanup in open_auth_file

2022-11-23 Thread Ted Yu
Hi, I was looking at the following commit: commit efc981627a723d91e86865fb363d793282e473d1 Author: Michael Paquier Date: Thu Nov 24 08:21:55 2022 +0900 Rework memory contexts in charge of HBA/ident tokenization I think when the file cannot be opened, the context should be deleted. Please

Re: odd buildfarm failure - "pg_ctl: control file appears to be corrupt"

2022-11-23 Thread Thomas Munro
On Thu, Nov 24, 2022 at 11:05 AM Tom Lane wrote: > Thomas Munro writes: > > On Wed, Nov 23, 2022 at 11:03 PM Thomas Munro > > wrote: > > As for what to do about it, some ideas: > > 2. Retry after a short time on checksum failure. The probability is > > already miniscule, and becomes pretty cl

Re: cleanup in open_auth_file

2022-11-23 Thread Ted Yu
On Wed, Nov 23, 2022 at 4:54 PM Ted Yu wrote: > Hi, > I was looking at the following commit: > > commit efc981627a723d91e86865fb363d793282e473d1 > Author: Michael Paquier > Date: Thu Nov 24 08:21:55 2022 +0900 > > Rework memory contexts in charge of HBA/ident tokenization > > I think when

Re: ssl tests aren't concurrency safe due to get_free_port()

2022-11-23 Thread Andrew Dunstan
On 2022-11-22 Tu 20:36, Tom Lane wrote: > Andres Freund writes: >> While looking into a weird buildfarm failure ([1]), I noticed this: >> # Checking port 62707 >> Use of uninitialized value $pid in scalar chomp at >> /mnt/resource/bf/build/grassquit/REL_11_STABLE/pgsql.build/../pgsql/src/test/p

Re: cleanup in open_auth_file

2022-11-23 Thread Michael Paquier
On Wed, Nov 23, 2022 at 05:09:22PM -0800, Ted Yu wrote: > Thinking more on this. > The context should be created when the file is successfully opened. Indeed. Both operations ought to be done in the reverse order, or we would run into leaks in the postmaster on reload if pg_ident.conf has been re

Re: More efficient build farm animal wakeup?

2022-11-23 Thread Andrew Dunstan
On 2022-11-23 We 16:59, Tom Lane wrote: > Thomas Munro writes: >> On Thu, Nov 24, 2022 at 10:00 AM Magnus Hagander wrote: >>> On Wed, Nov 23, 2022 at 9:15 AM Thomas Munro wrote: >>> Are you saying you still think it's worth pursuing longpoll or similar >>> methods for it, or that this is good

Re: odd buildfarm failure - "pg_ctl: control file appears to be corrupt"

2022-11-23 Thread Thomas Munro
On Thu, Nov 24, 2022 at 2:02 PM Thomas Munro wrote: > ... and you'll soon see: > > ERROR: calculated CRC checksum does not match value stored in file I forgot to mention: this reproducer only seems to work if fsync = off. I don't know why, but I recall that was true also for bug #17064.

Re: Collation version tracking for macOS

2022-11-23 Thread Jeff Davis
On Wed, 2022-11-23 at 18:08 +1300, Thomas Munro wrote: > (1) the default behaviour on failure to search would > likely be to use the linked library instead and WARN about > [dat]collversion mismatch, so far the same, and  Agreed. > (2) the set of people > who would really be prepared to compile

Re: Collation version tracking for macOS

2022-11-23 Thread Thomas Munro
On Thu, Nov 24, 2022 at 3:07 PM Jeff Davis wrote: > I'm sure this has been discussed, but which distros even support > multiple major versions of ICU? For Debian and friends, you can install any number of libicuNN packages (if you can find them eg from previous release repos), but there's only on

Re: Bug in row_number() optimization

2022-11-23 Thread Richard Guo
On Tue, Nov 22, 2022 at 3:44 PM Richard Guo wrote: > On Wed, Nov 16, 2022 at 7:38 AM Sergey Shinderuk < > s.shinde...@postgrespro.ru> wrote: > >> The failing query is: >> SELECT * FROM >>(SELECT *, >>count(salary) OVER (PARTITION BY depname || '') c1, -- w1 >>row_numbe

Re: [PoC] Federated Authn/z with OAUTHBEARER

2022-11-23 Thread Andrey Chudnovsky
> How does this differ from the previous proposal? The OAUTHBEARER SASL > mechanism already relies on OIDC for discovery. (I think that decision > is confusing from an architectural and naming standpoint, but I don't > think they really had an alternative...) Mostly terminology questions here. OAUT

Re: Add 64-bit XIDs into PostgreSQL 15

2022-11-23 Thread Chris Travers
On Tue, Nov 22, 2022 at 10:01 AM Aleksander Alekseev < aleksan...@timescale.com> wrote: > Hi Chris, > > > Right now the way things work is: > > 1. Database starts throwing warnings that xid wraparound is approaching > > 2. Database-owning team initiates an emergency response, may take > downtime

Re: Hash index build performance tweak from sorting

2022-11-23 Thread David Rowley
On Thu, 24 Nov 2022 at 02:27, Simon Riggs wrote: > > On Wed, 23 Nov 2022 at 13:04, David Rowley wrote: > > I'd rather see this solved like v4 is doing it. > > Please do. No further comments. Thanks for your help Thanks. I pushed the v4 patch with some minor comment adjustments and also renamed

Re: Collation version tracking for macOS

2022-11-23 Thread Thomas Munro
On Thu, Nov 24, 2022 at 3:07 PM Jeff Davis wrote: > I'd vote for 1 on the grounds that it's easier to document and > understand a single collation version, which comes straight from > ucol_getVersion(). This approach makes it a separate problem to find > the collation version among whatever librar

Re: Allow file inclusion in pg_hba and pg_ident files

2022-11-23 Thread Michael Paquier
On Wed, Nov 23, 2022 at 03:56:50PM +0800, Julien Rouhaud wrote: > The depth 0 is getting used quite a lot now, maybe we should have a define for > it to make it easier to grep, like TOP_LEVEL_AUTH_FILE or something like that? > And also add a define for the magical 10 for the max inclusion depth, f

Allow processes to reset procArrayGroupNext themselves instead of leader resetting for all the followers

2022-11-23 Thread Bharath Rupireddy
Hi, While working on something else, I noticed that the proc array group XID clearing leader resets procArrayGroupNext of all the followers atomically along with procArrayGroupMember. ISTM that it's enough for the followers to exit the wait loop and continue if the leader resets just procArrayGrou

RE: failures in t/031_recovery_conflict.pl on CI

2022-11-23 Thread Факеев Алексей
Hello. Even after applying the patch, we are still facing an "ack Broken pipe" problem. It occurs on the arm64 platform, presumably under high load. Here is a log snippet from buildfarm: ... [19:08:12.150](0.394s) ok 13 - startup deadlock: cursor holding conflicting pin, also waiting for lock, e

RE: wake up logical workers after ALTER SUBSCRIPTION

2022-11-23 Thread Hayato Kuroda (Fujitsu)
Dear Nathan, Thank you for updating the patch! > In v3, I moved the call to LogicalRepWorkersWakeupAtCommit() to the end of > the function. This should avoid waking up workers in some cases where it's > unnecessary (e.g., if ALTER SUBSCRIPTION ERRORs in a subtransaction), but > there are still c

Re: Patch: Global Unique Index

2022-11-23 Thread Pavel Stehule
st 23. 11. 2022 v 23:42 odesílatel Thomas Kellerer napsal: > Tom Lane schrieb am 18.11.2022 um 16:06: > >> Do we need new syntax actually? I think that a global unique index > >> can be created automatically instead of raising an error "unique > >> constraint on partitioned table must include all

Re: Allow file inclusion in pg_hba and pg_ident files

2022-11-23 Thread Julien Rouhaud
On Thu, Nov 24, 2022 at 02:07:21PM +0900, Michael Paquier wrote: > On Wed, Nov 23, 2022 at 03:56:50PM +0800, Julien Rouhaud wrote: > > The depth 0 is getting used quite a lot now, maybe we should have a define > > for > > it to make it easier to grep, like TOP_LEVEL_AUTH_FILE or something like >

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

2022-11-23 Thread Michael Paquier
On Tue, Nov 22, 2022 at 08:46:22AM +0530, Bharath Rupireddy wrote: > Are you looking at the latest v3 patch > https://www.postgresql.org/message-id/4b5691462b994c18ff370aaa84cef0d0%40oss.nttdata.com? > It has no printf() calls. Yes, I was looking at v1. v3 can be simpler. All this information in

Re: fixing CREATEROLE

2022-11-23 Thread walther
Robert Haas: I have to admit that when I realized that was the natural place to put them to make the patch work, my first reaction internally was "well, that can't possibly be right, role properties suck!". But I didn't and still don't see where else to put them that makes any sense at all, so I

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

2022-11-23 Thread Peter Eisentraut
On 19.11.22 20:36, Марина Полякова wrote: Here is another set of proposed patches: v2-0001-Fix-encoding-check-in-initdb-when-the-option-icu-.patch Target: PG 15+ Fix encoding check in initdb when the option --icu-locale is not used: I'm having a hard time figuring out from your examples what y

<    1   2