RE: [PATCH] fix msvc build libpq error LNK2019 when link openssl;

2023-02-26 Thread gamefunc
sorry i should have made it clear – I am only reporting my build error issue; the patch is only for illustrative purpose, not for merging to upstream; And my English is not good, so I can only write simple descriptions; >> This diff forces the creation of a VS2022Solution(): yes, my env: vs2022,

Re: pg_rewind: warn when checkpoint hasn't happened after promotion

2023-02-26 Thread Heikki Linnakangas
On 16/11/2022 07:17, kuroda.keis...@nttcom.co.jp wrote: The issue here is pg_rewind looks into control file to determine the soruce timeline, because the control file is not updated until the first checkpoint ends after promotion finishes, even though file blocks are already diverged. Even in

Re: Allow tests to pass in OpenSSL FIPS mode

2023-02-26 Thread Peter Eisentraut
On 27.02.23 08:16, Michael Paquier wrote: On Thu, Oct 13, 2022 at 01:16:18PM +0200, Alvaro Herrera wrote: However, there are some changes in brin_multi.out that are quite surprising and suggest that we might have bugs in brin: +WARNING: unexpected number of results 31 for

Re: Allow tests to pass in OpenSSL FIPS mode

2023-02-26 Thread Michael Paquier
On Thu, Oct 13, 2022 at 01:16:18PM +0200, Alvaro Herrera wrote: > However, there are some changes in brin_multi.out that are quite > surprising and suggest that we might have bugs in brin: > > +WARNING: unexpected number of results 31 for > (macaddr8col,>,macaddr8,b1:d1:0e:7b:af:a4:42:12,33) >

Re: Raising the SCRAM iteration count

2023-02-26 Thread Michael Paquier
On Thu, Feb 23, 2023 at 03:10:05PM +0100, Daniel Gustafsson wrote: > In fixing the CFBot test error in the previous version I realized through > off-list discussion that the GUC name was badly chosen. Incorporating the > value of another GUC in the name is a bad idea, so the attached version >

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

2023-02-26 Thread Önder Kalacı
Hi Amit, all Wouldn't a table-level option like 'apply_index_scan' be better than a > subscription-level option with a default value as false? Anyway, the > bigger point is that we don't see a better way to proceed here than to > introduce some option to control this behavior. > What would be a

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

2023-02-26 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > I was trying to think if there is any better way to implement the > newly added callback (WalSndDelay()) but couldn't find any. For > example, one idea I tried to evaluate is whether we can merge it with > the existing callback WalSndUpdateProgress() or maybe extract the part > other

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

2023-02-26 Thread Amit Kapila
On Mon, Feb 27, 2023 at 11:11 AM Masahiko Sawada wrote: > > On Thu, Feb 23, 2023 at 9:10 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Thank you for reviewing! PSA new version. > > > > > > Thank you for updating the patch. Here are some comments on v7 patch: > > + * > + *

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

2023-02-26 Thread Amit Kapila
On Thu, Feb 23, 2023 at 5:40 PM Hayato Kuroda (Fujitsu) wrote: > > Thank you for reviewing! PSA new version. > I was trying to think if there is any better way to implement the newly added callback (WalSndDelay()) but couldn't find any. For example, one idea I tried to evaluate is whether we can

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-02-26 Thread torikoshia
On 2023-02-06 15:00, Tom Lane wrote: Andres Freund writes: On February 5, 2023 9:12:17 PM PST, Tom Lane wrote: Damir Belyalov writes: InputFunctionCallSafe() is good for detecting errors from input-functions but there are such errors from NextCopyFrom () that can not be detected with

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

