Re: Raising the SCRAM iteration count

2023-03-08 Thread Michael Paquier
On Wed, Mar 08, 2023 at 09:07:36AM +0100, Daniel Gustafsson wrote: > No, I just did not think it was possible to feed input to the interactive > \password prompt with a normal pg_regress SQL file test. If you are able to > do > that I'd love to see an example. > > AFAIK a TAP test with

Re: Allow tests to pass in OpenSSL FIPS mode

2023-03-08 Thread Daniel Gustafsson
> On 8 Mar 2023, at 09:49, Peter Eisentraut > wrote: > It occurred to me that it would be easier to maintain this in the long run if > we could enable a "fake FIPS" mode that would have the same effect but didn't > require fiddling with the OpenSSL configuration or installation. > > The

Re: Allow tests to pass in OpenSSL FIPS mode

2023-03-08 Thread Peter Eisentraut
On 08.03.23 10:21, Daniel Gustafsson wrote: On 8 Mar 2023, at 09:49, Peter Eisentraut wrote: It occurred to me that it would be easier to maintain this in the long run if we could enable a "fake FIPS" mode that would have the same effect but didn't require fiddling with the OpenSSL

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Önder Kalacı
Hi Peter, all > > 1. > Saying the index "should" or "should not" do this or that sounds like > it is still OK but just not recommended. TO remove this ambigity IMO > most of the "should" ought to be changed to "must" because IIUC this > patch will simply not consider indexes which do not obey

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Önder Kalacı
Hi Hou zj, all > > IIRC, it invokes tuples_equal for all cases unless we are using replica > identity key or primary key to scan. But there seem some other cases where > the > tuples_equal looks unnecessary. > > For example, if the table on subscriber don't have a PK or RI key but have > a >

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Önder Kalacı
Hi Amit, all > You have not given complete steps to reproduce the problem where > instead of the index scan, a sequential scan would be picked. I have > tried to reproduce by extending your steps but didn't see the problem. > Let me know if I am missing something. > I think the steps you shared

Re: Raising the SCRAM iteration count

2023-03-08 Thread Daniel Gustafsson
> On 8 Mar 2023, at 08:48, Michael Paquier wrote: > > On Tue, Mar 07, 2023 at 02:03:05PM +0100, Daniel Gustafsson wrote: >> On 7 Mar 2023, at 09:26, Daniel Gustafsson wrote: >>> Right, what I meant was: can a pg_regress sql/expected test drive a psql >>> interactive prompt? Your comments

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Amit Kapila
On Wed, Mar 8, 2023 at 4:51 PM Önder Kalacı wrote: > > >> >> I just share this case and then we >> can discuss should we pick the index which only contain the extra columns on >> the >> subscriber. >> > > I think its performance implications come down to the discussion on [1]. > Overall, I

Re: [PoC] Reducing planning time when tables have many partitions

2023-03-08 Thread Alvaro Herrera
Hello Watari-san, this patch does not currently apply. Could you please rebase? David, do you intend to continue to be involved in reviewing this one? Thanks to both, -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "All rings of power are equal, But some rings

Re: meson: Optionally disable installation of test modules

2023-03-08 Thread Nazir Bilal Yavuz
Hi, On Mon, 6 Mar 2023 at 18:30, Andrew Dunstan wrote: > There are two separate issues here, but let's deal with the Windows issue. > Attached is the log output and also a listing of the runpython directory in > the build directory. Thanks for the logs but I couldn't understand the problem.

Re: Allow tests to pass in OpenSSL FIPS mode

2023-03-08 Thread Peter Eisentraut
On 09.12.22 05:16, Michael Paquier wrote: On Wed, Dec 07, 2022 at 03:14:09PM +0100, Peter Eisentraut wrote: Here is the next step. To contain the scope, I focused on just "make check" for now. This patch removes all incidental calls to md5(), replacing them with sha256(), so that they'd pass

Re: HOT chain validation in verify_heapam()

