Re: Add last commit LSN to pg_last_committed_xact()

2022-01-18 Thread Andres Freund
Hi, On 2022-01-18 20:58:01 -0500, James Coleman wrote: > Is something roughly like the attached what you'd envisioned? Roughly, yea. > I think we need a shared ProcArrayLock to read the array, correct? You could perhaps get away without it, but it'd come at the price of needing to look at all

Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back

2022-01-18 Thread Robert Haas
On Tue, Jan 18, 2022 at 8:55 PM Robert Haas wrote: > Ah, I guess I copied and pasted the options wrong, or something. > Anyway, I have an idea how to fix this. I didn't realize that we were > going to read from the bbsink's buffer like this, and it's not > properly aligned for that. I'll jigger th

Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back

2022-01-18 Thread Tom Lane
Robert Haas writes: > Here's a patch, based in part on some off-list discussion with Andres. > I believe Andres has already confirmed that this fix works, but it > wouldn't hurt if Tom wants to verify it also. WFM too --- at least, pg_basebackup's "make check" passes now.

Re: A qsort template

2022-01-18 Thread John Naylor
I wrote: > That said, I think what I'll do next is test the v3-0001 standalone > patch with tuplesort specializations for more data types. I already > have a decent test script that I can build on for this. I've run a test with 10 million records using all types found in the v3 patch "accelerate

Re: Adding CI to our tree

2022-01-18 Thread Tom Lane
I just found one thing making check-world slower than it ought to be: src/test/recovery/t/008_fsm_truncation.pl does $node_primary->append_conf( 'postgresql.conf', qq{ fsync = on wal_log_hints = on max_prepared_transactions = 5 autovacuum = off }); There is no reason for this script to be

Re: A qsort template

2022-01-18 Thread Peter Geoghegan
On Tue, Jan 18, 2022 at 6:39 PM John Naylor wrote: > Editorializing the null position in queries is not very common in my > experience. Not null is interesting since it'd be trivial to pass > constant false to the same Apply[XYZ]SortComparator() and let the > compiler remove all those branches for

RE: Skipping logical replication transactions on subscriber side

2022-01-18 Thread osumi.takami...@fujitsu.com
On Tuesday, January 18, 2022 3:05 PM Masahiko Sawada wrote: > I've attached a rebased patch. Thank you for your rebase ! Several review comments on v8. (1) doc/src/sgml/logical-replication.sgml + + + To resolve conflicts, you need to consider changing the data on the subscriber so + tha

Re: docs: pg_replication_origin_oid() description does not match behaviour

2022-01-18 Thread Ian Lawrence Barwick
2022年1月19日(水) 10:40 Michael Paquier : > > On Tue, Jan 18, 2022 at 06:20:22PM +, Bossart, Nathan wrote: > > +1 > > And done. Thanks! Ian Barwick -- EnterpriseDB: https://www.enterprisedb.com

Re: Adding CI to our tree

