Documentation patch for ALTER SUBSCRIPTION

2020-01-23 Thread David Christensen
10. Best, David 0001-Be-explicit-about-the-behavior-of-REFRESH-PUBLICATIO.patch Description: Binary data -- David Christensen Senior Software and Database Engineer End Point Corporation da...@endpoint.com 785-727-1171 signature.asc Description: Message signed with OpenPGP

Re: Documentation patch for ALTER SUBSCRIPTION

2020-02-04 Thread David Christensen
>> On Feb 4, 2020, at 8:45 PM, Amit Kapila wrote: >> >> On Fri, Jan 24, 2020 at 2:05 AM David Christensen >> wrote: >> Greetings, >> Enclosed find a documentation patch that clarifies the behavior of ALTER >> SUBSCRIPTION … REFRESH PUBLICATI

Re: Documentation patch for ALTER SUBSCRIPTION

2020-02-05 Thread David Christensen
> On Feb 5, 2020, at 7:56 AM, Alvaro Herrera wrote: > > On 2020-Feb-05, Amit Kapila wrote: > >> It is possible that one might not understand how this option works by >> reading the already existing text in docs, but I think writing in a >> different language the same thing also doesn't seem

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-11 Thread David Christensen
> On Oct 11, 2020, at 1:14 PM, Euler Taveira > wrote: > >  >> On Fri, 9 Oct 2020 at 15:54, David Christensen wrote: > >> >> Enclosed find a patch to add a “truncate” option to subscription commands. >> >> When adding new tables to a

[PATCH] Add `truncate` option to subscription commands

2020-10-09 Thread David Christensen
-Add-truncate-option-to-subscription-commands.patch Description: Binary data -- David Christensen Senior Software and Database Engineer End Point Corporation da...@endpoint.com 785-727-1171 signature.asc Description: Message signed with OpenPGP

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-12 Thread David Christensen
> On Oct 11, 2020, at 10:00 PM, Amit Kapila wrote: > > On Mon, Oct 12, 2020 at 3:44 AM David Christensen wrote: >> >> >> On Oct 11, 2020, at 1:14 PM, Euler Taveira >> wrote: >> >>  >> On Fri, 9 Oct 2020 at 15:54, David Christensen

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-10 Thread David Christensen
> On Oct 10, 2020, at 12:14 AM, Amit Kapila wrote: > > On Sat, Oct 10, 2020 at 12:24 AM David Christensen > wrote: >> >> -hackers, >> >> Enclosed find a patch to add a “truncate” option to subscription commands. >> >> When adding

Re: [PATCH] Add `truncate` option to subscription commands

2020-11-25 Thread David Christensen
the implications of locking these tables on the > main apply process. > > > Thank you, > > > On Mon, Oct 12, 2020 at 11:31 PM David Christensen wrote: >> >> > On Oct 11, 2020, at 10:00 PM, Amit Kapila wrote: >> > >> > On Mon, Oct 12, 2020 at 3:4

Re: psql \df choose functions by their arguments

2020-11-01 Thread David Christensen
> * Removed the tab-complete bit, it was too fragile and unhelpful I can’t speak for the specific patch, but tab completion of proc args for \df, \ef and friends has long been a desired feature of mine, particularly when you are dealing with functions with huge numbers of arguments and the

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-15 Thread David Christensen
>> I had not really looked at the patch, but if there's a cleanup portion to >> the same >> patch as you're adding the YB too, then maybe it's worth separating those out >> into another patch so that the two can be considered independently. > > I agree with this opinion. It seems to me that we

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-14 Thread David Christensen
> I don't see the need to extend the unit to YB. > What use case do you have in mind? Practical or no, I saw no reason not to support all defined units. I assume we’ll get to a need sooner or later. :) David

Re: DELETE CASCADE

2021-06-08 Thread David Christensen
On Mon, Jun 7, 2021 at 2:54 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 05.06.21 14:21, David Christensen wrote: > > > >> On Jun 5, 2021, at 2:30 AM, Peter Eisentraut < > peter.eisentr...@enterprisedb.com> wrote: > >> > &

Re: DELETE CASCADE

2021-06-08 Thread David Christensen
> > > So basically where we are dispatching to the CASCADE guts, first check > session user’s DELETE permission and throw the normal permissions error if > they can’t delete? > > Actually, you also need appropriate SELECT permissions that correspond > to the WHERE clause of the DELETE statement. >

