Re: Ignoring BRIN for HOT udpates seems broken

2022-05-28 Thread Tomas Vondra
On 5/28/22 21:24, Matthias van de Meent wrote: > On Sat, 28 May 2022 at 16:51, Tomas Vondra > wrote: >> >> Hi, >> >> while working on some BRIN stuff, I realized (my) commit 5753d4ee320b >> ignoring BRIN indexes for HOT is likely broken. Consider this example: >> >>

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-28 Thread Andres Freund
Hi, On 2022-05-26 16:27:53 +0900, Kyotaro Horiguchi wrote: > It could be in SQL, but *I* prefer to use perl for this, since it > allows me to write a bit complex things (than simple string > comparison) simpler. I wonder if we shouldn't just expose a C function to do this, rather than having a se

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-28 Thread Andres Freund
Hi, On 2022-05-25 14:00:23 +0900, Michael Paquier wrote: > On Tue, May 24, 2022 at 09:28:49PM -0700, Andres Freund wrote: > > And done. Thanks Nathan! > > Shouldn't you also refresh pgstat_fetch_consistency in pgstat.c for > consistency? Yes. Now that the visible sheen of embarassment in my face

Re: pg_upgrade test writes to source directory

2022-05-28 Thread Tom Lane
Andres Freund writes: > I suspect there might be a bit more polish might be needed - that's why I > hadn't proposed the commit on its own yet. Yeah, I'd noticed the obsoleted comments too, but not bothered to complain since that was just WIP and not an officially proposed patch. I'll be happy to

Re: pg_upgrade test writes to source directory

2022-05-28 Thread Andres Freund
Hi, On 2022-05-27 09:05:43 +0900, Michael Paquier wrote: > On Thu, May 26, 2022 at 07:51:08PM -0400, Tom Lane wrote: > > I wouldn't object to doing that, and even back-patching. It looked > > like a pretty sane change, and we've learned before that skimping on > > back-branch test infrastructure

Re: Compare variables of composite type with slightly different column types

2022-05-28 Thread Andrey Lepikhov
On 26/5/2022 14:25, Andrey Lepikhov wrote: I guess, here the compatible_oper() routine can be used to find a appropriate operator, or something like that can be invented. I looked into the 2cd7084 and a4424c5, but don't found any rationale. In accordance to this idea I prepared a code. For a d

Re: Ignoring BRIN for HOT udpates seems broken