2023-03-08 Thread Aleksander Alekseev
Hi, > Note that I have not tried any of this yet. I did, both with Meson and Autotools. All in all the patch looks very good, but I have a few little nitpicks. ``` +/* HOT chains should not intersect. */ +if (predecessor[nextoffnum] != InvalidOffsetNumber) +

Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-08 Thread Bharath Rupireddy
On Tue, Mar 7, 2023 at 11:17 AM Julien Rouhaud wrote: > > On Tue, Mar 07, 2023 at 01:56:24PM +0900, Michael Paquier wrote: > > On Tue, Mar 07, 2023 at 12:42:20PM +0800, Julien Rouhaud wrote: > > > ah right I should have checked. but the same ABI compatibility concern > > > still exists for

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Önder Kalacı
Hi Shi Yu, all > e.g. > -- pub > CREATE TABLE test_replica_id_full (x int, y int); > ALTER TABLE test_replica_id_full REPLICA IDENTITY FULL; > CREATE PUBLICATION tap_pub_rep_full FOR TABLE test_replica_id_full; > -- sub > CREATE TABLE test_replica_id_full (x int, y int, z int); > CREATE INDEX

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

2023-03-08 Thread Sandro Santilli
On Tue, Mar 07, 2023 at 02:13:07PM -0500, Tom Lane wrote: > What I am maintaining is that no extension author is actually going > to write such a script, indeed they probably won't trouble to write > any downgrade-like actions at all. Which makes the proposed design > mostly a foot-gun. What

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread vignesh C
On Fri, 3 Mar 2023 at 18:40, Önder Kalacı wrote: > > Hi Vignesh, > > Thanks for the review > >> >> 1) We are currently calling RelationGetIndexList twice, once in >> FindUsableIndexForReplicaIdentityFull function and in the caller too, >> we could avoid one of the calls by passing the indexlist

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

2023-03-08 Thread Robert Haas
On Wed, Mar 8, 2023 at 7:27 AM Sandro Santilli wrote: > Now, PostGIS has released a total of 164 versions: That is a LOT of versions. PostGIS must release really frequently, I guess? > I guess you may suggest that we do NOT increas the *EXTENSION* version > number UNLESS something really

Re: Allow tests to pass in OpenSSL FIPS mode

2023-03-08 Thread Daniel Gustafsson
> On 8 Mar 2023, at 10:30, Peter Eisentraut > wrote: > > On 08.03.23 10:21, Daniel Gustafsson wrote: >>> On 8 Mar 2023, at 09:49, Peter Eisentraut >>> wrote: >>> It occurred to me that it would be easier to maintain this in the long run >>> if we could enable a "fake FIPS" mode that would

Re: Minimal logical decoding on standbys

2023-03-08 Thread Drouvot, Bertrand
Hi, On 3/3/23 5:26 PM, Drouvot, Bertrand wrote: Hi, On 3/3/23 8:58 AM, Jeff Davis wrote: On Thu, 2023-03-02 at 11:45 -0800, Jeff Davis wrote: In this case it looks easier to add the right API than to be sure about whether it's needed or not. I attached a sketch of one approach. Oh,

Re: Add pg_walinspect function with block info columns

2023-03-08 Thread Michael Paquier
On Wed, Mar 08, 2023 at 04:01:56PM +0530, Bharath Rupireddy wrote: > I understand that performance is critical here but we need to ensure > memory is used wisely. Therefore, I'd still vote to free at least the > major contributors here, that is, pfree(raw_data);, pfree(raw_page); > and

Re: Allow tests to pass in OpenSSL FIPS mode

2023-03-08 Thread Peter Eisentraut
On 06.03.23 17:06, Daniel Gustafsson wrote: fipshash() with an explanatory comments sounds like a good idea. I think that name would be quite false advertising.

Re: Allow tests to pass in OpenSSL FIPS mode

2023-03-08 Thread Peter Eisentraut
On 08.03.23 08:40, Tom Lane wrote: Peter Eisentraut writes: On 05.03.23 00:04, Tom Lane wrote: I've gone through this and have a modest suggestion: let's invent some wrapper functions around encode(sha256()) to reduce the cosmetic diffs and consequent need for closer study of patch changes.

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

2023-03-08 Thread Sandro Santilli
On Tue, Mar 07, 2023 at 12:39:34PM -0500, Robert Haas wrote: > The thing that confuses me here is why the PostGIS folks are ending up > with so many files. We want to allow PostGIS users to upgrade from ANY previous version, because different distribution or user habit may result in people

Re: Track IO times in pg_stat_io

2023-03-08 Thread Drouvot, Bertrand
Hi, On 3/7/23 7:47 PM, Andres Freund wrote: On 2023-03-07 13:43:28 -0500, Melanie Plageman wrote: Now I've a second thought: what do you think about resetting the related number of operations and *_time fields when enabling/disabling track_io_timing? (And mention it in the doc). That way

Re: Allow logical replication to copy tables in binary format

2023-03-08 Thread Melih Mutlu
Hi, On 7 Mar 2023 Tue at 04:10 Amit Kapila wrote: > As per what I could read in this thread, most people prefer to use the > existing binary option rather than inventing a new way (option) to > binary copy in the initial sync phase. Do you agree? I agree. What do you think about the version

Re: Add pg_walinspect function with block info columns

2023-03-08 Thread Bharath Rupireddy
On Wed, Mar 8, 2023 at 12:58 PM Michael Paquier wrote: > > On Tue, Mar 07, 2023 at 03:56:22PM +0530, Bharath Rupireddy wrote: > > That would be a lot better. Not just the test, but also the > > documentation can have it. Simple way to generate such a record (both > > block data and FPI) is to

Re: Allow tailoring of ICU locales with custom rules

2023-03-08 Thread Laurenz Albe
On Tue, 2023-03-07 at 22:06 -0800, Jeff Davis wrote: > On Fri, 2023-03-03 at 13:45 +0100, Peter Eisentraut wrote: > > You can mess with people by setting up your databases like this: > > > > initdb -D data --locale-provider=icu --icu-rules=' < c < b < e < d' > > > > ;-) > > Would we be the

RE: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-08 Thread Hayato Kuroda (Fujitsu)
Dear Wang, Thank you for updating the patch! I have briefly tested your patch and it worked well in following case. * WalSndUpdateProgressAndKeepalive is called when many inserts have come but the publisher does not publish the insertion. PSA the script for this. *

Re: HOT chain validation in verify_heapam()

2023-03-08 Thread Robert Haas
On Wed, Mar 8, 2023 at 5:35 AM Aleksander Alekseev wrote: > I did, both with Meson and Autotools. All in all the patch looks very > good, but I have a few little nitpicks. Thank you for the nitpicks. > +/* HOT chains should not intersect. */ > +if

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread vignesh C
On Tue, 7 Mar 2023 at 19:17, Önder Kalacı wrote: > > Hi Amit, Peter > >> >> > > Let me give an example to demonstrate why I thought something is fishy >> > > here: >> > > >> > > Imagine rel has a (non-default) REPLICA IDENTITY with Oid=. >> > > Imagine the same rel has a PRIMARY KEY with

Re: buildfarm + meson

2023-03-08 Thread Andrew Dunstan
On 2023-03-07 Tu 20:29, Andres Freund wrote: Hi, On 2023-03-07 15:47:54 -0500, Andrew Dunstan wrote: On 2023-03-07 Tu 14:37, Andres Freund wrote: The failures are like this: +ERROR: extension "dummy_index_am" is not available +DETAIL: Could not open extension control file

Re: TAP tests for psql \g piped into program

2023-03-08 Thread Peter Eisentraut
On 02.01.23 22:32, Daniel Verite wrote: This is a follow-up to commit d2a44904 from the 2022-11 CF [1] The TAP tests were left out with the suggestion to use Perl instead of cat (Unix) / findstr (Windows) as the program to pipe into. PFA a patch implementing that suggestion. The perl binary

Re: Add documentation for coverage reports with meson

2023-03-08 Thread Peter Eisentraut
On 03.03.23 12:12, Michael Paquier wrote: + +meson setup -Db_coverage=true ... OTHER OPTIONS ... builddir/ +cd builddir/ +meson compile +meson test +ninja coverage-html + The "cd" command needs to be moved after the meson commands, and the meson commands need to have a -C builddir option. So

Re: buildfarm + meson

2023-03-08 Thread Nazir Bilal Yavuz
Hi, On Wed, 8 Mar 2023 at 16:57, Andrew Dunstan wrote: > So if I understand this right, the way to use this would be something like: > > > local $ENV{DESTDIR} = $installdir; > > run_log("meson compile -C $pgsql install-test-files"); > > > Is that right? I did that but it didn't work :-(

RE: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-08 Thread Takamichi Osumi (Fujitsu)
Hi, On Wednesday, March 8, 2023 11:54 AM From: wangw.f...@fujitsu.com wrote: > Attach the new patch. Thanks for sharing v6 ! Few minor comments for the same. (1) commit message The old function name 'is_skip_threshold_change' is referred currently. We need to update it to

Re: Should vacuum process config file reload more often

2023-03-08 Thread Jim Nasby
On 3/2/23 1:36 AM, Masahiko Sawada wrote: For example, I guess we will need to take care of changes of maintenance_work_mem. Currently we initialize the dead tuple space at the beginning of lazy vacuum, but perhaps we would need to enlarge/shrink it based on the new value? Doesn't the dead

Re: Add standard collation UNICODE

2023-03-08 Thread Jeff Davis
On Wed, 2023-03-08 at 07:21 +0100, Peter Eisentraut wrote: > On 04.03.23 19:29, Jeff Davis wrote: > > It looks like the way you've handled this is by inserting the > > collation > > with collprovider=icu even if built without ICU support. I think > > that's > > a new case, so we need to make sure

Re: Add pg_walinspect function with block info columns

2023-03-08 Thread Bharath Rupireddy
On Wed, Mar 8, 2023 at 4:23 PM Michael Paquier wrote: > > On Wed, Mar 08, 2023 at 04:01:56PM +0530, Bharath Rupireddy wrote: > > I understand that performance is critical here but we need to ensure > > memory is used wisely. Therefore, I'd still vote to free at least the > > major contributors

Re: Schema variables - new implementation for Postgres 15

2023-03-08 Thread Pavel Stehule
st 8. 3. 2023 v 16:35 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Wed, Mar 08, 2023 at 08:31:07AM +0100, Pavel Stehule wrote: > > pá 3. 3. 2023 v 21:19 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > > napsal: > > > > > > On Tue, Feb 28, 2023 at 06:12:50AM +0100, Pavel

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Önder Kalacı
Hi Vignesh C, > > Few comments > 1) Maybe this change is not required: > fallback if no other solution is possible. If a replica identity other > than full is set on the publisher side, a replica > identity > - comprising the same or fewer columns must also be set on the subscriber >

Re: buildfarm + meson

2023-03-08 Thread Andrew Dunstan
On 2023-03-08 We 08:57, Andrew Dunstan wrote: On 2023-03-07 Tu 20:29, Andres Freund wrote: Hi, On 2023-03-07 15:47:54 -0500, Andrew Dunstan wrote: On 2023-03-07 Tu 14:37, Andres Freund wrote: The failures are like this: +ERROR: extension "dummy_index_am" is not available +DETAIL: Could

Re: allow meson to find ICU in non-standard localtion

2023-03-08 Thread Peter Eisentraut
On 01.03.23 21:30, Jeff Davis wrote: On Wed, 2023-03-01 at 11:43 -0800, Jacob Champion wrote: I work around it by manually setting -Dextra_lib_dirs. I just tried doing that with ICU 72, and it worked without a patch. Hopefully that helps some? Yes, works, thank you. Obviously we'd like a

Re: Schema variables - new implementation for Postgres 15

2023-03-08 Thread Dmitry Dolgov
> On Wed, Mar 08, 2023 at 08:31:07AM +0100, Pavel Stehule wrote: > pá 3. 3. 2023 v 21:19 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > > On Tue, Feb 28, 2023 at 06:12:50AM +0100, Pavel Stehule wrote: > > > > > > fresh rebase > > > > I'm continuing to review, this time going

proposal - get_extension_version function

2023-03-08 Thread Pavel Stehule
Hi I try to write a safeguard check that ensures the expected extension version for an extension library. Some like const char *expected_extversion = "2.5"; ... extoid = getExtensionOfObject(ProcedureRelationId, fcinfo->flinfo->fn_oid)); extversion = get_extension_version(extoid); if

Re: allow meson to find ICU in non-standard localtion

2023-03-08 Thread Jeff Davis
On Wed, 2023-03-08 at 17:30 +0100, Peter Eisentraut wrote: > So should we withdraw the patch from the commit fest? Withdrawn. If someone else is interested we can still pursue some improvements. Regards, Jeff Davis

Re: Allow tailoring of ICU locales with custom rules

2023-03-08 Thread Laurenz Albe
On Fri, 2023-03-03 at 13:45 +0100, Peter Eisentraut wrote: > Ok, here is a version with an initdb option and also a createdb option > (to expose the CREATE DATABASE option). > > You can mess with people by setting up your databases like this: > > initdb -D data --locale-provider=icu

Re: Allow tailoring of ICU locales with custom rules

2023-03-08 Thread Peter Eisentraut
On 08.03.23 15:18, Laurenz Albe wrote: On Fri, 2023-03-03 at 13:45 +0100, Peter Eisentraut wrote: Ok, here is a version with an initdb option and also a createdb option (to expose the CREATE DATABASE option). You can mess with people by setting up your databases like this: initdb -D data

lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)

2023-03-08 Thread Christoph Berg
Re: Tomas Vondra > Add LZ4 compression to pg_dump This broke the TAP tests on Ubuntu 18.04 (bionic): [17:06:45.513](0.000s) ok 1927 - compression_lz4_custom: should not dump test_table with 4-row INSERTs # Running: pg_dump --jobs=2 --format=directory --compress=lz4:1

Re: HOT chain validation in verify_heapam()

2023-03-08 Thread Himanshu Upadhyaya
On Wed, Mar 8, 2023 at 7:06 PM Robert Haas wrote: > > > +/* HOT chains should not intersect. */ > > +if (predecessor[nextoffnum] != InvalidOffsetNumber) > > +{ > > +report_corruption(, > > +

Re: HOT chain validation in verify_heapam()

2023-03-08 Thread Aleksander Alekseev
Hi, > > ``` > > +$node->append_conf('postgresql.conf','max_prepared_transactions=100'); > > ``` > > > > From what I can tell this line is not needed. > > That surprises me, because the new test cases involve preparing a > transaction, and by default max_prepared_transactions=0. So it seems > to

Re: Parallelize correlated subqueries that execute within each worker

2023-03-08 Thread Antonin Houska
James Coleman wrote: > On Mon, Feb 6, 2023 at 11:39 AM Antonin Houska wrote: > Attached is v9. ok, I've changed the status to RfC -- Antonin Houska Web: https://www.cybertec-postgresql.com

Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode

2023-03-08 Thread Melanie Plageman
Thank you to all reviewers! This email is in answer to the three reviews done since my last version. Attached is v2 and inline below is replies to all the review comments. The main difference between this version and the previous version is that I've added a guc, buffer_usage_limit and the

RE: Support logical replication of DDLs

2023-03-08 Thread wangw.f...@fujitsu.com
On Mon, Mar 6, 2023 18:17 PM Wang, Wei/王 威 wrote: > On Mon, Mar 6, 2023 14:34 AM Ajin Cherian wrote: > > Changes are in patch 1 and patch 2 > > Thanks for updating the patch set. > > Here are some comments: Here are some more comments for v-75-0002* patch: 1. In the function

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Amit Kapila
On Thu, Mar 9, 2023 at 6:34 AM Peter Smith wrote: > > 4. build_replindex_scan_key > > > > > Based on the discussions below, I kept as-is. I really don't want to do > > unrelated > > changes in this patch, as I also got several feedback for not doing it, > > > > Hmm, although this code

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-08 Thread Kyotaro Horiguchi
At Thu, 09 Mar 2023 11:53:26 +0900 (JST), I wrote > It turned out to be not as simple as I thought, though... The error message and the location where the error condition is checked don't match, but making the messages more generic may not be helpful for users.. regards. -- Kyotaro Horiguchi

Re: Add shared buffer hits to pg_stat_io

2023-03-08 Thread Melanie Plageman
On Tue, Mar 7, 2023 at 2:47 PM Andres Freund wrote: > > Hi, > > LGTM. The only comment I have is that a small test wouldn't hurt... Compared > to the other things it should be fairly easy... So, I have attached an updated patchset which adds a test for hits. Since there is only one call site

Re: Non-superuser subscription owners

2023-03-08 Thread Andres Freund
Hi, On 2023-02-07 16:56:55 -0500, Robert Haas wrote: > On Wed, Feb 1, 2023 at 4:02 PM Andres Freund wrote: > > > + /* Is the use of a password mandatory? */ > > > + must_use_password = MySubscription->passwordrequired && > > > + !superuser_arg(MySubscription->owner); > > > >

Re: proposal - get_extension_version function

2023-03-08 Thread Tom Lane
Jacob Champion writes: > On Wed, Mar 8, 2023 at 11:11 AM Pavel Stehule wrote: >> installation from rpm or deb packages > Right, but I thought the safe order for a downgrade was to issue the > SQL downgrade first (thus putting the system back into the > post-upgrade state), and only then

Re: Improve logging when using Huge Pages

2023-03-08 Thread Nathan Bossart
On Wed, Feb 15, 2023 at 10:13:17AM -0800, Nathan Bossart wrote: > On Tue, Feb 14, 2023 at 07:32:56PM -0600, Justin Pryzby wrote: >> On Mon, Feb 13, 2023 at 08:18:52PM -0800, Nathan Bossart wrote: >>> I'm curious why you chose to make this a string instead of an enum. There >>> might be little

Re: buildfarm + meson

2023-03-08 Thread Andrew Dunstan
On 2023-03-08 We 14:22, Andres Freund wrote: Hi, On 2023-03-02 17:35:26 -0500, Andrew Dunstan wrote: On 2023-03-02 Th 17:06, Andres Freund wrote: Hi On 2023-03-02 17:00:47 -0500, Andrew Dunstan wrote: On 2023-03-01 We 16:32, Andres Freund wrote: This is now working on my MSVC test rig

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Peter Smith
Here are my review comments for v37-0001. == General - should/must. 1. In my previous review [1] (comment #1) I wrote that only some of the "should" were misleading and gave examples where to change. But I didn't say that *every* usage of that word was wrong, so your global replace of

Re: Add error functions: erf() and erfc()

2023-03-08 Thread Thomas Munro
On Thu, Mar 9, 2023 at 1:16 PM Dean Rasheed wrote: > On Wed, 8 Mar 2023 at 23:24, Thomas Munro wrote: > > ... But Oracle, and I think > > several other analytics-focused SQL systems, can do it in a very easy > > built-in way. I think to get at that you probably need the t CDF, and > > in

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-08 Thread Kyotaro Horiguchi
At Wed, 8 Mar 2023 16:30:05 -0500, Robert Haas wrote in > Commit 7170f2159fb21b62c263acd458d781e2f3c3f8bb, which introduced > in-place tablespaces, didn't make any adjustments to pg_basebackup. > The resulting behavior is pretty bizarre. > > If you take a plain-format backup using pg_basebackup

Re: meson vs make: missing/inconsistent ENV

2023-03-08 Thread Michael Paquier
On Wed, Mar 08, 2023 at 05:59:13PM -0800, Andres Freund wrote: > I now pushed a fix for the two obvious cases pointed out by Justin. Thanks! -- Michael signature.asc Description: PGP signature

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread vignesh C
On Wed, 8 Mar 2023 at 21:46, Önder Kalacı wrote: > > Hi Vignesh C, > >> >> >> Few comments >> 1) Maybe this change is not required: >> fallback if no other solution is possible. If a replica identity other >> than full is set on the publisher side, a replica identity >> - comprising

Re: proposal - get_extension_version function

2023-03-08 Thread Pavel Stehule
st 8. 3. 2023 v 23:43 odesílatel Tom Lane napsal: > Jacob Champion writes: > > What I'm trying to pin down is the project's position on the reverse > > -- binary version X and SQL version X+1 -- because that seems > > generally unmaintainable, and I don't understand why an author would > > pay

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Peter Smith
On Thu, Mar 9, 2023 at 3:49 PM Amit Kapila wrote: > > On Wed, Mar 8, 2023 at 8:44 PM Önder Kalacı wrote: > > > >> > >> I felt that once you remove the create publication/subscription/wait > >> for sync steps, the test execution might become faster and save some > >> time in the local execution,

Re: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-08 Thread Peter Smith
Here are some review comments for v6-0001 == General. 1. There are lots of new comments saying: /* don't call update progress, we didn't really make any */ but is the wording "call update progress" meaningful? Should that be written something more like: /* No progress has been made so

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Amit Kapila
On Thu, Mar 9, 2023 at 10:37 AM Peter Smith wrote: > > On Thu, Mar 9, 2023 at 3:49 PM Amit Kapila wrote: > > > > On Wed, Mar 8, 2023 at 8:44 PM Önder Kalacı wrote: > > > > > >> > > >> I felt that once you remove the create publication/subscription/wait > > >> for sync steps, the test execution

Re: [PoC] Let libpq reject unexpected authentication requests

2023-03-08 Thread Michael Paquier
On Mon, Mar 06, 2023 at 04:02:25PM -0800, Jacob Champion wrote: > On Fri, Mar 3, 2023 at 6:35 PM Michael Paquier wrote: >> I was refreshing my mind with 0001 yesterday, and except for the two >> parts where we need to worry about AUTH_REQ_OK being sent too early >> and the business with gssenc,

Re: pg_upgrade and logical replication

2023-03-08 Thread Amit Kapila
On Wed, Mar 8, 2023 at 12:26 PM Julien Rouhaud wrote: > > On Sat, 4 Mar 2023, 14:13 Amit Kapila, wrote: >> >> >> > For the publisher nodes, that may be something nice to support (I'm >> > assuming it >> > could be useful for more complex replication setups) but I'm not >> > interested in >> >

Re: Allow logical replication to copy tables in binary format

2023-03-08 Thread Amit Kapila
On Wed, Mar 8, 2023 at 6:17 PM Melih Mutlu wrote: > > On 7 Mar 2023 Tue at 04:10 Amit Kapila wrote: >> >> As per what I could read in this thread, most people prefer to use the >> existing binary option rather than inventing a new way (option) to >> binary copy in the initial sync phase. Do you

Re: Add pg_walinspect function with block info columns

2023-03-08 Thread Michael Paquier
On Thu, Mar 09, 2023 at 09:52:57AM +0530, Bharath Rupireddy wrote: > Hm, then, +1 for v3. Okay, thanks. Let's use that, then. -- Michael signature.asc Description: PGP signature

Re: Raising the SCRAM iteration count

2023-03-08 Thread Michael Paquier
On Wed, Mar 08, 2023 at 05:21:20PM +0900, Michael Paquier wrote: > On Wed, Mar 08, 2023 at 09:07:36AM +0100, Daniel Gustafsson wrote: >> AFAIK a TAP test with psql_interactive is the only way to do this so that's >> what I've implemented. I cannot think of a better idea than what you have here,

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-08 Thread Amit Kapila
On Wed, Mar 8, 2023 at 8:44 PM Önder Kalacı wrote: > >> >> I felt that once you remove the create publication/subscription/wait >> for sync steps, the test execution might become faster and save some >> time in the local execution, cfbot and the various machines in >> buildfarm. If the execution

Cross-database SERIALIZABLE safe snapshots

2023-03-08 Thread Thomas Munro
Here is a feature idea that emerged from a pgsql-bugs thread[1] that I am kicking into the next commitfest. Example: s1: \c db1 s1: CREATE TABLE t (i int); s1: BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; s1: INSERT INTO t VALUES (42); s2: \c db2 s2: BEGIN TRANSACTION ISOLATION LEVEL

Re: Testing autovacuum wraparound (including failsafe)

2023-03-08 Thread Michael Paquier
On Tue, Mar 07, 2023 at 09:21:00PM -0800, Peter Geoghegan wrote: > Surely your tap test should be using single user mode? Perhaps you > missed the obnoxious HINT, that's part of the WARNING that the test > parses? ;-) I may be missing something, but you cannot use directly a "postgres" command

Re: [PATCH] Align GSS and TLS error handling in PQconnectPoll()

2023-03-08 Thread Michael Paquier
On Fri, Feb 17, 2023 at 09:01:43AM -0800, Jacob Champion wrote: > On Thu, Feb 16, 2023 at 10:59 PM Michael Paquier wrote: >> I am adding Stephen Frost >> in CC to see if he has any comments about all this part of the logic >> with gssencmode. > > Sounds good. Hearing nothing on this part,

Re: meson vs make: missing/inconsistent ENV

2023-03-08 Thread Andres Freund
Hi, On 2023-03-09 09:36:52 +0900, Michael Paquier wrote: > On Sun, Feb 26, 2023 at 03:21:04PM -0800, Andres Freund wrote: > > On 2023-02-26 16:52:39 -0600, Justin Pryzby wrote: > >> Also, e6927270c added ZSTD to src/bin/pg_basebackup/meson.build, but > >> it's not in ./Makefile ?? Maybe that was

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-08 Thread Thomas Munro
On Thu, Mar 9, 2023 at 2:58 PM Kyotaro Horiguchi wrote: > At Wed, 8 Mar 2023 16:30:05 -0500, Robert Haas wrote > in > > I'm not sure how messy it's going to be to clean this up. I think each > > tablespace really needs to go into a separate ${TSOID}.tar file, > > because we've got tons of code

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-08 Thread Kyotaro Horiguchi
At Thu, 09 Mar 2023 10:58:41 +0900 (JST), I wrote > behavior for that purpose. I believe it is reasonable to make > basebackup error-out when it encounters an in-place tablespace > directory when TABLESPACE_MAP is activated. It turned out to be not as simple as I thought, though... regards. --

Re: Add pg_walinspect function with block info columns

2023-03-08 Thread Bharath Rupireddy
On Thu, Mar 9, 2023 at 7:34 AM Kyotaro Horiguchi wrote: > > > In short, my choice would still be simplicity here with v3, I guess. > > FWIW, I slightly prefer v3 for the reason I mentioned above. Hm, then, +1 for v3. FWIW, I quickly tried to hit that case where a single WAL record has

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-03-08 Thread Amit Kapila
On Wed, Mar 8, 2023 at 9:20 AM Masahiko Sawada wrote: > > On Wed, Mar 8, 2023 at 3:30 AM Nathan Bossart > wrote: > > > > > IMO the current set of > > trade-offs (e.g., unavoidable bloat and WAL buildup) would make this > > feature virtually unusable for a lot of workloads, so it's probably

Re: zstd compression for pg_dump

2023-03-08 Thread Jacob Champion
On Sat, Mar 4, 2023 at 8:57 AM Justin Pryzby wrote: > pryzbyj=# CREATE TABLE t1 AS SELECT i,array_agg(j) FROM > generate_series(1,444)i,generate_series(1,9)j GROUP BY 1; > $ ./src/bin/pg_dump/pg_dump -d pryzbyj -Fc -Z zstd:long=1 |wc -c > 82023 > $ ./src/bin/pg_dump/pg_dump -d pryzbyj -Fc -Z

Re: Moving forward with TDE

2023-03-08 Thread Stephen Frost
Greetings, * Chris Travers (chris.trav...@gmail.com) wrote: > From the documentation, the primary threat model of TDE is to prevent > decryption of data from archived wal segments (and data files), for example > on a backup system. While there are other methods around this problem to > date,

Re: proposal - get_extension_version function

2023-03-08 Thread Tom Lane
Jacob Champion writes: > What I'm trying to pin down is the project's position on the reverse > -- binary version X and SQL version X+1 -- because that seems > generally unmaintainable, and I don't understand why an author would > pay that tax if they could just avoid it by bailing out entirely.

Re: psql \watch 2nd argument: iteration count

2023-03-08 Thread Andrey Borodin
On Wed, Mar 8, 2023 at 10:49 AM Nathan Bossart wrote: > > Is there any reason to disallow 0 for the sleep argument? I often use > commands like "\watch .1" to run statements repeatedly with very little > time in between, and I'd use "\watch 0" instead if it was available. > Yes, that makes

Re: psql \watch 2nd argument: iteration count

2023-03-08 Thread Nathan Bossart
+1 for adding an iteration count argument to \watch. + char *opt_end; + sleep = strtod(opt, _end); + if (sleep <= 0 || *opt_end) + { + pg_log_error("Watch period must be positive

Re: proposal - get_extension_version function

2023-03-08 Thread Tom Lane
Pavel Stehule writes: > I try to write a safeguard check that ensures the expected extension > version for an extension library. This is a bad idea. How will you do extension upgrades, if the new .so won't run till you apply the extension upgrade script but the old .so malfunctions as soon as

Re: optimize several list functions with SIMD intrinsics

2023-03-08 Thread Nathan Bossart
cfbot's Windows build wasn't happy with a couple of casts. I applied a fix similar to c6a43c2 in v2. The patch is still very much a work in progress. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 055717233c47518ae48119938ebd203cc55f7f3c Mon Sep 17 00:00:00 2001 From:

Re: proposal - get_extension_version function

2023-03-08 Thread Jacob Champion
On Wed, Mar 8, 2023 at 11:18 AM Tom Lane wrote: > > Jacob Champion writes: > > On Wed, Mar 8, 2023 at 10:49 AM Tom Lane wrote: > >> This is a bad idea. How will you do extension upgrades, if the new .so > >> won't run till you apply the extension upgrade script but the old .so > >>

Re: Get rid of PgStat_BackendFunctionEntry

2023-03-08 Thread Nathan Bossart
On Mon, Feb 13, 2023 at 10:06:27AM +0100, Drouvot, Bertrand wrote: > Please find attached a patch proposal to $SUBJECT: it would allow to simplify > even more the work done to generate pg_stat_get_xact*() functions with Macros. > > This is a follow up for [1] where it has been suggested > to get

Re: meson: Optionally disable installation of test modules

2023-03-08 Thread Andrew Dunstan
On 2023-03-08 We 08:49, Nazir Bilal Yavuz wrote: Hi, On Mon, 6 Mar 2023 at 18:30, Andrew Dunstan wrote: There are two separate issues here, but let's deal with the Windows issue. Attached is the log output and also a listing of the runpython directory in the build directory. Thanks for

Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)

2023-03-08 Thread Michael Paquier
On Thu, Mar 09, 2023 at 12:39:08AM +0100, Tomas Vondra wrote: > IMO we should fix that. We have a bunch of buildfarm members running on > Ubuntu 18.04 (or older) - it's true none of them seems to be running TAP > tests. But considering how trivial the fix is ... > > Barring objections, I'll push

Re: Add error functions: erf() and erfc()

2023-03-08 Thread Nathan Bossart
On Thu, Mar 09, 2023 at 12:27:47AM +, Dean Rasheed wrote: > On Thu, 9 Mar 2023 at 00:13, Nathan Bossart wrote: >> I'm also wondering about whether we need the isinf() checks. IIUC that >> should never happen, but maybe you added that "just in case." > > I copied those from dtanh(),

Re: buildfarm + meson

2023-03-08 Thread Andres Freund
Hi, On 2023-03-08 09:41:57 -0500, Andrew Dunstan wrote: > On 2023-03-08 We 08:57, Andrew Dunstan wrote: > > On 2023-03-07 Tu 20:29, Andres Freund wrote: > > > On 2023-03-07 15:47:54 -0500, Andrew Dunstan wrote: > > > Here's a prototype for that. > > > > > > It adds an install-test-files target,

Re: Add error functions: erf() and erfc()

2023-03-08 Thread Nathan Bossart
On Mon, Feb 27, 2023 at 12:54:35PM +, Dean Rasheed wrote: > + /* > + * For erf, we don't need an errno check because it never overflows. > + */ > + /* > + * For erfc, we don't need an errno check because it never overflows. > + */ The man pages for these seem to

Re: [PoC] Reducing planning time when tables have many partitions

2023-03-08 Thread David Rowley
On Thu, 9 Mar 2023 at 01:34, Alvaro Herrera wrote: > David, do you intend to continue to be involved in reviewing this one? Yes. I'm currently trying to make a few Bitmapset improvements which include the change made in this thread's 0001 patch over on [1]. For the main patch, I've been

allow_in_place_tablespaces vs. pg_basebackup

2023-03-08 Thread Robert Haas
Commit 7170f2159fb21b62c263acd458d781e2f3c3f8bb, which introduced in-place tablespaces, didn't make any adjustments to pg_basebackup. The resulting behavior is pretty bizarre. If you take a plain-format backup using pg_basebackup -Fp, then the files in the in-place tablespace are backed up, but

Re: SQL/JSON revisited

2023-03-08 Thread Andrew Dunstan
On 2023-03-05 Su 22:18, Amit Langote wrote: On Tue, Feb 28, 2023 at 8:36 PM Amit Langote wrote: On Mon, Feb 27, 2023 at 4:45 PM Amit Langote wrote: On Tue, Feb 21, 2023 at 2:25 AM Andres Freund wrote: Evaluating N expressions for a json table isn't a good approach, both memory and CPU

  1   2   >