2022-01-18 Thread Andres Freund
Hi, On 2022-01-18 21:50:07 -0500, Tom Lane wrote: > I just found one thing making check-world slower than it ought to be: > src/test/recovery/t/008_fsm_truncation.pl does > > $node_primary->append_conf( > 'postgresql.conf', qq{ > fsync = on > wal_log_hints = on > max_prepared_transactions =

Re: Refactoring of compression options in pg_basebackup

2022-01-18 Thread Michael Paquier
On Tue, Jan 18, 2022 at 10:04:56AM -0500, Robert Haas wrote: > I think it could make sense for you implement > --compress=METHOD[:LEVEL], keeping -z and -Z N as synonyms for > --compress=gzip and --compress=gzip:N, and with --compress=N being > interpreted as --compress=gzip:N. Then I'll generalize

Re: [PATCH] reduce page overlap of GiST indexes built using sorted method

2022-01-18 Thread Andrey Borodin
> 19 янв. 2022 г., в 01:26, sergei sh. написал(а): > > Hi, > > I've addressed Andrey Borodin's concerns about v2 of this patch by Aliaksandr > Kalenik in attached version. Thank you! I'll make a new iteration of review. From a first glance everything looks good, but gist_sorted_build_page_

Re: Adding CI to our tree

2022-01-18 Thread Tom Lane
Andres Freund writes: > On 2022-01-18 21:50:07 -0500, Tom Lane wrote: >> There is no reason for this script to be overriding Cluster.pm's >> fsync = off setting. >> This appears to go back to 917dc7d23 of 2016, so I think it just >> predates our recognition that we should disable fsync in routine

Re: Map WAL segment files on PMEM as WAL buffers

2022-01-18 Thread Takashi Menjo
Hi Justin, I can reproduce the error you reported, with PMEM_IS_PMEM_FORCE=1. Moreover, I can reproduce it **on a real PMem device**. So the causes are in my patchset, not in PMem environment. I'll fix it in the next patchset version. Regards, Takashi -- Takashi Menjo

Re: Adding CI to our tree

2022-01-18 Thread Tom Lane
Andres Freund writes: > On 2022-01-18 21:50:07 -0500, Tom Lane wrote: >> This actually causes parallel check-world to fail altogether on florican's >> host, because the initial fsync of the recovered primary takes more than 3 >> minutes when there's conflicting I/O traffic, causing pg_ctl to time

Re: Make relfile tombstone files conditional on WAL level

2022-01-18 Thread Dilip Kumar
On Thu, Jan 6, 2022 at 7:22 PM Robert Haas wrote: > On Thu, Jan 6, 2022 at 3:47 AM Thomas Munro > wrote: > > Another problem is that relfilenodes are normally allocated with > > GetNewOidWithIndex(), and initially match a relation's OID. We'd need > > a new allocator, and they won't be able to

Re: Schema variables - new implementation for Postgres 15

2022-01-18 Thread Pavel Stehule
=# " >> CREATE COLLATION >> >> =# create variable myvariable text collate mycollation; >> CREATE VARIABLE >> >> =# select classid::regclass, objid, objsubid, refclassid::regclass, >> refobjid, refobjsubid from pg_depend where classid::regclass::text = >> 'pg_variable' or refclassid::regclass::text

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

2022-01-18 Thread Masahiko Sawada
On Fri, Jan 14, 2022 at 7:04 AM Bossart, Nathan wrote: > > On 1/13/22, 4:58 AM, "John Naylor" wrote: > > On Wed, Jan 12, 2022 at 12:26 PM Bossart, Nathan > > wrote: > >> As I've stated upthread, Sawada-san's suggested approach was my > >> initial reaction to this thread. I'm not wedded to the

Re: Skipping logical replication transactions on subscriber side

2022-01-18 Thread vignesh C
On Sat, Jan 15, 2022 at 3:58 PM Amit Kapila wrote: > > On Fri, Jan 14, 2022 at 5:35 PM vignesh C wrote: > > > > Thanks for the updated patch, few minor comments: > > 1) Should "SKIP" be "SKIP (" here: > > @@ -1675,7 +1675,7 @@ psql_completion(const char *text, int start, int end) > > /* A

Re: a misbehavior of partition row movement (?)

2022-01-18 Thread Amit Langote
On Wed, Jan 19, 2022 at 7:29 AM Alvaro Herrera wrote: > On 2022-Jan-18, Alvaro Herrera wrote: > > On 2022-Jan-18, Amit Langote wrote: > > > > > Would you like me to update the patch with the above renumbering or > > > are you working on a new version yourself? > > > > I have a few very minor chang

Re: Skipping logical replication transactions on subscriber side

2022-01-18 Thread Greg Nancarrow
On Tue, Jan 18, 2022 at 5:05 PM Masahiko Sawada wrote: > > I've attached a rebased patch. A couple of comments for the v8 patch: doc/src/sgml/logical-replication.sgml (1) Strictly-speaking it's the transaction, not transaction ID, that contains changes, so suggesting minor change: BEFORE: +

Re: Skipping logical replication transactions on subscriber side

2022-01-18 Thread Masahiko Sawada
On Wed, Jan 19, 2022 at 12:22 PM osumi.takami...@fujitsu.com wrote: > > On Tuesday, January 18, 2022 3:05 PM Masahiko Sawada > wrote: > > I've attached a rebased patch. > Thank you for your rebase ! > > Several review comments on v8. Thank you for the comments! > > (1) doc/src/sgml/logical-rep

Re: a misbehavior of partition row movement (?)

2022-01-18 Thread Amit Langote
On Wed, Jan 19, 2022 at 4:13 PM Amit Langote wrote: > On Wed, Jan 19, 2022 at 7:29 AM Alvaro Herrera > wrote: > > On 2022-Jan-18, Alvaro Herrera wrote: > > > On 2022-Jan-18, Amit Langote wrote: > > > > > > > Would you like me to update the patch with the above renumbering or > > > > are you work

<    1   2