2022-05-28 Thread Matthias van de Meent
On Sat, 28 May 2022 at 16:51, Tomas Vondra wrote: > > Hi, > > while working on some BRIN stuff, I realized (my) commit 5753d4ee320b > ignoring BRIN indexes for HOT is likely broken. Consider this example: > > -- > CREATE TABLE t (

Re: [RFC] building postgres with meson

2022-05-28 Thread Andres Freund
Hi, On 2022-05-26 11:47:13 +0300, Aleksander Alekseev wrote: > Thanks for working on this! I'm very enthusiastic about this effort and I was > glad to see on PGCon Unconference that the majority of the community seems > to be as well. > > > The halfway decent list includes, I think: > > 1) cmake

Re: pg_upgrade test writes to source directory

2022-05-28 Thread Peter Eisentraut
On 28.05.22 10:56, Michael Paquier wrote: On Fri, May 27, 2022 at 02:45:57PM +0200, Peter Eisentraut wrote: I think you can just chdir to ${PostgreSQL::Test::Utils::tmp_check}. Hmm. I think that I prefer your initial suggestion with TESTOUTDIR. This sticks better in the long term, while makin

Re: CREATE COLLATION must be specified

2022-05-28 Thread Peter Eisentraut
On 28.05.22 20:16, Shay Rojansky wrote: CREATE COLLATION some_collation (LC_COLLATE = 'en-u-ks-primary',     LC_CTYPE = 'en-u-ks-primary',     PROVIDER = icu,     DETERMINISTIC = False ); This works on PG14, but on PG15 it errors with 'parameter "locale" must be specified'. I wanted to mak

CREATE COLLATION must be specified

2022-05-28 Thread Shay Rojansky
Hi all, Testing on the PG15 beta, I'm getting new failures when trying to create a collation: CREATE COLLATION some_collation (LC_COLLATE = 'en-u-ks-primary', LC_CTYPE = 'en-u-ks-primary', PROVIDER = icu, DETERMINISTIC = False ); This works on PG14, but on PG15 it errors with 'parame

Re: ICU_LOCALE set database default icu collation but not working as intended.

2022-05-28 Thread Daniel Verite
jian he wrote: > - dbicu3, ICU_LOCALE 'en-u-kr-latn-digit-kf-upper-kn-true' seems > 'kf-upper' not grouped strings beginning with character 'A' together? You seem to expect that the sort algorithm takes characters from left to right, and when it compares 'A' and 'a', it will sort the

Re: postgres and initdb not working inside docker

2022-05-28 Thread Feike Steenbergen
On Sat, May 28, 2022, 18:35 Roffild wrote: > But the volume mount has a limitation with chmod 755. I don't want to > write the database directly to the container. Using a $PGDATA subdirectory in a mounted Volume allows you to run with 0700 and also retain this limitation you mention. I don't bel

Re: postgres and initdb not working inside docker

2022-05-28 Thread David G. Johnston
On Sat, May 28, 2022 at 9:35 AM Roffild wrote: > Docker is now the DevOps standard. It's easier to build an image for > Docker and run the site with one command. > > But the volume mount has a limitation with chmod 755. I don't want to > write the database directly to the container. > > The conta

Re: postgres and initdb not working inside docker

2022-05-28 Thread Roffild
Docker is now the DevOps standard. It's easier to build an image for Docker and run the site with one command. But the volume mount has a limitation with chmod 755. I don't want to write the database directly to the container. The container is isolated from everything. Therefore, checking the

Re: postgres and initdb not working inside docker

2022-05-28 Thread Daniel Gustafsson
> On 28 May 2022, at 17:49, Tom Lane wrote: > > Daniel Gustafsson writes: >>> On 28 May 2022, at 14:59, Roffild wrote: >>> This patch fixes an issue inside Docker and will not affect other builds. > >> Looks like you generated the patch backwards, it's removing the lines you >> propose to add.

Re: postgres and initdb not working inside docker

2022-05-28 Thread Tom Lane
Daniel Gustafsson writes: >> On 28 May 2022, at 14:59, Roffild wrote: >> This patch fixes an issue inside Docker and will not affect other builds. > Looks like you generated the patch backwards, it's removing the lines you > propose to add. Lacks documentation, too. But it doesn't matter, beca

Re: postgres and initdb not working inside docker

2022-05-28 Thread Roffild
Fix Looks like you generated the patch backwards, it's removing the lines you propose to add.diff --git a/configure.ac b/configure.ac index d093fb88dd..3f0077696b 100644 --- a/configure.ac +++ b/configure.ac @@ -749,6 +749,14 @@ PGAC_ARG_BOOL(enable, cassert, no, [enable assertion checks (for d

CI and test improvements

2022-05-28 Thread Justin Pryzby
I'm "joining" a bunch of unresolved threads hoping to present them better since they're related and I'm maintaining them together anyway. https://www.postgresql.org/message-id/flat/20220219234148.GC9008%40telsasoft.com - set TESTDIR from perl rather than Makefile https://www.postgresql.org/messag

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

2022-05-28 Thread Tom Lane
Laurenz Albe writes: > I don't think this idea is fundamentally wrong, but I have two worries: > 1. It would be a good idea good to make sure that there is not both >"extension--%--2.0.sql" and "extension--1.0--2.0.sql" present. >Otherwise the behavior might be indeterministic. The exist

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-05-28 Thread Daniel Gustafsson
> On 27 May 2022, at 23:07, Thomas Munro wrote: > We should go full Marie Kondo on EOL'd OSes that are not in our CI or > build farm, IMHO. FWIW, +1 -- Daniel Gustafsson https://vmware.com/

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

2022-05-28 Thread Daniel Gustafsson
> On 28 May 2022, at 16:50, Laurenz Albe wrote: > I don't think this idea is fundamentally wrong, but I have two worries: > > 1. It would be a good idea good to make sure that there is not both > "extension--%--2.0.sql" and "extension--1.0--2.0.sql" present. > Otherwise the behavior might be ind

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-28 Thread Daniel Gustafsson
> On 28 May 2022, at 16:12, Ranier Vilela wrote: > Just because I don't have enough hardware to force GetSnapShotData() doesn't > mean optimizing it won't make a difference. Quoting Andres from upthread: "To improve something like GetSnapshotData() you first have to come up with a wor

Re: postgres and initdb not working inside docker

2022-05-28 Thread Daniel Gustafsson
> On 28 May 2022, at 14:59, Roffild wrote: > This patch fixes an issue inside Docker and will not affect other builds. Looks like you generated the patch backwards, it's removing the lines you propose to add. -- Daniel Gustafsson https://vmware.com/

Ignoring BRIN for HOT udpates seems broken

2022-05-28 Thread Tomas Vondra
Hi, while working on some BRIN stuff, I realized (my) commit 5753d4ee320b ignoring BRIN indexes for HOT is likely broken. Consider this example: -- CREATE TABLE t (a INT) WITH (fillfactor = 10); INSERT INTO t SELECT i FROM gen

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

2022-05-28 Thread Laurenz Albe
On Fri, 2022-05-27 at 17:37 -0400, Regina Obe wrote: > > At PostGIS we've been thinking of ways to have better support, from > > PostgreSQL proper, to our upgrade strategy, which has always consisted in a > > SINGLE upgrade file good for upgrading from any older version. > > > > The current lack o

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-28 Thread Ranier Vilela
Em sáb., 28 de mai. de 2022 às 09:00, Tomas Vondra < tomas.von...@enterprisedb.com> escreveu: > On 5/28/22 02:15, Ranier Vilela wrote: > > > > > > Em sex., 27 de mai. de 2022 às 18:08, Andres Freund > > escreveu: > > > > Hi, > > > > On 2022-05-27 03:30:46 +0200,

Re: docs: mention "pg_read_all_stats" in "track_activities" description

2022-05-28 Thread Nathan Bossart
On Sat, May 28, 2022 at 05:50:35PM +0900, Michael Paquier wrote: > On Wed, May 25, 2022 at 01:04:04PM +0900, Michael Paquier wrote: >> Good point. So this would give, to be exact: >> "This information is only visible to superusers, roles with privileges >> of the pg_read_all_stats role, and and th

Re: postgres and initdb not working inside docker

2022-05-28 Thread Roffild
Add --disable-check-permissions to ./configure After applying the patch, run "autoheader -f ; autoconf" This patch fixes an issue inside Docker and will not affect other builds.diff --git a/configure.ac b/configure.ac index 3f0077696b..d093fb88dd 100644 --- a/configure.ac +++ b/configure.ac @@ -

Re: Assert name/short_desc to prevent SHOW ALL segfault

2022-05-28 Thread Nathan Bossart
On Sat, May 28, 2022 at 12:26:34PM +0900, Michael Paquier wrote: > On Fri, May 27, 2022 at 10:43:17AM -0700, Nathan Bossart wrote: >> Makes sense. Here's a new patch set. 0001 is the part intended for >> back-patching, and 0002 is the rest (i.e., adding pg_attribute_nonnull()). >> I switched to u

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-28 Thread Tomas Vondra
On 5/28/22 02:36, Ranier Vilela wrote: > Em sex., 27 de mai. de 2022 às 18:22, Andres Freund > escreveu: > > Hi, > > On 2022-05-27 10:35:08 -0300, Ranier Vilela wrote: > > Em qui., 26 de mai. de 2022 às 22:30, Tomas Vondra < > > tomas.von...@enterprised

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-28 Thread Tomas Vondra
On 5/28/22 02:15, Ranier Vilela wrote: > > > Em sex., 27 de mai. de 2022 às 18:08, Andres Freund > escreveu: > > Hi, > > On 2022-05-27 03:30:46 +0200, Tomas Vondra wrote: > > On 5/27/22 02:11, Ranier Vilela wrote: > > > ./pgbench -M prepared -c $conns

Re: Ignore heap rewrites for materialized views in logical replication

2022-05-28 Thread Amit Kapila
On Sat, May 28, 2022 at 2:44 AM Euler Taveira wrote: > > While investigating an internal report, I concluded that it is a bug. The > reproducible test case is simple (check 0002) and it consists of a FOR ALL > TABLES publication and a non-empty materialized view on publisher. After the > setup, if

Re: Prevent writes on large objects in read-only transactions

2022-05-28 Thread Michael Paquier
On Fri, May 27, 2022 at 03:30:28PM +0900, Yugo NAGATA wrote: > Currently, lo_creat(e), lo_import, lo_unlink, lowrite, lo_put, > and lo_from_bytea are allowed even in read-only transactions. > By using them, pg_largeobject and pg_largeobject_metatable can > be modified in read-only transactions and

Re: pg_upgrade test writes to source directory

2022-05-28 Thread Michael Paquier
On Fri, May 27, 2022 at 02:45:57PM +0200, Peter Eisentraut wrote: > I think you can just chdir to ${PostgreSQL::Test::Utils::tmp_check}. Hmm. I think that I prefer your initial suggestion with TESTOUTDIR. This sticks better in the long term, while making things consistent with 010_tab_completion.

Re: docs: mention "pg_read_all_stats" in "track_activities" description

2022-05-28 Thread Michael Paquier
On Wed, May 25, 2022 at 01:04:04PM +0900, Michael Paquier wrote: > Good point. So this would give, to be exact: > "This information is only visible to superusers, roles with privileges > of the pg_read_all_stats role, and and the user owning the sessionS > being reported on (including sessions bel