Re: GIN pending list cleanup during autoanalyze blocks cleanup by VACUUM

2021-10-16 Thread Peter Geoghegan
On Thu, Oct 14, 2021 at 12:50 AM Masahiko Sawada wrote: > Looking at the original commit, as you mentioned, ISTM performing > pending list cleanup during (auto)analyze (and analyze_only) was > introduced to perform the pending list cleanup on insert-only tables. > Now that we have autovacuum_vacuu

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-16 Thread Japin Li
On Sat, 16 Oct 2021 at 22:42, Japin Li wrote: > On Thu, 14 Oct 2021 at 19:49, Dilip Kumar wrote: >> On Thu, Oct 14, 2021 at 3:48 PM Sadhuprasad Patro wrote: >>> >>> Hi All, >>> >>> Publisher 'DateStyle' is set as "SQL, MDY", whereas in Subscriber as >>> "SQL, DMY", the logical replication is no

Re: Reset snapshot export state on the transaction abort

2021-10-16 Thread Michael Paquier
On Sat, Oct 16, 2021 at 08:31:36AM -0700, Zhihong Yu wrote: > On Sat, Oct 16, 2021 at 3:10 AM Dilip Kumar wrote: >> On Sat, Oct 16, 2021 at 9:13 AM Michael Paquier >> wrote: >>> One solution would be as simple as saving >>> SavedResourceOwnerDuringExport into a temporary variable before >>> calli

Refactoring pg_dump's getTables()

2021-10-16 Thread Tom Lane
Attached is a proposed patch that refactors getTables() along the same lines as some previous work (eg 047329624, ed2c7f65b, daa9fe8a5) to avoid having multiple partially-redundant copies of the SQL query. This gets rid of nearly 300 lines of duplicative spaghetti code, creates a uniform style for

access to record's field in dynamic SQL doesn't work

2021-10-16 Thread Pavel Stehule
Hi I played with one dynamic access to record's fields. I was surprised so I cannot to access to record field from dynamic SQL. Is there some reason why it is not possible? Today all composite types in PL/pgSQL are records: do $$ declare r record; _relname varchar; begin for r in select * from

Re: Trivial doc patch

2021-10-16 Thread rir
On Sat, Oct 16, 2021 at 11:14:46AM +0900, Michael Paquier wrote: > On Fri, Oct 15, 2021 at 01:13:14PM -0400, rir wrote: > > This removes the outer square brackets in the create_database.sgml > > file's synopsis. In the command sysopses, this is the only case > > where an optional group contains on

Re: XTS cipher mode for cluster file encryption

2021-10-16 Thread Bruce Momjian
On Sat, Oct 16, 2021 at 09:15:05AM -0700, Andres Freund wrote: > Hi, > > On 2021-10-16 10:16:25 -0400, Bruce Momjian wrote: > > As a final comment to Andres's email, adding a GCM has the problems > > above, plus it wouldn't detect changes to pg_xact, fsm, vm, etc, which > > could also affect the i

Re: XTS cipher mode for cluster file encryption

2021-10-16 Thread Andres Freund
Hi, On 2021-10-16 10:16:25 -0400, Bruce Momjian wrote: > As a final comment to Andres's email, adding a GCM has the problems > above, plus it wouldn't detect changes to pg_xact, fsm, vm, etc, which > could also affect the integrity of the data. Someone could also restore > and old copy of a patch

Re: Reset snapshot export state on the transaction abort

2021-10-16 Thread Zhihong Yu
On Sat, Oct 16, 2021 at 3:10 AM Dilip Kumar wrote: > On Sat, Oct 16, 2021 at 9:13 AM Michael Paquier > wrote: > > > > While double-checking this stuff, I have noticed something that's > > wrong in the patch when a command that follows a > > CREATE_REPLICATION_SLOT query resets SnapBuildClearExpo

Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

