Re: pgsql: Add option to use ICU as global locale provider

2022-03-17 Thread Julien Rouhaud
On Fri, Mar 18, 2022 at 06:15:47PM +1300, Thomas Munro wrote: > > No idea what's happening here but one observation is that that animal > is running an older distro that shipped with ICU 5.0. Commit b8f9a2a6 > may hold a clue... Right. I'm setting up a similar podman environment, hopefully more

Re: pgsql: Fix row filters with multiple publications

2022-03-17 Thread Amit Kapila
On Fri, Mar 18, 2022 at 12:45 AM Tomas Vondra wrote: > > Hmm, this seems to have failed on wrasse [1], due to a timeout when > waiting for tablesync to complete: > > 2022-03-17 17:39:28.247 CET [19962:1] LOG: logical replication table > synchronization worker for subscription "sub2", table "tab1"

pgsql: Add circular WAL decoding buffer, take II.

2022-03-17 Thread Thomas Munro
Add circular WAL decoding buffer, take II. Teach xlogreader.c to decode the WAL into a circular buffer. This will support optimizations based on looking ahead, to follow in a later commit. * XLogReadRecord() works as before, decoding records one by one, and allowing them to be examined via t

Re: pgsql: Add option to use ICU as global locale provider

2022-03-17 Thread Thomas Munro
On Fri, Mar 18, 2022 at 4:12 PM Julien Rouhaud wrote: > On Fri, Mar 18, 2022 at 11:01:11AM +0900, Michael Paquier wrote: > > FYI, prion is complaining here: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2022-03-18%2001%3A43%3A13 > > > > Some details: > > # Failed test 'fai

Re: pgsql: Add option to use ICU as global locale provider

2022-03-17 Thread Julien Rouhaud
Hi, On Fri, Mar 18, 2022 at 11:01:11AM +0900, Michael Paquier wrote: > > FYI, prion is complaining here: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2022-03-18%2001%3A43%3A13 > > Some details: > # Failed test 'fails for invalid ICU locale: matches' > # at t/001_initdb.p

Re: pgsql: Add option to use ICU as global locale provider

2022-03-17 Thread Michael Paquier
Hi Peter, On Thu, Mar 17, 2022 at 10:22:32AM +, Peter Eisentraut wrote: > Add option to use ICU as global locale provider > > This adds the option to use ICU as the default locale provider for > either the whole cluster or a database. New options for initdb, > createdb, and CREATE DATABASE a

pgsql: Fix header inclusion order in pg_receivewal.c

2022-03-17 Thread Michael Paquier
Fix header inclusion order in pg_receivewal.c lz4frame.h was getting declared after the headers specific to Postgres, but it needs to be included between postgres_fe.h and the internal headers. Issue introduced by ba5. Reported-by: Justin Prysby Discussion: https://postgr.es/m/20220317111220

pgsql: Declare aarch64 has single copy atomicity for 8 byte values.

2022-03-17 Thread Thomas Munro
Declare aarch64 has single copy atomicity for 8 byte values. Architecture Reference Manual for ARMv8 B2.2.1 [1] For explicit memory effects generated from an Exception level the following rules apply: - A read that is generated by a load instruction that loads a single general-purpose register an

pgsql: Don't bother to attach column name lists to RowExprs of named ty

2022-03-17 Thread Tom Lane
Don't bother to attach column name lists to RowExprs of named types. If a RowExpr is marked as returning a named composite type, we aren't going to consult its colnames list; we'll use the attribute names shown for the type in pg_attribute. Hence, skip storing that list, to save a few nanoseconds

pgsql: Revert applying column aliases to the output of whole-row Vars.

2022-03-17 Thread Tom Lane
Revert applying column aliases to the output of whole-row Vars. In commit bf7ca1587, I had the bright idea that we could make the result of a whole-row Var (that is, foo.*) track any column aliases that had been applied to the FROM entry the Var refers to. However, that's not terribly logically c

pgsql: Revert applying column aliases to the output of whole-row Vars.

2022-03-17 Thread Tom Lane
Revert applying column aliases to the output of whole-row Vars. In commit bf7ca1587, I had the bright idea that we could make the result of a whole-row Var (that is, foo.*) track any column aliases that had been applied to the FROM entry the Var refers to. However, that's not terribly logically c

pgsql: Revert applying column aliases to the output of whole-row Vars.