2023-02-26 Thread Masahiko Sawada
On Thu, Feb 23, 2023 at 9:10 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Shi, > > Thank you for reviewing! PSA new version. > > > + elog(DEBUG2, "time-delayed replication for txid %u, delay_time > > = %d ms, remaining wait time: %ld ms", > > + ctx->write_xid, (int)

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-26 Thread Amit Kapila
On Fri, Feb 17, 2023 at 7:44 PM Drouvot, Bertrand wrote: > > On 2/16/23 1:26 PM, Drouvot, Bertrand wrote: > > Hi, > > > > On 2/16/23 12:00 PM, Amit Kapila wrote: > > > >> BTW, feel free to create the second patch > >> (to align the types for variables/arguments) as that would be really > >>

Re: [PATCH] fix msvc build libpq error LNK2019 when link openssl;

2023-02-26 Thread Michael Paquier
On Mon, Feb 27, 2023 at 09:58:28AM +0800, gamefunc wrote: > # I: > (default target) (1) - (Link target) - > libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: > __imp_CertOpenStore, capi_open_store > libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: >

Re: psql \watch 2nd argument: iteration count

2023-02-26 Thread Andrey Borodin
Thanks for looking into this! On Mon, Feb 20, 2023 at 6:15 PM Kyotaro Horiguchi wrote: > > FWIW the patch still accepts an incorrect parameter '1abc' > by ignoring any trailing garbage. Indeed, fixed. > > In any case, I reckon the error message should be more specific. In > other words, it

Re: Add LZ4 compression in pg_dump

2023-02-26 Thread Justin Pryzby
On Sat, Feb 25, 2023 at 08:05:53AM -0600, Justin Pryzby wrote: > On Fri, Feb 24, 2023 at 11:02:14PM -0600, Justin Pryzby wrote: > > I have some fixes (attached) and questions while polishing the patch for > > zstd compression. The fixes are small and could be integrated with the > > patch for

Re: Proposal: :SQL_EXEC_TIME (like :ROW_COUNT) Variable (psql)

2023-02-26 Thread Pavel Stehule
po 27. 2. 2023 v 5:08 odesílatel Kirk Wolak napsal: > On Fri, Feb 24, 2023 at 10:56 PM Kirk Wolak wrote: > >> On Fri, Feb 24, 2023 at 2:11 AM Gurjeet Singh wrote: >> >>> On Thu, Feb 23, 2023 at 8:42 PM Kirk Wolak wrote: >>> >> ... > >> > I think like ROW_COUNT, it should not change because

Re: Proposal: :SQL_EXEC_TIME (like :ROW_COUNT) Variable (psql)

2023-02-26 Thread Kirk Wolak
On Fri, Feb 24, 2023 at 10:56 PM Kirk Wolak wrote: > On Fri, Feb 24, 2023 at 2:11 AM Gurjeet Singh wrote: > >> On Thu, Feb 23, 2023 at 8:42 PM Kirk Wolak wrote: >> > ... > > I think like ROW_COUNT, it should not change because of internal >> commands. >> ... > > By using \timing, the user

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

2023-02-26 Thread Jeff Davis
On Sun, 2023-02-26 at 09:57 -0800, Andres Freund wrote: > If you tell meson where to find the pkg-config file in those > directories it'd > also work. -Dpkg_config_path=... Setup is able to find it, which is good, but it seems like it's not adding it to RPATH so it's not working. I think we need

Re: What's the prefix?

2023-02-26 Thread Tom Lane
"jack...@gmail.com" writes: >> text is variable length so there is header information built into the >> datatype representation that indicates how long the content is. David's statement is accurate. > No, this is the varlena struct: > struct varlena > { > char vl_len_[4]; /* Do not touch this

Re: Re: What's the prefix?

2023-02-26 Thread jack...@gmail.com
From: David G. Johnston Date: 2023-02-27 00:27 To: jack...@gmail.com CC: pgsql-hackers Subject: Re: What's the prefix? On Sun, Feb 26, 2023 at 9:16 AM jack...@gmail.com wrote: use these sqls: create table t(a text); insert into t values('a'); select lp,lp_len,t_data from

Re: meson vs make: missing/inconsistent ENV

2023-02-26 Thread Justin Pryzby
On Sun, Feb 26, 2023 at 03:21:04PM -0800, Andres Freund wrote: > > Is there any consideration of promoting these or other warnings to > > fatal? > > You mean the perl warnings? Yes - it'd be nice if the warnings caused an obvious failure to allow addressing the issue. I noticed the icu warning

[PATCH] fix msvc build libpq error LNK2019 when link openssl;

2023-02-26 Thread gamefunc
# I: (default target) (1) - (Link target) - libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: __imp_CertOpenStore?? capi_open_store libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: __imp_CertCloseStore?? capi_find_key

Re: Doc update for pg_stat_statements normalization

2023-02-26 Thread Michael Paquier
On Sat, Feb 25, 2023 at 01:59:04PM +, Imseih (AWS), Sami wrote: > The overhead of storing this additional private data for the life of the query > execution may not be desirable. Okay, but why? > I think we also will need to copy the > private data to QueryDesc as well to make it available

Provide PID data for "cannot wait on a latch owned by another process" in latch.c

2023-02-26 Thread Michael Paquier
Hi all, While doing something I should not have done, I have been able to trigger latch.c with the error of $subject. Adding in the elog generated some information about the PID owning the latch and MyProcPid has made me understand immediately why I was wrong. Would there be any objections to

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-02-26 Thread Melanie Plageman
On Wed, Feb 22, 2023 at 8:04 AM Melih Mutlu wrote: > > Hi Wang, > > Thanks for reviewing. > Please see updated patches. [1] This is cool! Thanks for working on this. I had a chance to review your patchset and I had some thoughts and questions. I notice that you've added a new user-facing option

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Tom Lane
Andres Freund writes: > Not that I understand why that tries to terminate connections, instead of just > looking at application name. The test is trying to verify the application name reported by the "remote" session, which isn't constant, so we can't just do "select application_name from

Re: meson vs make: missing/inconsistent ENV

2023-02-26 Thread Andres Freund
Hi, On 2023-02-26 16:52:39 -0600, Justin Pryzby wrote: > I noticed warnings: > Use of uninitialized value $ENV{"with_icu"} in string eq at > /home/pryzbyj/src/postgres/src/bin/pg_dump/t/002_pg_dump.pl line 56. > > and looked through: git grep ^export '*/Makefile' > > and found that: >

RE: Allow logical replication to copy tables in binary format

2023-02-26 Thread Takamichi Osumi (Fujitsu)
On Monday, February 20, 2023 8:47 PM Melih Mutlu wrote: > Thanks for letting me know. > Attached the fixed version of the patch. Hi, Melih Thanks for updating the patch. Minor comments on v9. (1) commit message "The patch introduces a new parameter, copy_format, to CREATE SUBSCRIPTION to

meson vs make: missing/inconsistent ENV

2023-02-26 Thread Justin Pryzby
I noticed warnings: Use of uninitialized value $ENV{"with_icu"} in string eq at /home/pryzbyj/src/postgres/src/bin/pg_dump/t/002_pg_dump.pl line 56. and looked through: git grep ^export '*/Makefile' and found that: src/bin/pg_dump/meson.build is missing with_icu since 396d348b0 Also, e6927270c

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Melanie Plageman
On Sun, Feb 26, 2023 at 04:11:45PM -0500, Melanie Plageman wrote: > On Sun, Feb 26, 2023 at 12:33:03PM -0800, Andres Freund wrote: > > On 2023-02-26 15:08:33 -0500, Tom Lane wrote: > > > Andres Freund writes: > > > > They're all animals for testing older LLVM versions. They're using > > > >

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Melanie Plageman
On Sun, Feb 26, 2023 at 12:33:03PM -0800, Andres Freund wrote: > On 2023-02-26 15:08:33 -0500, Tom Lane wrote: > > Andres Freund writes: > > > They're all animals for testing older LLVM versions. They're using > > > pretty old clang versions. phycodurus and dragonet are clang 3.9, > > > petalura

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Andres Freund
Hi, On 2023-02-26 15:57:01 -0500, Tom Lane wrote: > However, the other stanza with debug_discard_caches muckery is the > one about "test postgres_fdw.application_name GUC", and in that case > ignoring the number of terminated connections would destroy the > point of the test entirely; because

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Tom Lane
I wrote: > I'm inclined to think we should indeed just nuke that test. It's > overcomplicated and it expends a lot of test cycles on a pretty > marginal feature. Perhaps a better idea: at the start of the test, set postgres_fdw.application_name to something that exercises all the available

Re: WIN32 pg_import_system_collations

2023-02-26 Thread Andrew Dunstan
On 2023-01-03 Tu 08:48, Peter Eisentraut wrote: On 09.12.22 13:48, Juan José Santamaría Flecha wrote: On Thu, Dec 1, 2022 at 8:46 AM Peter Eisentraut > wrote:     What is the status of this now?  I think the other issue has been     addressed?

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Tom Lane
Andres Freund writes: > Hm, yea, that should work. It's indeed the entirety of the diff > https://api.cirrus-ci.com/v1/artifact/task/4718859714822144/testrun/build/testrun/postgres_fdw-running/regress/regression.diffs > If we go that way we can remove the debug_discard muckery as well, I think?

Re: meson logs environment

2023-02-26 Thread Andrew Dunstan
On 2023-02-26 Su 12:59, Andres Freund wrote: Hi, On 2023-02-20 20:47:59 -0500, Andrew Dunstan wrote: I've noticed that `meson test` logs the complete environment in meson_logs/testlog.txt. That seems unnecessary and probably undesirable for the buildfarm client. It doesn't seem unnecessary

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Tom Lane
Andres Freund writes: > On 2023-02-26 14:51:45 -0500, Tom Lane wrote: >> If that's the only diff, we could just hide it, say by writing > Hm, yea, that should work. It's indeed the entirety of the diff >

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Andres Freund
On 2023-02-26 15:08:33 -0500, Tom Lane wrote: > Andres Freund writes: > > They're all animals for testing older LLVM versions. They're using > > pretty old clang versions. phycodurus and dragonet are clang 3.9, petalura > > and > > desmoxytes is clang 4, idiacanthus and pogona are clang 5. > >

Re: stopgap fix for signal handling during restore_command

2023-02-26 Thread Andres Freund
Hi, On 2023-02-26 11:39:00 -0800, Nathan Bossart wrote: > On Sun, Feb 26, 2023 at 10:00:29AM -0800, Andres Freund wrote: > > On 2023-02-25 14:06:29 -0800, Nathan Bossart wrote: > >> On Sat, Feb 25, 2023 at 11:52:53AM -0800, Andres Freund wrote: > >> > I think I opined on this before, but we

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Tom Lane
Andres Freund writes: > They're all animals for testing older LLVM versions. They're using > pretty old clang versions. phycodurus and dragonet are clang 3.9, petalura and > desmoxytes is clang 4, idiacanthus and pogona are clang 5. [ shrug ... ] If I thought this was actually good code, I

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Andres Freund
Hi, On 2023-02-26 14:51:45 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-12-08 16:15:11 -0800, Andres Freund wrote: > >> The most frequent case is postgres_fdw, which somewhat regularly fails > >> with a > >> regression.diff like this: > >> WHERE application_name =

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Andres Freund
Hi, On 2023-02-26 14:40:00 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2023-02-26 13:20:00 -0500, Tom Lane wrote: > >> I hadn't run my buildfarm-compile-warning scraper for a little while, > >> but I just did, and I find that this commit is causing warnings on > >> no fewer than 14

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Tom Lane
Andres Freund writes: > On 2022-12-08 16:15:11 -0800, Andres Freund wrote: >> The most frequent case is postgres_fdw, which somewhat regularly fails with a >> regression.diff like this: >> WHERE application_name = 'fdw_retry_check'; >> pg_terminate_backend >> -- >> - t >> -(1

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-26 Thread Andres Freund
Hi, On 2022-12-08 16:15:11 -0800, Andres Freund wrote: > The most frequent case is postgres_fdw, which somewhat regularly fails with a > regression.diff like this: > > diff -U3 /tmp/cirrus-ci-build/contrib/postgres_fdw/expected/postgres_fdw.out >

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Tom Lane
Andres Freund writes: > On 2023-02-26 13:20:00 -0500, Tom Lane wrote: >> I hadn't run my buildfarm-compile-warning scraper for a little while, >> but I just did, and I find that this commit is causing warnings on >> no fewer than 14 buildfarm animals. They all look like > What other animals? If

Re: stopgap fix for signal handling during restore_command

2023-02-26 Thread Nathan Bossart
On Sun, Feb 26, 2023 at 10:00:29AM -0800, Andres Freund wrote: > On 2023-02-25 14:06:29 -0800, Nathan Bossart wrote: >> On Sat, Feb 25, 2023 at 11:52:53AM -0800, Andres Freund wrote: >> > I think I opined on this before, but we really ought to have a function to >> > do >> > some minimal signal

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Andres Freund
Hi, On 2023-02-26 13:20:00 -0500, Tom Lane wrote: > Andres Freund writes: > > Pushed the first (and biggest) commit. More tomorrow. > > I hadn't run my buildfarm-compile-warning scraper for a little while, > but I just did, and I find that this commit is causing warnings on > no fewer than 14

Re: logical decoding and replication of sequences, take 2

2023-02-26 Thread Jonathan S. Katz
On 2/23/23 7:56 AM, Tomas Vondra wrote: On 2/22/23 18:04, Jonathan S. Katz wrote: On 2/22/23 5:02 AM, Tomas Vondra wrote: Interestingly, in systems that tend to have higher rates of failover (I'm thinking of a few distributed systems), this may cause int4 sequences to exhaust numbers

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Tom Lane
I wrote: > The issue seems to be that code like this: > ... > is far too cute for its own good. Oh, there's another thing here that qualifies as too-cute: loops like for (IOObject io_object = IOOBJECT_FIRST; io_object < IOOBJECT_NUM_TYPES; io_object++) make it look like we could

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-26 Thread Tom Lane
Andres Freund writes: > Pushed the first (and biggest) commit. More tomorrow. I hadn't run my buildfarm-compile-warning scraper for a little while, but I just did, and I find that this commit is causing warnings on no fewer than 14 buildfarm animals. They all look like ayu |

Re: stopgap fix for signal handling during restore_command

2023-02-26 Thread Andres Freund
Hi, On 2023-02-25 14:06:29 -0800, Nathan Bossart wrote: > On Sat, Feb 25, 2023 at 11:52:53AM -0800, Andres Freund wrote: > > I think I opined on this before, but we really ought to have a function to > > do > > some minimal signal safe output. Implemented centrally, instead of being > > open >

Re: meson logs environment

2023-02-26 Thread Andres Freund
Hi, On 2023-02-20 20:47:59 -0500, Andrew Dunstan wrote: > I've noticed that `meson test` logs the complete environment in > meson_logs/testlog.txt. That seems unnecessary and probably undesirable for > the buildfarm client. It doesn't seem unnecessary to me, at all. It's what you need to rerun

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

2023-02-26 Thread Andres Freund
Hi, On 2023-02-22 10:26:23 -0800, Jeff Davis wrote: > I attached a simple patch that allows meson to find ICU in a non- > standard location if if you specify -Dextra_lib_dirs and > -Dextra_include_dirs. If you tell meson where to find the pkg-config file in those directories it'd also work.

Re: windows/meson cfbot warnings

2023-02-26 Thread Andres Freund
Hi, On 2023-02-25 16:45:38 -0600, Justin Pryzby wrote: > Unrelated, but something else changed and now there's this. > > https://cirrus-ci.com/task/6202242768830464 > > [20:10:34.310] c:\cirrus>call sh -c 'if grep ": warning " build.txt; then > exit 1; fi; exit 0' > [20:10:34.397]

Re: What's the prefix?

2023-02-26 Thread David G. Johnston
On Sun, Feb 26, 2023 at 9:16 AM jack...@gmail.com wrote: > use these sqls: > create table t(a text); > insert into t values('a'); > select lp,lp_len,t_data from heap_page_items(get_raw_page('t',0)); > lp | lp_len | t_data > ++ > 1 | 26 | \x0561 > as you can see, the 61

What's the prefix?

2023-02-26 Thread jack...@gmail.com
use these sqls: create table t(a text); insert into t values('a'); select lp,lp_len,t_data from heap_page_items(get_raw_page('t',0)); lp | lp_len | t_data ++ 1 | 26 | \x0561 as you can see, the 61 is 'a', so what's the 05??? strange. jack...@gmail.com

Track IO times in pg_stat_io

2023-02-26 Thread Melanie Plageman
Hi, As suggested in [1], the attached patch adds IO times to pg_stat_io; I added docs but haven't added any tests. The timings will only be non-zero when track_io_timing is on, and I only see tests with track IO timing on in explain.sql and the IO timings I added to pg_stat_io would not be

Re: Re: Give me more details of some bits in infomask!!

2023-02-26 Thread David G. Johnston
On Sun, Feb 26, 2023 at 8:36 AM jack...@gmail.com wrote: > > CID means "command ID" i.e. sequential ID assigned to commands in a > > single session (for visibility checks, so that a query doesn't see data > > deleted by earlier commands in the same session). See > >

Re: Re: Why the lp_len is 28 not 32?

2023-02-26 Thread David G. Johnston
On Sun, Feb 26, 2023 at 8:11 AM jack...@gmail.com wrote: > > *From:* Tomas Vondra > > > +++ > > 1 | 8160 | 28 | \x0100 > > > > > Pretty sure this is because we align the

Re: Re: Give me more details of some bits in infomask!!

2023-02-26 Thread jack...@gmail.com
From: Tomas Vondra Date: 2023-02-26 23:23 To: jack...@gmail.com; pgsql-hackers Subject: Re: Give me more details of some bits in infomask!! On 2/26/23 15:30, jack...@gmail.com wrote: > here are the source codes from src/include/access/htup_details.h. > /* > * information stored in t_infomask: >

Re: Why the lp_len is 28 not 32?

2023-02-26 Thread Tomas Vondra
On 2/26/23 16:11, jack...@gmail.com wrote: > > yes, So it should be 32 bytes not 28bytes, but the sql result is 28 > !! that's false No. The tuple is 28 bytes long, and that's what's stored in lp_len. But we align the start of the tuple to a multiple of 8 bytes. So it's at

Re: Give me more details of some bits in infomask!!

2023-02-26 Thread Tomas Vondra
On 2/26/23 15:30, jack...@gmail.com wrote: > here are the source codes from src/include/access/htup_details.h. > /* >  * information stored in t_infomask: >  */ > #define HEAP_HASNULL0x0001/* has null attribute(s) */ > #define HEAP_HASVARWIDTH0x0002/* has variable-width attribute(s) */ > #define

Re: Re: Why the lp_len is 28 not 32?

2023-02-26 Thread jack...@gmail.com
From: Tomas Vondra Date: 2023-02-26 23:07 To: jack...@gmail.com; pgsql-hackers Subject: Re: Why the lp_len is 28 not 32? On 2/26/23 15:35, jack...@gmail.com wrote: > use these sqls below: > create table t(a int); > insert into t values(1); > select lp,lp_off,lp_len,t_data from

Re: Why the lp_len is 28 not 32?

2023-02-26 Thread Tomas Vondra
On 2/26/23 15:35, jack...@gmail.com wrote: > use these sqls below: > create table t(a int); > insert into t values(1); > select lp,lp_off,lp_len,t_data from heap_page_items(get_raw_page('t',0)); >  lp | lp_off | lp_len |   t_data    > +++ >   1 |   8160 |     28 |

Re: Add LZ4 compression in pg_dump

2023-02-26 Thread Tomas Vondra
On 2/25/23 06:02, Justin Pryzby wrote: > I have some fixes (attached) and questions while polishing the patch for > zstd compression. The fixes are small and could be integrated with the > patch for zstd, but could be applied independently. > > - I'm unclear about get_error_func(). That's

Why the lp_len is 28 not 32?

2023-02-26 Thread jack...@gmail.com
use these sqls below: create table t(a int); insert into t values(1); select lp,lp_off,lp_len,t_data from heap_page_items(get_raw_page('t',0)); lp | lp_off | lp_len | t_data +++ 1 | 8160 | 28 | \x0100

Give me more details of some bits in infomask!!

2023-02-26 Thread jack...@gmail.com
here are the source codes from src/include/access/htup_details.h. /* * information stored in t_infomask: */ #define HEAP_HASNULL 0x0001 /* has null attribute(s) */ #define HEAP_HASVARWIDTH 0x0002 /* has variable-width attribute(s) */ #define HEAP_HASEXTERNAL 0x0004 /* has external stored

Re: locale/encoding vs vcregress.pl installcheck

2023-02-26 Thread Andrew Dunstan
On 2023-02-25 Sa 12:13, Andrew Dunstan wrote: vcregress's installcheck_internal has "--encoding=SQL_ASCII --no-locale" hardcoded. It's been like that for a long time, for no good reason that I can see. The practical effect is to make it well nigh impossible to run the regular regression

Re: pg_stat_statements and "IN" conditions

2023-02-26 Thread Dmitry Dolgov
> On Thu, Feb 23, 2023 at 09:48:35AM +0100, David Geier wrote: > Hi, > > > > Seems like supporting only constants is a good starting > > > point. The only thing that is likely confusing for users is that NUMERICs > > > (and potentially constants of other types) are unsupported. Wouldn't it be > >

Re: MERGE ... RETURNING

2023-02-26 Thread Dean Rasheed
On Fri, 24 Feb 2023 at 05:46, Dean Rasheed wrote: > > Rebased version attached. > Another rebase. Regards, Dean diff --git a/doc/src/sgml/dml.sgml b/doc/src/sgml/dml.sgml new file mode 100644 index cbbc5e2..ff2a827 --- a/doc/src/sgml/dml.sgml +++ b/doc/src/sgml/dml.sgml @@ -283,10 +283,15 @@

Re: Doc updates for MERGE

2023-02-26 Thread Dean Rasheed
On Fri, 24 Feb 2023 at 09:28, Dean Rasheed wrote: > > On Fri, 24 Feb 2023 at 08:56, Alvaro Herrera wrote: > > > > I assume you're proposing to back-patch this. > > Yes. Will do. > Done. Regards, Dean