Re: Higher level questions around shared memory stats

2022-03-31 Thread Kyotaro Horiguchi
At Wed, 30 Mar 2022 17:09:44 -0700, Andres Freund wrote in > Hi, > > On 2022-03-30 16:35:50 -0700, Andres Freund wrote: > > On 2022-03-29 12:17:27 -0700, Andres Freund wrote: > > > Separate from the minutia in [1] I'd like to discuss a few questions of > > > more > > > general interest. I'll po

Re: basebackup/lz4 crash

2022-03-31 Thread Dipesh Pandit
Hi, > I think your proposed change is OK, modulo some comments. But I think > maybe we ought to delete all the stuff related to compressed_bound > from bbstreamer_lz4_compressor_new() as well, because I don't see that > there's any point. And then I think we should also add logic similar > to what

Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

2022-03-31 Thread Michael Paquier
On Mon, Mar 28, 2022 at 05:09:10PM +0200, Matthias van de Meent wrote: > Not all clusters have checksums enabled (boo!, but we can't > realistically fix that), so on-disk corruption could reasonably > propagate to the rest of such system. Additionally, checksums are only > checked on read, and upda

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Peter Eisentraut
On 31.03.22 07:25, Andres Freund wrote: Looking at 8f3ec75de40 it seems we just assume unix sockets are available, we don't have a version / feature test (win32.h just defines HAVE_STRUCT_SOCKADDR_UN). I think you have to handle that dynamically at run time, a bit like IPv6: The build environm

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Dilip Kumar
On Thu, Mar 31, 2022 at 9:46 AM Dilip Kumar wrote: > > On Thu, Mar 31, 2022 at 5:07 AM Andres Freund wrote: > > > > Hi, > > > > On 2022-03-29 11:55:05 -0400, Robert Haas wrote: > > > I committed v6 instead. > > > > I was just discussing the WAL prefetching patch with Thomas. A question in > > tha

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Michael Paquier
On Wed, Mar 30, 2022 at 10:36:16PM -0700, Andres Freund wrote: > On 2022-03-31 01:00:14 -0400, Tom Lane wrote: > > How well does this patch work with pre-14 buildfarm clients? > > Looks to me like it'll just run the test twice, once via TestUpgrade, once via > taptest. It's possible that there cou

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2022-03-31 Thread Pavel Stehule
Hi st 30. 3. 2022 v 21:09 odesílatel Tom Lane napsal: > Greg Stark writes: > > It looks like this is -- like a lot of plpgsql patches -- having > > difficulty catching the attention of reviewers and committers. > > I was hoping that someone with more familiarity with pldebugger > would comment

Re: ORDER BY pushdowns seem broken in postgres_fdw

2022-03-31 Thread Ronan Dunklau
Le jeudi 31 mars 2022, 01:41:37 CEST Tom Lane a écrit : > I looked through this patch. It's going in the right direction, > but I have a couple of nitpicks: Thank you Tom for taking a look at this. > I think that instead of doubling down on a wrong API, we should just > take that out and move th

Re: Database-level collation version tracking

2022-03-31 Thread Alvaro Herrera
On 2022-Feb-14, Peter Eisentraut wrote: > On 11.02.22 13:51, Julien Rouhaud wrote: > > > > I'm wondering why you changed this function to return an ObjectAddress > > > > rather > > > > than an Oid? There's no event trigger support for ALTER DATABASE, and > > > > the rest > > > > of similar util

Re: Handle infinite recursion in logical replication setup

2022-03-31 Thread Amit Kapila
On Thu, Mar 31, 2022 at 9:14 AM Amit Kapila wrote: > > On Wed, Mar 30, 2022 at 7:40 PM Ashutosh Bapat > wrote: > > > > > > The changes for the same are available int the v5 patch available at [1]. > > > [1] - > > > https://www.postgresql.org/message-id/CALDaNm3wCf0YcvVo%2BgHMGpupk9K6WKJxCyLUvhPC

Re: In-placre persistance change of a relation

2022-03-31 Thread Kyotaro Horiguchi
At Thu, 31 Mar 2022 00:37:07 -0500, Justin Pryzby wrote in > On Thu, Mar 31, 2022 at 01:58:45PM +0900, Kyotaro Horiguchi wrote: > > Thanks! Version 20 is attached. > > The patch failed an all CI tasks, and seems to have caused the macos task to > hang. > > http://cfbot.cputube.org/kyotaro-hori

Re: In-placre persistance change of a relation

2022-03-31 Thread Kyotaro Horiguchi
At Thu, 31 Mar 2022 18:33:18 +0900 (JST), Kyotaro Horiguchi wrote in > I don't think this can be commited to 15. So I post the fixed version > then move this to the next CF. Then done. Thanks! regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Identify missing publications from publisher while create/alter subscription.

2022-03-31 Thread Amit Kapila
On Wed, Mar 30, 2022 at 9:54 PM vignesh C wrote: > > On Wed, Mar 30, 2022 at 5:42 PM Bharath Rupireddy > wrote: > > Your suggestion looks valid, I have modified it as suggested. > Additionally I have removed Create subscription with multiple > non-existent publications and changed add publication

Re: WIP: WAL prefetch (another approach)

2022-03-31 Thread Thomas Munro
On Mon, Mar 21, 2022 at 9:29 PM Julien Rouhaud wrote: > So I finally finished looking at this patch. Here again, AFAICS the feature > is > working as expected and I didn't find any problem. I just have some minor > comments, like for the previous patch. Thanks very much for the review. I've a

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

2022-03-31 Thread John Naylor
On Wed, Mar 16, 2022 at 4:48 AM Peter Geoghegan wrote: > > On Wed, Feb 16, 2022 at 12:43 AM John Naylor > wrote: > > I'll put some effort in finding any way that it might not be robust. > > After that, changing the message and docs is trivial. > > It would be great to be able to totally drop the

Re: generic plans and "initial" pruning

2022-03-31 Thread Alvaro Herrera
I'm looking at 0001 here with intention to commit later. I see that there is some resistance to 0004, but I think a final verdict on that one doesn't materially affect 0001. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "El destino baraja y nosotros jugamos" (A

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-03-31 Thread Andrei Zubkov
Hi Julien! Thank you for such detailed review! On Wed, 2022-03-30 at 17:31 +0800, Julien Rouhaud wrote: > Feature wise, I'm happy with the patch.  I just have a few comments. > > Tests: > > - it's missing some test in sql/oldextversions.sql to validate that the > code >   works with the extensi

Re: A qsort template

2022-03-31 Thread John Naylor
In a couple days I'm going to commit the v3 patch "accelerate tuple sorting for common types" as-is after giving it one more look, barring objections. I started towards incorporating the change in insertion sort threshold (part of 0010), but that caused regression test failures, so that will have

Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

2022-03-31 Thread Matthias van de Meent
On Thu, 31 Mar 2022 at 09:32, Michael Paquier wrote: > > On Mon, Mar 28, 2022 at 05:09:10PM +0200, Matthias van de Meent wrote: > > Not all clusters have checksums enabled (boo!, but we can't > > realistically fix that), so on-disk corruption could reasonably > > propagate to the rest of such syst

Re: document the need to analyze partitioned tables

2022-03-31 Thread Daniel Gustafsson
> On 28 Mar 2022, at 15:05, Tomas Vondra wrote: > I've pushed the last version, and backpatched it to 10 (not sure I'd > call it a bugfix, but I certainly agree with Justin it's worth > mentioning in the docs, even on older branches). I happened to spot a small typo in this commit in the ANALYZE

Re: CLUSTER on partitioned index

2022-03-31 Thread Alvaro Herrera
I realized after posting that we used to allow clustering toast tables, but after my changes we no longer do. (Justin's version had a RELKIND_HAS_STORAGE test here instead, which seemed a little too lax.) I don't know why we allowed it and I don't know of anyone who has ever used that feature and

Re: Commitfest Update

2022-03-31 Thread Alvaro Herrera
On 2022-Mar-31, Julien Rouhaud wrote: > On Wed, Mar 30, 2022 at 02:41:26PM -0400, Greg Stark wrote: > > > > Patches that are Waiting on Author and haven't had activity in months > > -- traditionally they were set to Returned with Feedback. It seems the > > feeling these days is to not lose state o

Re: Commitfest Update

2022-03-31 Thread Matthias van de Meent
On Thu, 31 Mar 2022 at 12:56, Alvaro Herrera wrote: > > On 2022-Mar-31, Julien Rouhaud wrote: > > > On Wed, Mar 30, 2022 at 02:41:26PM -0400, Greg Stark wrote: > > > > > > Patches that are Waiting on Author and haven't had activity in months > > > -- traditionally they were set to Returned with Fe

Re: generic plans and "initial" pruning

2022-03-31 Thread Amit Langote
On Thu, Mar 31, 2022 at 6:55 PM Alvaro Herrera wrote: > I'm looking at 0001 here with intention to commit later. I see that > there is some resistance to 0004, but I think a final verdict on that > one doesn't materially affect 0001. Thanks. While the main goal of the refactoring patch is to ma

Re: multithreaded zstd backup compression for client and server

2022-03-31 Thread Andrew Dunstan
On 3/30/22 08:00, Dagfinn Ilmari Mannsåker wrote: > Robert Haas writes: > >> This patch contains a trivial adjustment to >> PostgreSQL::Test::Cluster::run_log to make it return a useful value >> instead of not. I think that should be pulled out and committed >> independently regardless of what h

Re: Logical replication timeout problem

2022-03-31 Thread Masahiko Sawada
On Wed, Mar 30, 2022 at 6:00 PM Amit Kapila wrote: > > On Wed, Mar 30, 2022 at 1:24 PM wangw.f...@fujitsu.com > wrote: > > > > On Tues, Mar 29, 2022 at 9:45 AM I wrote: > > > Attach the new patch. > > > > Rebase the patch because the commit d5a9d86d in current HEAD. > > > > Thanks, this looks goo

Re: CLUSTER on partitioned index

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 6:54 AM Alvaro Herrera wrote: > I realized after posting that we used to allow clustering toast tables, > but after my changes we no longer do. (Justin's version had a > RELKIND_HAS_STORAGE test here instead, which seemed a little too lax.) I > don't know why we allowed it

Re: Commitfest Update

2022-03-31 Thread Alvaro Herrera
On 2022-Mar-31, Matthias van de Meent wrote: > I know that this has happened earlier; where someone re-opened their > old RwF-patches in closed commitfests; after which those patches got > lost in the traffic because they are not open in the current (or > upcoming) commitfests. Hmm, it's quite po

Re: Logical insert/update/delete WAL records for custom table AMs

2022-03-31 Thread Robert Haas
On Wed, Mar 30, 2022 at 2:31 PM Jeff Davis wrote: > Attached a new version. The scope expanded, so this is likely to slip > v15 at this late time. For 15, I'll focus on my extensible rmgr work, > which can serve similar purposes. > > The main purpose of this patch is to be able to emit logical eve

[PATCH] Avoid dereference null relation pointer (src/backend/replication/logical/reorderbuffer.c)

2022-03-31 Thread Ranier Vilela
Hi hackers, Minor oversight with commit 0da92dc . RelationIdGetRelation can return NULL, then it is necessary to check the return. regards, Ranier Vilela 0001-avoid-dereference-null-relation.patch Description

Re: [PATCH] pg_stat_toast v9

2022-03-31 Thread Gunnar "Nick" Bluth
Am 22.03.22 um 12:23 schrieb Gunnar "Nick" Bluth: > Am 22.03.22 um 02:17 schrieb Andres Freund: >> Hi, >> >> On 2022-03-08 19:32:03 +0100, Gunnar "Nick" Bluth wrote: >>> v8 (applies cleanly to today's HEAD/master) attached. >> >> This doesn't apply anymore, likely due to my recent pgstat changes -

Re: [PATCH] pg_stat_toast v10

2022-03-31 Thread Gunnar "Nick" Bluth
Am 31.03.22 um 15:14 schrieb Gunnar "Nick" Bluth: > Am 22.03.22 um 12:23 schrieb Gunnar "Nick" Bluth: >> Am 22.03.22 um 02:17 schrieb Andres Freund: >>> Hi, >>> >>> On 2022-03-08 19:32:03 +0100, Gunnar "Nick" Bluth wrote: v8 (applies cleanly to today's HEAD/master) attached. >>> >>> This doesn

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread James Coleman
On Wed, Mar 30, 2022 at 5:41 PM Robert Haas wrote: > > On Wed, Mar 30, 2022 at 4:33 PM James Coleman wrote: > > Hmm, having it match the way it works makes sense. Would you feel > > comfortable with an intermediate step (queueing up that as a larger > > change) changing the clause to something li

Re: Commitfest Update

2022-03-31 Thread Pavel Borisov
чт, 31 мар. 2022 г. в 15:09, Matthias van de Meent < boekewurm+postg...@gmail.com>: > On Thu, 31 Mar 2022 at 12:56, Alvaro Herrera > wrote: > > > > On 2022-Mar-31, Julien Rouhaud wrote: > > > > > On Wed, Mar 30, 2022 at 02:41:26PM -0400, Greg Stark wrote: > > > > > > > > Patches that are Waiting

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 9:17 AM James Coleman wrote: > All right, thanks for feedback. Attached is v2 with such a change. > I've not included examples, and I'm about 50/50 on doing so. What are > your thoughts on adding in parens "e.g., changing from varchar to text > avoids rebuilding indexes whi

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Tom Lane
Michael Paquier writes: > On Wed, Mar 30, 2022 at 10:36:16PM -0700, Andres Freund wrote: >> On 2022-03-31 01:00:14 -0400, Tom Lane wrote: >>> How well does this patch work with pre-14 buildfarm clients? >> Looks to me like it'll just run the test twice, once via TestUpgrade, once >> via >> tapte

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 3:52 AM Dilip Kumar wrote: > 0001 is changing the strategy to file copy during initdb and 0002 > patch adds the test cases for both these cases. IMHO, 0001 looks fine, except for needing some adjustments to the wording. I'm less sure about 0002. It's testing the stuff And

Re: CLUSTER on partitioned index

2022-03-31 Thread Justin Pryzby
On Wed, Mar 30, 2022 at 10:51:43PM +0200, Alvaro Herrera wrote: > On 2022-Feb-23, Justin Pryzby wrote: > > > I hope that Alvaro will comment on the simplified patches. If multiple > > people > > think the patch isn't worth it, feel free to close it. But I don't see how > > complexity could be t

Re: CLUSTER on partitioned index

2022-03-31 Thread Justin Pryzby
On Thu, Mar 31, 2022 at 12:54:36PM +0200, Alvaro Herrera wrote: > I realized after posting that we used to allow clustering toast tables, > but after my changes we no longer do. (Justin's version had a > RELKIND_HAS_STORAGE test here instead, which seemed a little too lax.) I > don't know why we a

Re: Commitfest Update

2022-03-31 Thread Tom Lane
Pavel Borisov writes: > In my experience, re-applying an updated patch to a new CF is very easy. > You can re-attach the existing discussion thread. The only information that > can be lost is CF-specific fields like reviewer/author which is worth > re-adding manually. Yeah. In fact, it might be

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread James Coleman
On Thu, Mar 31, 2022 at 9:43 AM Robert Haas wrote: > > On Thu, Mar 31, 2022 at 9:17 AM James Coleman wrote: > > All right, thanks for feedback. Attached is v2 with such a change. > > I've not included examples, and I'm about 50/50 on doing so. What are > > your thoughts on adding in parens "e.g.,

Re: unlogged sequences

2022-03-31 Thread Tomas Vondra
Hi, Here's a slightly improved patch, adding a couple checks and tests for owned sequences to ensure both objects have the same persistence. In particular: * When linking a sequence to a table (ALTER SEQUENCE ... OWNED BY), there's an ereport(ERROR) if the relpersistence values do not match. * D

head fails to build on SLES 12

2022-03-31 Thread Devrim Gündüz
Hi, Latest snapshot tarball fails to build on SLES 12.5, which uses GCC 4.8-8. Build log is attached. Please let me know if you want me to provide more info. Thanks! Regards, -- Devrim Gündüz Open Source Solution Architect, PostgreSQL guy Twitter: @DevrimGunduz , @DevrimGunduzTR /usr/bin/clan

Re: head fails to build on SLES 12

2022-03-31 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= writes: > Latest snapshot tarball fails to build on SLES 12.5, which uses GCC > 4.8-8. Build log is attached. Hmm, what version of libzstd is present? regards, tom lane

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 10:14 AM James Coleman wrote: > Is the attached more along the lines of what you were thinking? Yeah. Maybe this would be a little clearer: "For example, if the collation for a column has been changed, an index rebuild is always required, because the new sort order might b

Unit tests for SLRU

2022-03-31 Thread Aleksander Alekseev
Hi hackers, I learned from Peter [1] that SLRU test coverage leaves much to be desired and makes it difficult to refactor it. Here is a draft of a patch that tries to address it. I used src/test/modules/test_* modules as an example. While on it, I moved the Asserts() outside of SimpleLruInit(). I

Re: Commitfest Update

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 10:11 AM Tom Lane wrote: > This reminds me of a point I've been meaning to bring up: it seems to > often happen that someone adds their name as reviewer, but then loses > interest and doesn't do anything more with the patch. I think that's > problematic because people see

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-03-31 Thread Peter Eisentraut
On 30.03.22 18:17, Jacob Champion wrote: Also, if someone ever wants to change how those backend data types work, we then have to check a bunch of other code as well. I think we should be using inet_ntop()/inet_pton() directly here. We can throw substitute implementations into libpgport if nece

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2022-03-31 Thread Aleksander Alekseev
Hi Peter, > That isn't really what I meant. When I said > > > At this point, I'm more concerned that code review is still finding > > bugs, and that we have no test coverage for any of this > > this meant especially the SLRU refactoring patch. Got it, and sorry for the confusion. I decided to

Re: Commitfest Update

2022-03-31 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 31, 2022 at 10:11 AM Tom Lane wrote: >> ... Would it be feasible or reasonable >> to drop reviewers if they've not commented in the thread in X amount >> of time? > In theory, this might cause someone who made a valuable contribution > to the discussion to not g

Re: head fails to build on SLES 12

2022-03-31 Thread Devrim Gündüz
Hi, On Thu, 2022-03-31 at 10:26 -0400, Tom Lane wrote: > Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= writes: > > Latest snapshot tarball fails to build on SLES 12.5, which uses GCC > > 4.8-8. Build log is attached. > > Hmm, what version of libzstd is present? 1.3.3 Regards, -- Devrim Gündüz Open Sourc

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread James Coleman
On Thu, Mar 31, 2022 at 10:29 AM Robert Haas wrote: > > On Thu, Mar 31, 2022 at 10:14 AM James Coleman wrote: > > Is the attached more along the lines of what you were thinking? > > Yeah. Maybe this would be a little clearer: "For example, if the > collation for a column has been changed, an inde

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andrew Dunstan
On 3/30/22 22:07, Tom Lane wrote: > So ... none of the Windows buildfarm members actually like this > test script. They're all showing failures along the lines of > > not ok 2 - fails if basebackup_to_shell.command is not set: matches > > # Failed test 'fails if basebackup_to_shell.command is

Re: Restructure ALTER TABLE notes to clarify table rewrites and verification scans

2022-03-31 Thread Matthias van de Meent
On Tue, 29 Mar 2022 at 16:20, James Coleman wrote: > > Over in the "Document atthasmissing default optimization avoids > verification table scan" thread David Johnston (who I've cc'd) > suggested that my goals might be better implemented with a simple > restructuring of the Notes section of the AL

Re: Possible fails in pg_stat_statements test

2022-03-31 Thread Anton A. Melnikov
Hello! On 30.03.2022 22:36, Robert Haas wrote: I don't think that the idea of "extra" WAL records is very principled. It's pretty vague what "extra" means, and your definition seems to be basically "whatever would be needed to make this test case pass." I think the problem is basically with the

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 10:52 AM Andrew Dunstan wrote: > I have configured fairywren and drongo to use Unix sockets., and they > have turned green Here are the settings I'm using in the config's > build_env section: > > PG_TEST_USE_UNIX_SOCKETS => 1, > PG_REGRESS_SO

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Alvaro Herrera
On 2022-Mar-30, Andres Freund wrote: > It looks ugly, and it can't be copy-pasted as easily. Seems I'm alone on this, > so I'll leave it be... I'm bothered by that quote-in-the-middle occassionally as well (requires more clicks to paste). -- Álvaro Herrera 48°01'N 7°57'E — https

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 31, 2022 at 10:52 AM Andrew Dunstan wrote: >> We should probably fix the test though, so it doesn't require Unix >> sockets. It should be possible, although I haven't looked yet to see how. > Our mutual colleague Neha Sharma pointed out this email message to me:

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Justin Pryzby
On Thu, Mar 31, 2022 at 03:38:39PM +0100, Devrim Gündüz wrote: > On Thu, 2022-03-31 at 10:26 -0400, Tom Lane wrote: > > Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= writes: > > > Latest snapshot tarball fails to build on SLES 12.5, which uses GCC > > > 4.8-8. Build log is attached. > > > > Hmm, what versio

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Tom Lane
Justin Pryzby writes: > Possible responses look like: > - Use 0 which also means "default" (need to verify that works across > versions); > - Or #ifndef ZSTD_CLEVEL_DEFAULT #define ZSTD_CLEVEL_DEFAULT 3; > - Add a test for a minimum zstd version v1.3.7. This may be a good idea for >v15 in

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-03-31 Thread Nathan Bossart
At all times, PostgreSQL maintains a write ahead log (WAL) in the pg_wal/ - subdirectory of the cluster's data directory. The log records - every change made to the database's data files. This log exists + subdirectory of the cluster's data directory. The WAL records + capture eve

Re: Possible fails in pg_stat_statements test

2022-03-31 Thread Julien Rouhaud
Hi, On Thu, Mar 31, 2022 at 06:08:01PM +0300, Anton A. Melnikov wrote: > Hello! > > On 30.03.2022 22:36, Robert Haas wrote: > > I don't think that the idea of "extra" WAL records is very principled. > > It's pretty vague what "extra" means, and your definition seems to be > > basically "whatever

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 11:32 AM Tom Lane wrote: > I'm not volunteering to fix that, but this comment in pg_regress.c > is probably adequately illuminating: > > * Rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication. Permit > * the current OS user to authenticate as the bootstrap su

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 11:32:15 -0400, Tom Lane wrote: > Robert Haas writes: > * Rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication. Permit > * the current OS user to authenticate as the bootstrap superuser and as any > * user named in a --create-role option. > > This script is crea

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 13:22:24 +0530, Dilip Kumar wrote: > 0001 is changing the strategy to file copy during initdb and 0002 > patch adds the test cases for both these cases. Thanks! > From 4a997e2a95074a520777cd2b369f9c728b360969 Mon Sep 17 00:00:00 2001 > From: Dilip Kumar > Date: Thu, 31 Mar 202

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 10:05:10 -0400, Robert Haas wrote: > On Thu, Mar 31, 2022 at 3:52 AM Dilip Kumar wrote: > > 0001 is changing the strategy to file copy during initdb and 0002 > > patch adds the test cases for both these cases. > > IMHO, 0001 looks fine, except for needing some adjustments to th

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andrew Dunstan
On 3/31/22 11:32, Tom Lane wrote: > Robert Haas writes: >> On Thu, Mar 31, 2022 at 10:52 AM Andrew Dunstan wrote: >>> We should probably fix the test though, so it doesn't require Unix >>> sockets. It should be possible, although I haven't looked yet to see how. >> Our mutual colleague Neha Shar

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 11:44 AM Tom Lane wrote: > Justin Pryzby writes: > > Possible responses look like: > > - Use 0 which also means "default" (need to verify that works across > > versions); > > - Or #ifndef ZSTD_CLEVEL_DEFAULT #define ZSTD_CLEVEL_DEFAULT 3; > > - Add a test for a minimum

Re: unlogged sequences

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 16:14:25 +0200, Tomas Vondra wrote: > 1) Do we need to do something about pg_upgrade? I mean, we did not have > unlogged sequences until now, so existing databases may have unlogged > tables with logged sequences. If people run pg_upgrade, what should be > the end result? Should

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:25 PM Andrew Dunstan wrote: > Yeah, I think the fix is as simple as the attached. Well, that does not work because you added an extra parenthesis which makes Perl barf. If you fix that, then the test does not pass because, as I just explained to Tom, the flag we call --

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Justin Pryzby
On Thu, Mar 31, 2022 at 12:26:46PM -0400, Robert Haas wrote: > On Thu, Mar 31, 2022 at 11:44 AM Tom Lane wrote: > > Justin Pryzby writes: > > > Possible responses look like: > > > - Use 0 which also means "default" (need to verify that works across > > > versions); > > > - Or #ifndef ZSTD_CLEV

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Andres Freund
Hi, On 2022-03-30 21:59:15 -0700, Andres Freund wrote: > On 2022-03-30 21:29:16 -0700, Peter Geoghegan wrote: > > On Wed, Mar 30, 2022 at 9:20 PM Andres Freund wrote: > > > Perhaps we should just fetch the horizons from the "local" catalog for > > > shared > > > rels? > > > > Not sure what you

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 31, 2022 at 11:44 AM Tom Lane wrote: >> In view of 51c0d186d ("Allow parallel zstd compression"), I agree >> that some clarity about the minimum supported version of zstd >> seems essential. I don't want to be dealing with threading bugs >> in ancient zstd versi

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 31, 2022 at 12:25 PM Andrew Dunstan wrote: >> Yeah, I think the fix is as simple as the attached. > Well, that does not work because you added an extra parenthesis which > makes Perl barf. If you fix that, then the test does not pass because, > as I just explain

Re: psql - add SHOW_ALL_RESULTS option

2022-03-31 Thread Fabien COELHO
Attached a rebase. -- Fabien.diff --git a/contrib/pg_stat_statements/expected/pg_stat_statements.out b/contrib/pg_stat_statements/expected/pg_stat_statements.out index e0abe34bb6..8f7f93172a 100644 --- a/contrib/pg_stat_statements/expected/pg_stat_statements.out +++ b/contrib/pg_stat_statements/

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:37 PM Tom Lane wrote: > Hm. After rereading 51c0d186d I see that we're not asking for > parallel compression unless the user tells us to, so I guess > our fallback answer for any complaints in that area can be > "if it hurts, don't do it". Right. We can also tell peopl

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:45 PM Tom Lane wrote: > I agree that the documentation of this is nonexistent and the design > is probably questionable, but I'm not volunteering to fix either. > If you are, step right up. In the meantime, I believe (without > having tested) that the correct incantatio

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 9:37 AM Andres Freund wrote: > Perhaps we should explicitly mask out parts of relcache entries in the shared > init file that we know to be unreliable. I.e. set relfrozenxid, relminmxid to > Invalid* or such. That has the advantage of being more honest. If you're going to

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 09:58:18 -0700, Peter Geoghegan wrote: > On Thu, Mar 31, 2022 at 9:37 AM Andres Freund wrote: > > The only place that appears to access rd_rel->relfrozenxid outside of DDL is > > heap_abort_speculative(). > > I wonder how necessary that really is. Even if the XID is before > re

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Peter Geoghegan
On Wed, Mar 30, 2022 at 9:59 PM Andres Freund wrote: > I'm not sure there's a proper bug on HEAD here. I think at worst it can delay > the horizon increasing a bunch, by falsely not using an aggressive vacuum when > we should have - might even be limited to a single autovacuum cycle. So, to be cl

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 10:11 AM Andres Freund wrote: > I don't think we should weaken defenses against xids from before relfrozenxid > in vacuum / amcheck / If anything we should strengthen them. > > Isn't it also just plainly required for correctness? We'd not necessarily > trigger a vacuum

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 9:28 AM Andres Freund wrote: > I agree it makes sense to have logged sequences with unlogged tables. We > should call out the behavioural change somewhere prominent in the release > notes. > > We can/do already support that unlikely use case by allowing one to remove the O

support for MERGE

2022-03-31 Thread Ranier Vilela
On 2022-Mar-28, Alvaro Herrera wrote: >> I intend to get this pushed after lunch. >Pushed, with one more change: fetching the tuple ID junk attribute in >ExecMerge was not necessary, since we already had done that in >ExecModifyTable. We just needed to pass that down to ExecMerge, and >make sure

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 10:12:49 -0700, Peter Geoghegan wrote: > On Wed, Mar 30, 2022 at 9:59 PM Andres Freund wrote: > > I'm not sure there's a proper bug on HEAD here. I think at worst it can > > delay > > the horizon increasing a bunch, by falsely not using an aggressive vacuum > > when > > we sho

Re: support for MERGE

2022-03-31 Thread Daniel Gustafsson
> On 31 Mar 2022, at 19:38, Ranier Vilela wrote: > I think that there is an oversight at 7103ebb > There is no chance of Assert preventing this bug. This seems reasonable from brief reading of the code, NULL is a legitimate value for the map and that should yield an empty list AFAICT. -- Daniel

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:56 PM Robert Haas wrote: > I agree. That's exactly what I said in > http://postgr.es/m/CA+TgmoasOhqLR=tsymhd4tyx-qnfwtde_u19zphkunpsckh...@mail.gmail.com > ... OK, so I pushed a commit adding that incantation to the test script, and also a comment explaining why it's th

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-03-31 Thread Jacob Champion
On Thu, 2022-03-31 at 16:32 +0200, Peter Eisentraut wrote: > Why add a (failry complicated) pg_inet_pton() when a perfectly > reasonable inet_pton() exists? I think it was mostly just that inet_aton() and pg_inet_net_ntop() both had ports, and I figured I might as well port the other one since we

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 10:50 AM Andres Freund wrote: > > So, to be clear: vac_update_relstats() never actually considered the > > new relfrozenxid value from its vacuumlazy.c caller to be "in the > > future"? > > No, I added separate debug messages for those, and also applied your patch, > and it

Re: Unit tests for SLRU

2022-03-31 Thread Daniel Gustafsson
> On 31 Mar 2022, at 16:30, Aleksander Alekseev > wrote: Thanks for hacking on increasing test coverage! > While on it, I moved the Asserts() outside of SimpleLruInit(). It didn't seem > to be a right place to check the IsUnderPostmaster value, and complicated the > test implementation. + * +

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andrew Dunstan
On 3/31/22 14:12, Robert Haas wrote: > On Thu, Mar 31, 2022 at 12:56 PM Robert Haas wrote: >> I agree. That's exactly what I said in >> http://postgr.es/m/CA+TgmoasOhqLR=tsymhd4tyx-qnfwtde_u19zphkunpsckh...@mail.gmail.com >> ... > OK, so I pushed a commit adding that incantation to the test scri

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:25 PM Andres Freund wrote: > > Andres, thoughts? Do you want me to polish and commit 0001? > > Yes please! Here is a polished version. Comments? > FWIW, once the freeze is done I'm planning to set up scripting to see which > parts of the code we whacked around don't ha

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andrew Dunstan
On 3/31/22 12:45, Tom Lane wrote: > > On looking closer, the combination of --config-auth and --create-role > *only* fixes the config files for SSPI, it doesn't expect the server > to be running. > > I agree that the documentation of this is nonexistent and the design > is probably questionable,

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andres Freund
Hi, On 2022-03-30 12:58:26 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-03-30 12:34:34 -0400, Tom Lane wrote: > >> One refinement that comes to mind as I look at the patch is to distinguish > >> between "check" and "installcheck". Not sure that's worthwhile, but not > >> sure it is

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Andres Freund
On 2022-03-31 14:31:43 -0400, Robert Haas wrote: > On Thu, Mar 31, 2022 at 12:25 PM Andres Freund wrote: > > > Andres, thoughts? Do you want me to polish and commit 0001? > > > > Yes please! > > Here is a polished version. Comments? LGTM.

Re: ORDER BY pushdowns seem broken in postgres_fdw

2022-03-31 Thread Tom Lane
Ronan Dunklau writes: > Le jeudi 31 mars 2022, 01:41:37 CEST Tom Lane a écrit : >> If no objections, I think this is committable. > No objections on my end. Pushed. regards, tom lane

Re: [PATCH] pgbench: add multiconnect option

2022-03-31 Thread Greg Stark
According to the cfbot this patch needs a rebase

Re: minor gripe about lax reloptions parsing for views

2022-03-31 Thread Greg Stark
The patch is currently not applying. And it looks like there hasn't been any discussion since Alvaro's comments last december. I'm marking the patch Returned with Feedback. On Fri, 24 Dec 2021 at 16:49, Alvaro Herrera wrote: > > On 2021-Dec-21, Mark Dilger wrote: > > > Rebased patch attached: >

Re: jsonpath syntax extensions

2022-03-31 Thread Greg Stark
Well I still think this would be a good candidate to get reviewed. But it currently needs a rebase and it's the last day of the CF so I guess it'll get moved forward again. I don't think "returned with feedback" is helpful given there's been basically no feedback :(

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 2:44 PM Andres Freund wrote: > On 2022-03-31 14:31:43 -0400, Robert Haas wrote: > > On Thu, Mar 31, 2022 at 12:25 PM Andres Freund wrote: > > > > Andres, thoughts? Do you want me to polish and commit 0001? > > > > > > Yes please! > > > > Here is a polished version. Comment

Re: jsonpath syntax extensions

2022-03-31 Thread Nikita Malakhov
Hi, Ok, we'll rebase it onto actual master for the next iteration. Thank you! On Thu, Mar 31, 2022 at 10:17 PM Greg Stark wrote: > Well I still think this would be a good candidate to get reviewed. > > But it currently needs a rebase and it's the last day of the CF so I > guess it'll get moved f

  1   2   >