Re: DELETE CASCADE

2021-06-09 Thread David Christensen
On Wed, Jun 9, 2021 at 8:48 AM David G. Johnston wrote: > On Wednesday, June 9, 2021, Peter Eisentraut < > peter.eisentr...@enterprisedb.com> wrote: > >> >> It might work, I'm just saying it needs to be thought about carefully. If >> you have functionality like, delete this if there is no

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-15 Thread David Christensen
On Tue, Jun 15, 2021 at 8:26 AM David Rowley wrote: > On Tue, 15 Jun 2021 at 21:24, wrote: > > Hmmm, I didn't think YB was necessary, but what do others think? > > For me personally, without consulting Wikipedia, I know that Petabyte > comes after Terabyte and then I'm pretty sure it's Exabyte.

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-15 Thread David Christensen
On Tue, Jun 15, 2021 at 8:31 AM Isaac Morland wrote: > On Tue, 15 Jun 2021 at 05:24, wrote: > >> >> I don't see the need to extend the unit to YB. >> >> What use case do you have in mind? >> > >> >Practical or no, I saw no reason not to support all defined units. I >> assume we’ll >> >get to a

Re: DELETE CASCADE

2021-06-04 Thread David Christensen
On Fri, Jun 4, 2021 at 3:40 PM Isaac Morland wrote: > I apologize if I am deeply confused, but say I have this: > > CREATE TABLE parent ( > pid int primary key, > parent_data text > ); > > CREATE TABLE child ( > pid int REFERENCES parent, > cid int, > PRIMARY KEY (pid, cid),

Re: DELETE CASCADE

2021-06-04 Thread David Christensen
On Fri, Jun 4, 2021 at 2:53 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 03.06.21 23:47, David G. Johnston wrote: > > This behavior should require the same permissions as actually creating > > an ON DELETE CASCADE FK on the cascaded-to tables. i.e., Table Owner > > role

Re: DELETE CASCADE

2021-06-05 Thread David Christensen
> On Jun 5, 2021, at 2:29 AM, Peter Eisentraut > wrote: > > On 04.06.21 22:24, David Christensen wrote: >> So what are the necessary and sufficient conditions to check at this point? >> The constraint already exists, so what permissions would we need to check

Re: DELETE CASCADE

2021-06-05 Thread David Christensen
> On Jun 5, 2021, at 2:30 AM, Peter Eisentraut > wrote: > > On 03.06.21 22:49, David Christensen wrote: >> Presented for discussion is a POC for a DELETE CASCADE functionality, which >> will allow you one-shot usage of treating existing NO ACTION and RES

DELETE CASCADE

2021-06-03 Thread David Christensen
Hi -hackers, Presented for discussion is a POC for a DELETE CASCADE functionality, which will allow you one-shot usage of treating existing NO ACTION and RESTRICT FK constraints as if they were originally defined as CASCADE constraints. I can't tell you how many times this functionality would

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-03 Thread David Christensen
New versions attached to address the initial CF feedback and rebase on HEAD as of now. 0001-Expand-the-units-that-pg_size_pretty-numeric-knows-a.patch - expands the units that pg_size_pretty() can handle up to YB. 0002-Expand-the-supported-units-in-pg_size_bytes-to-cover.patch - expands the

Re: DELETE CASCADE

2021-06-03 Thread David Christensen
On Thu, Jun 3, 2021 at 4:48 PM David G. Johnston wrote: > On Thu, Jun 3, 2021 at 1:49 PM David Christensen < > david.christen...@crunchydata.com> wrote: > >> Presented for discussion is a POC for a DELETE CASCADE functionality, >> which will allow you one-shot

Re: DELETE CASCADE

2021-06-03 Thread David Christensen
On Thu, Jun 3, 2021 at 4:15 PM Isaac Morland wrote: > On Thu, 3 Jun 2021 at 16:49, David Christensen < > david.christen...@crunchydata.com> wrote: > >> Hi -hackers, >> >> Presented for discussion is a POC for a DELETE CASCADE functionality, >> which wi

Re: DELETE CASCADE

2021-06-03 Thread David Christensen
> > What happens if I don't have delete permission on the referencing table? >> When a foreign key reference delete cascades, I can cause records to >> disappear from a referencing table even if I don't have delete permission >> on that table. This feels like it's just supposed to be a convenience

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-07-07 Thread David Christensen
Tom Lane writes: > David Christensen writes: >> Enclosed is the patch to change the return type to numeric, as well as one >> for expanding units to >> add PB and EB. > > Can we really get away with changing the return type? That would > by no stretch of the

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-07-07 Thread David Christensen
David Rowley writes: > On Wed, 7 Jul 2021 at 02:46, David Christensen > wrote: >> if we do decide to expand the units table there will be a >> few additional changes (most significantly, the return value of >> `pg_size_bytes()` will need to switch >> to `numeric

Re: DELETE CASCADE

2021-07-07 Thread David Christensen
David G. Johnston writes: > Having the defined FK behaviors be more readily changeable, while not > mitigating this need, is IMO a more important feature to implement. If > there is a reason that cannot be implemented (besides no one has bothered > to take the time) then I would consider that

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-07-06 Thread David Christensen
David Rowley writes: > On Mon, 5 Jul 2021 at 20:00, David Rowley wrote: >> I don't really like the fact that I had to add the doHalfRound field >> to get the same rounding behaviour as the original functions. I'm >> wondering if it would just be too clever just to track how many bits >> we've

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-29 Thread David Christensen
ng all units available. Best, David >From ac30b06e3ddcb57eebb380560c2f4a47430dfd74 Mon Sep 17 00:00:00 2001 From: David Christensen Date: Tue, 29 Jun 2021 10:20:05 -0500 Subject: [PATCH 1/2] Refactor pg_size_pretty and pg_size_bytes to allow for supported unit expansion --- src/backend/utils/adt/dbsize.c

Re: Issue in recent pg_stat_statements?

2021-06-29 Thread David Christensen
Andres Freund writes: > On 2021-04-26 12:53:30 -0500, David Christensen wrote: >> On Mon, Apr 26, 2021 at 12:18 PM Julien Rouhaud wrote: >> > Using pg_stat_statements with a different query_id semantics without >> > having to fork pg_stat_statements. >>

Re: pgbench: INSERT workload, FK indexes, filler fix

2021-07-01 Thread David Christensen
Fabien COELHO writes: > Hello Greg, > > Some quick feedback about the patch and the arguments. > > Filling: having an empty string/NULL has been bothering me for some time. > However there is a > significant impact on the client/server network stream while initializing or > running queries,

[PATCH] pgbench: add multiconnect option

2021-06-30 Thread David Christensen
-hackers, This patch adds the concept of "multiconnect" to pgbench (better terminology welcome). The basic idea here is to allow connections made with pgbench to use different auth values or connect to multiple databases. We implement this using a user-provided PGSERVICEFILE and choosing a

Issue in recent pg_stat_statements?

2021-04-26 Thread David Christensen
-hackers, So in doing some recent work on pg_stat_statements, I notice that while the regression test still passes on HEAD, it appears that 4f0b096 (per git bisect) changed/broke how this works compared to historical versions. Essentially, when doing a fresh install of pg_stat_statements on a

Re: Issue in recent pg_stat_statements?

2021-04-26 Thread David Christensen
> > > Is this an expected change, or is this in fact broken? In previous > revisions, this was showing the INSERT and SELECT at the very least. I'm > unclear as to why the regression test is still passing, so want to verify > that I'm not doing something wrong in the testing. > > Yes, you want

Re: Issue in recent pg_stat_statements?

2021-04-26 Thread David Christensen
On Mon, Apr 26, 2021 at 12:18 PM Julien Rouhaud wrote: > On Mon, Apr 26, 2021 at 11:40 PM David Christensen > wrote: > >> > >> > Is this an expected change, or is this in fact broken? In previous > revisions, this was showing the INSERT and SELECT at the very l

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-04-28 Thread David Christensen
A second patch to teach the same units to pg_size_bytes(). Best, David On Wed, Apr 14, 2021 at 11:13 AM David Christensen < david.christen...@crunchydata.com> wrote: > Hi folks, > > Enclosed is a patch that expands the unit output for > pg_size_pretty(numeric) going u

[PATCH] expand the units that pg_size_pretty supports on output

2021-04-14 Thread David Christensen
Hi folks, Enclosed is a patch that expands the unit output for pg_size_pretty(numeric) going up to Yottabytes; I reworked the existing numeric output code to account for the larger number of units we're using rather than just adding nesting levels. There are also a few other places that could

[PATCH] Proof of concept for GUC improvements

2021-08-19 Thread David Christensen
12a Mon Sep 17 00:00:00 2001 From: David Christensen Date: Thu, 19 Aug 2021 14:33:15 -0500 Subject: [PATCH] POC: use sentinel values for parsing/outputting "special" int GUCs Some GUCs include specific key values like "-1", etc, which have context beyond the actua

Re: [PATCH] Proof of concept for GUC improvements

2021-08-19 Thread David Christensen
> Hi, > For parse_special_int(): > > + * true. If it's not found, return false and retval is set to 0. > ... > + /* don't touch the return value in other case */ > + return false; > > It seems the two comments are not consistent with each other (retval is not > set in case no entry is found).

[PATCH] Error out if SKIP LOCKED and WITH TIES are both specified

2021-08-13 Thread David Christensen
Both bugs #16676[1] and #17141[2] illustrate that the combination of SKIP LOCKED and FETCH FIRST WITH TIES break expectations when it comes to rows returned to other sessions accessing the same row. Since this situation is detectable from the syntax and hard to fix otherwise, forbid for now, with

Re: [PATCH] pgbench: add multiconnect option

2021-08-27 Thread David Christensen
> >> Good. I was thinking of adding such capability, possibly for handling > >> connection errors and reconnecting… > > > > round-robin and random make sense. I am wondering how round-robin > > would work with -C, though? Would you just reuse the same connection > > string as the one chosen at

Re: [PATCH] Proof of concept for GUC improvements

2021-08-27 Thread David Christensen
On Fri, Aug 27, 2021 at 1:19 AM Michael Paquier wrote: > > On Thu, Aug 19, 2021 at 03:58:57PM -0700, David G. Johnston wrote: > > I'm at -0.5 as to whether such a patch would actually be an improvement or > > whether the added possibilities would just be confusing and, because it is > > all

Re: [PATCH] Error out if SKIP LOCKED and WITH TIES are both specified

2021-08-30 Thread David Christensen
On Mon, Aug 30, 2021 at 3:51 PM Alvaro Herrera wrote: > > On 2021-Aug-13, David Christensen wrote: > > > Both bugs #16676[1] and #17141[2] illustrate that the combination of > > SKIP LOCKED and FETCH FIRST WITH TIES break expectations when it comes > > to rows returned

Re: [PATCH] Proof of concept for GUC improvements

2021-09-15 Thread David Christensen
Updated version attached with comment fixes and updated for new GUC. special-guc-values-v2.patch Description: Binary data

Re: CREATE ROLE IF NOT EXISTS

2021-10-21 Thread David Christensen
On Tue, Oct 19, 2021 at 4:29 PM Isaac Morland wrote: > On Tue, 19 Oct 2021 at 16:12, David Christensen < > david.christen...@crunchydata.com> wrote: > >> Greetings -hackers, >> >> Enclosed is a patch that implements CREATE ROLE IF NOT EXISTS (along with &

CREATE ROLE IF NOT EXISTS

2021-10-19 Thread David Christensen
Greetings -hackers, Enclosed is a patch that implements CREATE ROLE IF NOT EXISTS (along with the same support for USER/GROUP). This is a fairly straightforward approach in that we do no validation of anything other than existence, with the user needing to ensure that permissions/grants are set

Re: DELETE CASCADE

2021-09-29 Thread David Christensen
Tom Lane writes: > [ a couple of random thoughts after quickly scanning this thread ... ] > > David Christensen writes: >> I assume this would look something like: >> ALTER TABLE foo ALTER CONSTRAINT my_fkey ON UPDATE CASCADE ON DELETE RESTRICT >> with omitted

Re: CREATE ROLE IF NOT EXISTS

2021-11-10 Thread David Christensen
Modulo other issues/discussions, here is a version of this patch that implements CREATE OR REPLACE ROLE just by handing off to AlterRole if it's determined that the role already exists; presumably any/all additional considerations would need to be added in both places were there a separate code

Re: CREATE ROLE IF NOT EXISTS

2021-11-22 Thread David Christensen
On Mon, Nov 22, 2021 at 6:49 AM Daniel Gustafsson wrote: > > On 10 Nov 2021, at 18:14, David Christensen < > david.christen...@crunchydata.com> wrote: > > > Modulo other issues/discussions, here is a version of this patch.. > > This patch fails to compile since

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread David Christensen
On Mon, Nov 8, 2021 at 1:22 PM Mark Dilger wrote: > > On Nov 8, 2021, at 10:38 AM, Stephen Frost wrote: > > > I don't quite follow this. The entire point of Alice writing a script > > that uses IF NOT EXISTS is to have that command not fail if, indeed, > > that role already exists, but for the

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread David Christensen
On Tue, Nov 9, 2021 at 10:22 AM Stephen Frost wrote: > Greetings, > > * David Christensen (david.christen...@crunchydata.com) wrote: > > Well, the CREATE OR REPLACE via just setting the role's attributes > > explicitly based on what you passed it could work (not stric

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread David Christensen
On Tue, Nov 9, 2021 at 9:55 AM Mark Dilger wrote: > > On Nov 9, 2021, at 7:36 AM, David Christensen < > david.christen...@crunchydata.com> wrote: > > > > If CINE semantics are at issue, what about the CREATE OR REPLACE > semantics with some sort of merge into th

Re: CREATE ROLE IF NOT EXISTS

2021-11-03 Thread David Christensen
> > > This fails the roleattributes test in "make check", with what seems to be a > trivial change in the output. Can you please submit a rebased version > fixing > the test? > Updated version attached. David CREATE-ROLE-IF-NOT-EXISTS-v2.patch Description: Binary data

Re: [PATCH] Proof of concept for GUC improvements

2021-11-03 Thread David Christensen
> On Nov 3, 2021, at 5:35 AM, Daniel Gustafsson wrote: > >  >> >>> On 15 Oct 2021, at 23:54, Cary Huang wrote: >> >> I scanned through the GUC list and found that the following parameters can >> potentially be categorized in the "special_disabled0" group, just for your >> reference. > > >

Re: [PATCH] Proof of concept for GUC improvements

2022-01-12 Thread David Christensen
> Hi, > > According to the cfbot, the patch doesn't apply anymore and needs a > rebase: http://cfbot.cputube.org/patch_36_3290.log V4 rebased attached. special-guc-values-v4.patch Description: Binary data

[PATCH] add relation and block-level filtering to pg_waldump

2022-02-24 Thread David Christensen
depending on how the blocks are specified. This currently affects only the main fork, but we could presumably add the option to filter by fork as well, if that is considered useful. Best, David >From 9194b2cb07172e636030b9b4e979b7f2caf7cbc0 Mon Sep 17 00:00:00 2001 From: David Christensen D

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-02-24 Thread David Christensen
Added to commitfest as: https://commitfest.postgresql.org/37/3565/

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-02-25 Thread David Christensen
On Fri, Feb 25, 2022 at 7:33 AM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > Thanks for the patch. This is not adding something that users can't do > right now, but definitely improves the usability of the pg_waldump as > it avoids external filterings. Also, it can give

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-02-25 Thread David Christensen
On Fri, Feb 25, 2022 at 7:08 AM Japin Li wrote: > > On Fri, 25 Feb 2022 at 20:48, David Christensen < > david.christen...@crunchydata.com> wrote: > >> Cool. I think we can report an error instead of reading wal files, > >> if the tablespace, database, or rel

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-02-25 Thread David Christensen
Bharath Rupireddy writes: > On Fri, Feb 25, 2022 at 12:36 AM David Christensen > wrote: >> >> Greetings, >> >> This patch adds the ability to specify a RelFileNode and optional BlockNum >> to limit output of >> pg_waldump records to only those which

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-02-25 Thread David Christensen
> Cool. I think we can report an error instead of reading wal files, > if the tablespace, database, or relation is invalid. Does there any > WAL record that has invalid tablespace, database, or relation OID? The only sort of validity check we could do here is range checking for the underlying

Re: [PATCH] Proof of concept for GUC improvements

2022-03-22 Thread David Christensen
> On Mar 21, 2022, at 7:53 PM, Tom Lane wrote: > > Andres Freund writes: >> My impression is that there's not a lot of enthusiasm for the concept? If >> that's true we maybe ought to mark the CF entry as rejected? > > Yeah, I'm kind of leaning that way too. I don't see how we can >

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread David Christensen
On Sun, Mar 20, 2022 at 11:56 PM Thomas Munro wrote: > On Mon, Mar 21, 2022 at 4:36 PM Thomas Munro > wrote: > > On Sat, Feb 26, 2022 at 7:58 AM David Christensen > > wrote: > > > Attached is V2 with additional feedback from this email, as well as > the specifi

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread David Christensen
On Mon, Mar 21, 2022 at 4:39 PM Thomas Munro wrote: [snip] I guess you did this because init fork references aren't really > expected in the WAL, but I think it's more consistent to allow up to > MAX_FORKNUM, not least because your documentation mentions 3 as a > valid value. So I adjust this

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-24 Thread David Christensen
> On Mar 24, 2022, at 6:43 AM, Thomas Munro wrote: > > On Fri, Mar 25, 2022 at 12:26 AM Thomas Munro wrote: >>> On Fri, Mar 25, 2022 at 12:01 AM Peter Eisentraut >>> wrote: >>> Or even: Why are we exposing fork *numbers* in the user interface? >>> Even low-level tools such as pageinspect

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread David Christensen
Updated to include the V3 fixes as well as the unsigned int/enum fix. > v4-0001-Add-additional-filtering-options-to-pg_waldump.patch Description: Binary data

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-24 Thread David Christensen
> On Mar 24, 2022, at 4:12 PM, Thomas Munro wrote: > > On Fri, Mar 25, 2022 at 1:43 AM David Christensen > wrote: >>>> On Mar 24, 2022, at 6:43 AM, Thomas Munro wrote: >>> On Fri, Mar 25, 2022 at 12:26 AM Thomas Munro >>> wrote: >>>&

Re: [PATCH] pgbench: add multiconnect option

2022-03-22 Thread David Christensen
On Sat, Mar 19, 2022 at 11:43 AM Fabien COELHO wrote: > > Hi Sami, > > > Pgbench is a simple benchmark tool by design, and I wonder if adding > > a multiconnect feature will cause pgbench to be used incorrectly. > > Maybe, but I do not see how it would be worse that what pgbench already >

Re: DELETE CASCADE

2022-01-31 Thread David Christensen
On Sun, Jan 30, 2022 at 9:47 PM Julien Rouhaud wrote: > Hi, > > On Tue, Jan 25, 2022 at 10:26:53PM +0800, Julien Rouhaud wrote: > > > > It's been almost 4 months since your last email, and almost 2 weeks > since the > > notice that this patch doesn't apply anymore. Without update in the next >

Re: Initdb-time block size specification

2023-09-05 Thread David Christensen
On Tue, Sep 5, 2023 at 9:04 AM Robert Haas wrote: > > On Sat, Sep 2, 2023 at 3:09 PM Tomas Vondra > wrote: > > Except that no one is forcing you to actually go 130mph or 32mph, right? > > You make it seem like this patch forces people to use some other page > > size, but that's clearly not what

Re: Initdb-time block size specification

2023-09-05 Thread David Christensen
On Tue, Sep 5, 2023 at 2:52 PM Hannu Krosing wrote: > > Something I also asked at this years Unconference - Do we currently > have Build Farm animals testing with different page sizes ? > > I'd say that testing all sizes from 4KB up (so 4, 8, 16, 32) should be > done at least before each release

Re: Initdb-time block size specification

2023-08-31 Thread David Christensen
Enclosed are TPC-H results for 1GB shared_buffers, 64MB work_mem on a 64GB laptop with SSD storage; everything else is default settings. TL;DR: unpatched version: 17.30 seconds, patched version: 17.15; there are some slight variations in runtime, but seems to be within the noise level at this

Re: Initdb-time block size specification

2023-08-31 Thread David Christensen
> + * pg_fastmod - calculates the modulus of a 32-bit number against a constant > + * divisor without using the division operator > + */ > +static inline uint32 pg_fastmod(uint32 n, uint32 divisor, uint64 fastinv) > +{ > +#ifdef HAVE_INT128 > + uint64_t lowbits = fastinv * n; > + return

Re: Initdb-time block size specification

2023-08-31 Thread David Christensen
> I was definitely hand-waving additional implementation here for > non-native 128 bit support; the modulus algorithm as presented > requires 4 times the space as the divisor, so a uint16 implementation > should work for all 64-bit machines. Certainly open to other ideas or > implementations,

Re: Moving forward with TDE [PATCH v3]

2023-10-31 Thread David Christensen
On Tue, Oct 31, 2023 at 4:30 PM Bruce Momjian wrote: > On Tue, Oct 31, 2023 at 04:23:17PM -0500, David Christensen wrote: > > Greetings, > > > > I am including an updated version of this patch series; it has been > rebased > > onto 6ec62b7799 and reworked

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread David Christensen
Hi, thanks for the detailed feedback here. I do think it's worth addressing the question Stephen raised as far as what we use for the IV[1]; whether LSN or something else entirely, and if so what. The choice of LSN here is fairly fundamental to the existing implementation, so if we decide to do

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread David Christensen
On Fri, Nov 3, 2023 at 9:53 PM Andres Freund wrote: > On 2023-11-02 19:32:28 -0700, Andres Freund wrote: > > > From 327e86d52be1df8de9c3a324cb06b85ba5db9604 Mon Sep 17 00:00:00 2001 > > > From: David Christensen > > > Date: Fri, 29 Sep 2023 15:16:00 -0400 >

[PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-22 Thread David Christensen
Hi -hackers, Enclosed is a patch to allow extraction/saving of FPI from the WAL stream via pg_waldump. Description from the commit: Extracts full-page images from the WAL stream into a target directory, which must be empty or not exist. These images are subject to the same filtering rules as

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-23 Thread David Christensen
On Sat, Apr 23, 2022 at 9:49 AM Matthias van de Meent wrote: > Regardless of my (lack of) opinion on the inclusion of this patch in > PG (I did not significantly review this patch); I noticed that you do > not yet identify the 'fork' of the FPI in the file name. > > A lack of fork identifier in

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-26 Thread David Christensen
On Mon, Apr 25, 2022 at 9:54 PM Michael Paquier wrote: > On Mon, Apr 25, 2022 at 10:11:10AM -0500, David Christensen wrote: > > On Mon, Apr 25, 2022 at 1:11 AM Michael Paquier wrote: > >> I don't think that there is any need to rely on a new logic if there > >> is alre

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-26 Thread David Christensen
On Mon, Apr 25, 2022 at 9:42 PM Michael Paquier wrote: > On Mon, Apr 25, 2022 at 10:24:52AM -0500, David Christensen wrote: > > On Mon, Apr 25, 2022 at 6:03 AM Bharath Rupireddy > > wrote: > >> Thanks for working on this. I'm just thinking if we can use these FPIs >

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-25 Thread David Christensen
On Mon, Apr 25, 2022 at 2:00 AM Drouvot, Bertrand wrote: > > Hi, > > On 4/25/22 8:11 AM, Michael Paquier wrote: > > On Sat, Apr 23, 2022 at 01:43:36PM -0500, David Christensen wrote: > >> Hi Matthias, great point. Enclosed is a revised version of the patch > &g

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-25 Thread David Christensen
On Mon, Apr 25, 2022 at 1:11 AM Michael Paquier wrote: > > On Sat, Apr 23, 2022 at 01:43:36PM -0500, David Christensen wrote: > > Hi Matthias, great point. Enclosed is a revised version of the patch > > that adds the fork identifier to the end if it's a non-main fork. >

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-04-25 Thread David Christensen
On Mon, Apr 25, 2022 at 6:03 AM Bharath Rupireddy wrote: > Thanks for working on this. I'm just thinking if we can use these FPIs > to repair the corrupted pages? I would like to understand more > detailed usages of the FPIs other than inspecting with pageinspect. My main use case was for being

Re: [PATCHES] Post-special page storage TDE support

2023-11-08 Thread David Christensen
On Wed, Nov 8, 2023 at 8:04 AM Stephen Frost wrote: > Greetings, > > * Andres Freund (and...@anarazel.de) wrote: > > On 2023-05-09 17:08:26 -0500, David Christensen wrote: > > > From 965309ea3517fa734c4bc89c144e2031cdf6c0c3 Mon Sep 17 00:00:00 2001 > > > From: D

Re: Moving forward with TDE [PATCH v3]

2023-11-08 Thread David Christensen
On Tue, Nov 7, 2023 at 5:49 PM Andres Freund wrote: > Hi, > > On 2023-11-06 09:56:37 -0500, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > > > I still am quite quite unconvinced that using the LSN as a nonce is a > good > > > design decision. > > > > This is a really

Re: Moving forward with TDE [PATCH v3]

2023-11-08 Thread David Christensen
On Tue, Nov 7, 2023 at 6:47 PM Andres Freund wrote: > Hi, > > On 2023-11-06 11:26:44 +0100, Matthias van de Meent wrote: > > On Sat, 4 Nov 2023 at 03:38, Andres Freund wrote: > > > On 2023-11-02 22:09:40 +0100, Matthias van de Meent wrote: > > > > I'm quite surprised at the significant number

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-05-02 Thread David Christensen
Enclosed is v3 of this patch; this adds two modes for this feature, one with the raw page `--save-fullpage/-W` and one with the LSN+checksum fixups `--save-fullpage-fixup/-X`. I've added at least some basic sanity-checking of the underlying feature, as well as run the test file and the changes to

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-05-02 Thread David Christensen
...and pushing a couple fixups pointed out by cfbot, so here's v4. On Mon, May 2, 2022 at 8:42 AM David Christensen wrote: > > Enclosed is v3 of this patch; this adds two modes for this feature, > one with the raw page `--save-fullpage/-W` and one with the > LSN+checksum fixups `--s

Re: [PATCHES] Post-special page storage TDE support

2022-10-25 Thread David Christensen
> > Explicitly > > locking (assuming you stay in your lane) should only need to guard > > against access from other > > backends of this type if using shared buffers, so will be use-case > > dependent. > > I'm not sure what you mean here? I'm mainly pointing out that the specific code that

Re: [PATCHES] Post-special page storage TDE support

2022-10-28 Thread David Christensen
Hi Matthias, > Did you read the related thread with related discussion from last June, "Re: > better page-level checksums" [0]? In that I argued that space at the end of a > page is already allocated for the AM, and that reserving variable space at > the end of the page for non-AM usage is

[PATCH] comment fixes for delayChkptFlags

2022-10-14 Thread David Christensen
Enclosed is a trivial fix for a typo and misnamed field I noted when doing some code review. Best, David 0001-fix-comment-typos-for-delayChkptFlags.patch Description: Binary data

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-26 Thread David Christensen
> On Dec 26, 2022, at 1:29 AM, Michael Paquier wrote: > > On Sat, Dec 24, 2022 at 06:23:29PM +0530, Bharath Rupireddy wrote: >> Thanks for the patch. I've made the above change as well as renamed >> the test file name to be save_fpi.pl, everything else remains the same >> as v11. Here's the v12

Re: Improving btree performance through specializing by key shape, take 2

2023-01-12 Thread David Christensen
Hi Matthias, I'm going to look at this patch series if you're still interested. What was the status of your final performance testing for the 0008 patch alone vs the specialization series? Last I saw on the thread you were going to see if the specialization was required or not. Best, David

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-23 Thread David Christensen
On Mon, Dec 19, 2022 at 12:23 AM Michael Paquier wrote: > > On Thu, Dec 15, 2022 at 05:17:46PM -0600, David Christensen wrote: > > On Thu, Dec 15, 2022 at 12:36 AM Michael Paquier > > wrote: > > This v10 should incorporate your feedback as well as Bharath's. > >

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-23 Thread David Christensen
On Wed, Dec 21, 2022 at 5:47 AM Bharath Rupireddy wrote: > > On Fri, Dec 16, 2022 at 4:47 AM David Christensen > wrote: > > > > On Thu, Dec 15, 2022 at 12:36 AM Michael Paquier > > wrote: > > > > > > On Wed, Dec 14, 2022 at 04:44:34PM -0600, David

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-23 Thread David Christensen
On Fri, Dec 23, 2022 at 12:57 PM David Christensen wrote: > > On Wed, Dec 21, 2022 at 5:47 AM Bharath Rupireddy > wrote: [snip] > > 2. +$node->init(extra => ['-k'], allows_streaming => 1); > > When enabled with allows_streaming, there are a bunch of things tha

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-15 Thread David Christensen
On Thu, Dec 15, 2022 at 12:36 AM Michael Paquier wrote: > > On Wed, Dec 14, 2022 at 04:44:34PM -0600, David Christensen wrote: > > I can get one sent in tomorrow. This v10 should incorporate your feedback as well as Bharath's. > -XLogRecordHasFPW(XLogReaderState *record) >

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-14 Thread David Christensen
Hi Bharath, I can get one sent in tomorrow. Thanks, David

  1   2   >