2022-03-17 Thread Tom Lane
Revert applying column aliases to the output of whole-row Vars. In commit bf7ca1587, I had the bright idea that we could make the result of a whole-row Var (that is, foo.*) track any column aliases that had been applied to the FROM entry the Var refers to. However, that's not terribly logically c

pgsql: Revert applying column aliases to the output of whole-row Vars.

2022-03-17 Thread Tom Lane
Revert applying column aliases to the output of whole-row Vars. In commit bf7ca1587, I had the bright idea that we could make the result of a whole-row Var (that is, foo.*) track any column aliases that had been applied to the FROM entry the Var refers to. However, that's not terribly logically c

pgsql: Revert applying column aliases to the output of whole-row Vars.

2022-03-17 Thread Tom Lane
Revert applying column aliases to the output of whole-row Vars. In commit bf7ca1587, I had the bright idea that we could make the result of a whole-row Var (that is, foo.*) track any column aliases that had been applied to the FROM entry the Var refers to. However, that's not terribly logically c

pgsql: Revert applying column aliases to the output of whole-row Vars.

2022-03-17 Thread Tom Lane
Revert applying column aliases to the output of whole-row Vars. In commit bf7ca1587, I had the bright idea that we could make the result of a whole-row Var (that is, foo.*) track any column aliases that had been applied to the FROM entry the Var refers to. However, that's not terribly logically c

Re: pgsql: Fix row filters with multiple publications

2022-03-17 Thread Tomas Vondra
On 3/17/22 20:15, Tomas Vondra wrote: > Hmm, this seems to have failed on wrasse [1], due to a timeout when > waiting for tablesync to complete: > > 2022-03-17 17:39:28.247 CET [19962:1] LOG: logical replication table > synchronization worker for subscription "sub2", table "tab1" has started > 20

Re: pgsql: Fix row filters with multiple publications

2022-03-17 Thread Tomas Vondra
Hmm, this seems to have failed on wrasse [1], due to a timeout when waiting for tablesync to complete: 2022-03-17 17:39:28.247 CET [19962:1] LOG: logical replication table synchronization worker for subscription "sub2", table "tab1" has started 2022-03-17 17:39:28.258 CET [19964:1] LOG: logical

pgsql: Refactor code for reading and writing relation map files.

2022-03-17 Thread Robert Haas
Refactor code for reading and writing relation map files. Restructure things so that the functions which update the global variables shared_map and local_map are separate from the functions which just read and write relation map files without touching any global variables. In the new structure of

pgsql: Fix row filters with multiple publications

2022-03-17 Thread Tomas Vondra
Fix row filters with multiple publications When publishing changes through a artition root, we should use the row filter for the top-most ancestor. The relation may be added to multiple publications, using different ancestors, and 52e4f0cd47 handled this incorrectly. With c91f71b9dc we find the co

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-17 Thread Robert Haas
On Tue, Mar 15, 2022 at 3:04 PM Andres Freund wrote: > Seems like this ought to have at least some basic test to make sure it > actually works / keeps working? Wouldn't hurt, although it may be a little bit tricky to getting it work portably. I'll try to take a look at it. -- Robert Haas EDB: h

pgsql: doc: Add documentation for new field pg_database.daticulocale

2022-03-17 Thread Peter Eisentraut
doc: Add documentation for new field pg_database.daticulocale forgotten in f2553d43060edb210b36c63187d52a632448e1d2 Author: Shinoda, Noriyoshi (PN Japan FSIP) Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a9b7e92084cdea1bd397ec26c3233206932f29c7 Modified Files

pgsql: Split ExecUpdate and ExecDelete into reusable pieces

2022-03-17 Thread Alvaro Herrera
Split ExecUpdate and ExecDelete into reusable pieces Create subroutines ExecUpdatePrologue / ExecUpdateAct / ExecUpdateEpilogue, and similar for ExecDelete. Introduce a new struct to be used internally in nodeModifyTable.c, dubbed ModifyTableContext, which contains all context information needed

pgsql: Add option to use ICU as global locale provider

2022-03-17 Thread Peter Eisentraut
Add option to use ICU as global locale provider This adds the option to use ICU as the default locale provider for either the whole cluster or a database. New options for initdb, createdb, and CREATE DATABASE are used to select this. Since some (legacy) code still uses the libc locale facilities