Re: Building Postgres with lz4 on Visual Studio

2022-04-30 Thread Andres Freund
Hi, On 2022-04-29 08:50:56 -0400, Andrew Dunstan wrote: > I agree that we should use perl's -e to test that the files actually > exists. But I don't think we should try to adjust to everything the zstd > and lz4 people put in their release files. They are just horribly > inconsistent. Right now i

Re: bogus: logical replication rows/cols combinations

2022-04-30 Thread Alvaro Herrera
On 2022-Apr-30, Amit Kapila wrote: > I agree with throwing errors for obvious/known bogus cases but do we > want to throw errors or restrict the combining of column lists when > row filters are present in all cases? See some examples [1 ] where it > may be valid to combine them. I agree we should

Re: pgsql: Add contrib/pg_walinspect.

2022-04-30 Thread Jeff Davis
On Fri, 2022-04-29 at 10:46 +0530, Bharath Rupireddy wrote: > It's not just the flush ptr, without no wait mode, the functions > would > wait if start/input lsn is, say current flush lsn - 1 or 2 or more > (before the previous record) bytes. If the functions were to wait, by > how much time should

Re: Missing can't-assign-to-constant checks in plpgsql

2022-04-30 Thread Tom Lane
Pavel Stehule writes: > čt 28. 4. 2022 v 23:52 odesílatel Tom Lane napsal: >> Perhaps the OPEN change is a little too aggressive, since if >> you give the refcursor variable some non-null initial value, >> OPEN won't change it; in that usage a CONSTANT marking could >> be allowed. But I really s

Re: Switching XLog source from archive to streaming when primary available

2022-04-30 Thread Bharath Rupireddy
On Mon, Nov 29, 2021 at 1:30 AM SATYANARAYANA NARLAPURAM wrote: > > Hi Hackers, > > When the standby couldn't connect to the primary it switches the XLog source > from streaming to archive and continues in that state until it can get the > WAL from the archive location. On a server with high WAL

Re: Building Postgres with lz4 on Visual Studio

2022-04-30 Thread Andrew Dunstan
On 2022-04-29 Fr 08:50, Andrew Dunstan wrote: > What I did was to install the packages using vcpkg[1] which is a > standard framework created by Microsoft for installing package > libraries. It does install the .lib files in a sane place > (installdir/lib), but it doesn't use the lib suffix. Also

Re: Hash index build performance tweak from sorting

2022-04-30 Thread Amit Kapila
On Tue, Apr 19, 2022 at 3:05 AM Simon Riggs wrote: > > Hash index pages are stored in sorted order, but we don't prepare the > data correctly. > > We sort the data as the first step of a hash index build, but we > forget to sort the data by hash as well as by hash bucket. > I was looking into the

Re: bogus: logical replication rows/cols combinations

2022-04-30 Thread Amit Kapila
On Sat, Apr 30, 2022 at 3:01 PM Alvaro Herrera wrote: > > On 2022-Apr-30, Amit Kapila wrote: > > > On Sat, Apr 30, 2022 at 2:02 AM Tomas Vondra > > wrote: > > > > That seems to deal with a circular replication, i.e. two logical > > > replication links - a bit like a multi-master. Not sure how is

Re: bogus: logical replication rows/cols combinations

2022-04-30 Thread Alvaro Herrera
On 2022-Apr-30, Amit Kapila wrote: > On Sat, Apr 30, 2022 at 2:02 AM Tomas Vondra > wrote: > > That seems to deal with a circular replication, i.e. two logical > > replication links - a bit like a multi-master. Not sure how is that > > related to the issue we're discussing here? > > It is not d

Re: bogus: logical replication rows/cols combinations

2022-04-30 Thread Alvaro Herrera
On 2022-Apr-28, Tomas Vondra wrote: > Attached is a patch doing the same thing in tablesync. The overall idea > is to generate copy statement with CASE expressions, applying filters to > individual columns. For Alvaro's example, this generates something like > > SELECT > (CASE WHEN (a < 0)