2021-10-16 Thread Japin Li
On Thu, 14 Oct 2021 at 19:49, Dilip Kumar wrote: > On Thu, Oct 14, 2021 at 3:48 PM Sadhuprasad Patro wrote: >> >> Hi All, >> >> Publisher 'DateStyle' is set as "SQL, MDY", whereas in Subscriber as >> "SQL, DMY", the logical replication is not working... >> >> From Publisher: >> postgres=# INSERT

Re: XTS cipher mode for cluster file encryption

2021-10-16 Thread Bruce Momjian
On Fri, Oct 15, 2021 at 10:57:03PM +0200, Tomas Vondra wrote: > > That said, I don't think that's really a huge issue or something that's > > a show stopper or a reason to hold off on using XTS. Note that what > > those bits actually *are* isn't leaked, just that they changed in some > > fashion i

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-16 Thread Andrew Dunstan
On 10/16/21 7:21 AM, Bharath Rupireddy wrote: > On Wed, Oct 6, 2021 at 4:31 PM Bharath Rupireddy > wrote: >> On Wed, Oct 6, 2021 at 7:52 AM Michael Paquier wrote: >>> On Wed, Oct 06, 2021 at 07:19:04AM +0530, Bharath Rupireddy wrote: I was thinking of the same. +1 for "vcregress check-worl

Re: Missing log message in recoveryStopsAfter() for RECOVERY_TARGET_TIME recovery target type

2021-10-16 Thread Bharath Rupireddy
On Thu, Oct 14, 2021 at 7:05 AM Kyotaro Horiguchi wrote: > > At Wed, 13 Oct 2021 19:56:17 +0530, Bharath Rupireddy > wrote in > > Hi, > > > > I see that the recoveryStopsAfter() doesn't have any "recovery > > stopping after " sort of log for RECOVERY_TARGET_TIME recovery > > target type. It

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-10-16 Thread Bharath Rupireddy
On Wed, Oct 6, 2021 at 4:31 PM Bharath Rupireddy wrote: > > On Wed, Oct 6, 2021 at 7:52 AM Michael Paquier wrote: > > > > On Wed, Oct 06, 2021 at 07:19:04AM +0530, Bharath Rupireddy wrote: > > > I was thinking of the same. +1 for "vcregress check-world" which is > > > more in sync with it's peer

Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.

2021-10-16 Thread Bharath Rupireddy
On Thu, Oct 14, 2021 at 10:56 AM Fujii Masao wrote: > On 2021/10/12 15:46, Bharath Rupireddy wrote: > > On Tue, Oct 12, 2021 at 5:37 AM Fujii Masao > > wrote: > >> > >> On 2021/10/12 4:07, Bharath Rupireddy wrote: > >>> Hi, > >>> > >>> While working on [1], it is found that currently the ProcSta

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-16 Thread Bharath Rupireddy
On Wed, Oct 13, 2021 at 11:06 PM Fujii Masao wrote: > On 2021/10/13 14:00, Bharath Rupireddy wrote: > > On Tue, Oct 12, 2021 at 11:11 PM Fujii Masao > > wrote: > >> BTW, I found file_fdw.c, dblink.c, postgres_fdw/option.c and foreign.c > >> use different error codes for the same error message as

Re: Reset snapshot export state on the transaction abort

2021-10-16 Thread Dilip Kumar
On Sat, Oct 16, 2021 at 9:13 AM Michael Paquier wrote: > > While double-checking this stuff, I have noticed something that's > wrong in the patch when a command that follows a > CREATE_REPLICATION_SLOT query resets SnapBuildClearExportedSnapshot(). > Once the slot is created, the WAL sender is in

Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

2021-10-16 Thread Gilles Darold
Le 15/10/2021 à 20:51, Bruce Momjian a écrit : > Why is this not better addressed by creating a view on the original > table, even perhaps renaming the original table and create a view using > the old table name. Because when you use the view for the select you can not use the "hidden" column in y