pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[bug] Table not have typarray when created by single user mode
14+ messages / 7 participants
[nested] [flat]

Commits from this thread:
  2020-07-07 f3faf35f37  Don't create pg_type entries for sequences or toast tables.
  2020-07-06 f7f70d5e22  Create composite array types for initdb-created relations.
* [bug] Table not have typarray when created by single user mode
@ 2020-04-13 08:25  wenjing <wjzeng2012@gmail.com>
  0 siblings, 1 reply; 14+ messages in thread

From: wenjing @ 2020-04-13 08:25 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: tushar <tushar.ahuja@enterprisedb.com>

Hi 

I found an exception using the latest master branch of PGSQL and wanted to check if it was a bug

Please refer this below scenario
1)initdb  ./initdb -k -D data
2)Connect to server using single user mode ( ./postgres --single -D data postgres) and create a  table
 ./postgres --single -D data Postgres

PostgreSQL stand-alone backend 13devel
backend>create table t_create_by_standalone(n int);

--Press Ctl+D to exit

3) use pg_ctl start database
pg_ctl -D data -c start

4) use psql connect database, and create a table
create table t_create_by_psql(n int);

5) check the pg_type info
postgres=# select oid,relname,reltype from pg_class where relname like 't_create%';
  oid  |        relname         | reltype 
-------+------------------------+---------
 13581 | t_create_by_standalone |   13582
 16384 | t_create_by_psql       |   16386
(2 rows)

postgres=# SELECT oid,typname, typarray FROM pg_catalog.pg_type WHERE oid in (13582,16386);
  oid  |        typname         | typarray 
-------+------------------------+----------
 13582 | t_create_by_standalone |        0
 16386 | t_create_by_psql       |    16385
(2 rows)

Use single user mode (t_create_by_standalone) typarray = 0, but use psql t_create_by_psql typarray has oid.

Is there something wrong to have different catalog information with the same sql?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-04-13 14:51  Tom Lane <tgl@sss.pgh.pa.us>
  parent: wenjing <wjzeng2012@gmail.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Tom Lane @ 2020-04-13 14:51 UTC (permalink / raw)
  To: wenjing <wjzeng2012@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>

wenjing <wjzeng2012@gmail.com> writes:
> Use single user mode (t_create_by_standalone) typarray = 0, but use psql t_create_by_psql typarray has oid.

That's because of this in heap_create_with_catalog:

    /*
     * Decide whether to create an array type over the relation's rowtype. We
     * do not create any array types for system catalogs (ie, those made
     * during initdb). We do not create them where the use of a relation as
     * such is an implementation detail: toast tables, sequences and indexes.
     */
    if (IsUnderPostmaster && (relkind == RELKIND_RELATION ||
                              relkind == RELKIND_VIEW ||
                              relkind == RELKIND_MATVIEW ||
                              relkind == RELKIND_FOREIGN_TABLE ||
                              relkind == RELKIND_COMPOSITE_TYPE ||
                              relkind == RELKIND_PARTITIONED_TABLE))
        new_array_oid = AssignTypeArrayOid();

Admittedly, "!IsUnderPostmaster" is not exactly the same thing as "running
during initdb", but I do not consider this a bug.  You generally should
not be using single-user mode for anything except disaster recovery.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-04-14 03:16  wenjing <wjzeng2012@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 14+ messages in thread

From: wenjing @ 2020-04-14 03:16 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>



> 2020年4月13日 下午10:51,Tom Lane <tgl@sss.pgh.pa.us> 写道:
> 
> wenjing <wjzeng2012@gmail.com> writes:
>> Use single user mode (t_create_by_standalone) typarray = 0, but use psql t_create_by_psql typarray has oid.
> 
> That's because of this in heap_create_with_catalog:
> 
>    /*
>     * Decide whether to create an array type over the relation's rowtype. We
>     * do not create any array types for system catalogs (ie, those made
>     * during initdb). We do not create them where the use of a relation as
>     * such is an implementation detail: toast tables, sequences and indexes.
>     */
>    if (IsUnderPostmaster && (relkind == RELKIND_RELATION ||
>                              relkind == RELKIND_VIEW ||
>                              relkind == RELKIND_MATVIEW ||
>                              relkind == RELKIND_FOREIGN_TABLE ||
>                              relkind == RELKIND_COMPOSITE_TYPE ||
>                              relkind == RELKIND_PARTITIONED_TABLE))
>        new_array_oid = AssignTypeArrayOid();
> 
> Admittedly, "!IsUnderPostmaster" is not exactly the same thing as "running
> during initdb", but I do not consider this a bug.  You generally should
> not be using single-user mode for anything except disaster recovery.
> 
> 			regards, tom lane


Thanks for explain. I can understand your point.

However, if such a table exists, an error with pg_upgrade is further raised

./initdb -k -D datanew
./pg_upgrade -d data -d datanew - b. -b.

Restoring database schemas in the new cluster
  postgres                                                  
*failure*

Consult the last few lines of "pg_upgrade_dump_13580.log" for
the probable cause of the failure.
Failure, exiting

pg_restore: from TOC entry 200; 1259 13581 TABLE t_create_by_standalone wenjing
pg_restore: error: could not execute query: ERROR:  pg_type array OID value not set when in binary upgrade mode
Command was:
-- For binary upgrade, must preserve pg_type oid
SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('13582'::pg_catalog.oid);

I wonder if there are any restrictions that need to be put in somewhere?



Wenjing

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-04-14 18:00  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: wenjing <wjzeng2012@gmail.com>
  0 siblings, 2 replies; 14+ messages in thread

From: Alvaro Herrera @ 2020-04-14 18:00 UTC (permalink / raw)
  To: wenjing <wjzeng2012@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>

On 2020-Apr-14, wenjing wrote:

> However, if such a table exists, an error with pg_upgrade is further raised
> 
> ./initdb -k -D datanew
> ./pg_upgrade -d data -d datanew - b. -b.
> 
> Restoring database schemas in the new cluster
>   postgres                                                  
> *failure*
> 
> Consult the last few lines of "pg_upgrade_dump_13580.log" for
> the probable cause of the failure.
> Failure, exiting
> 
> pg_restore: from TOC entry 200; 1259 13581 TABLE t_create_by_standalone wenjing
> pg_restore: error: could not execute query: ERROR:  pg_type array OID value not set when in binary upgrade mode

Maybe the solution is to drop the table before pg_upgrade.

(Perhaps in --check mode pg_upgrade could warn you about such
situations.  But then, should it warn you specifically about random
other instances of catalog corruption?)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-19 08:19  wenjing zeng <wjzeng2012@gmail.com>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 0 replies; 14+ messages in thread

From: wenjing zeng @ 2020-05-19 08:19 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; tushar <tushar.ahuja@enterprisedb.com>; Prabhat Sahu <prabhat.sahu@enterprisedb.com>; +Cc: pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>; wjzeng <wjzeng2012@gmail.com>


> 2020年4月15日 上午2:00,Alvaro Herrera <alvherre@2ndquadrant.com> 写道:
> 
> On 2020-Apr-14, wenjing wrote:
> 
>> However, if such a table exists, an error with pg_upgrade is further raised
>> 
>> ./initdb -k -D datanew
>> ./pg_upgrade -d data -d datanew - b. -b.
>> 
>> Restoring database schemas in the new cluster
>>  postgres                                                  
>> *failure*
>> 
>> Consult the last few lines of "pg_upgrade_dump_13580.log" for
>> the probable cause of the failure.
>> Failure, exiting
>> 
>> pg_restore: from TOC entry 200; 1259 13581 TABLE t_create_by_standalone wenjing
>> pg_restore: error: could not execute query: ERROR:  pg_type array OID value not set when in binary upgrade mode
> 
> Maybe the solution is to drop the table before pg_upgrade.
> 
> (Perhaps in --check mode pg_upgrade could warn you about such
> situations.  But then, should it warn you specifically about random
> other instances of catalog corruption?)

I fixed the problem along your lines.
Please check.


Wenjing

> 
> -- 
> Álvaro Herrera                https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

check_for_incomplete_object_definition_v1.txt (text/plain, 3.2K) download diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index 00aef85..abb5f8a 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -27,6 +27,7 @@ static void check_for_reg_data_type_usage(ClusterInfo *cluster); static void check_for_jsonb_9_4_usage(ClusterInfo *cluster); static void check_for_pg_role_prefix(ClusterInfo *cluster); static char *get_canonical_locale_name(int category, const char *locale); +static void check_for_incomplete_object_definition(ClusterInfo *cluster); /* @@ -142,6 +143,9 @@ check_and_dump_old_cluster(bool live_check) if (GET_MAJOR_VERSION(old_cluster.major_version) <= 804) new_9_0_populate_pg_largeobject_metadata(&old_cluster, true); + if (GET_MAJOR_VERSION(old_cluster.major_version) >= 802 && user_opts.check) + check_for_incomplete_object_definition(&old_cluster); + /* * While not a check option, we do this now because this is the only time * the old server is running. @@ -1246,3 +1250,81 @@ get_canonical_locale_name(int category, const char *locale) return res; } + +/* + * check_for_incomplete_object_definition() + */ +static void +check_for_incomplete_object_definition(ClusterInfo *cluster) +{ + int dbnum; + FILE *script = NULL; + bool found = false; + char output_path[MAXPGPATH]; + + prep_status("Checking for incomplete object definition"); + + snprintf(output_path, sizeof(output_path), "incomplete_object_definition.txt"); + + for (dbnum = 0; dbnum < cluster->dbarr.ndbs; dbnum++) + { + PGresult *res; + bool db_used = false; + int ntups; + int rowno; + int i_nspname, + i_relname; + DbInfo *active_db = &cluster->dbarr.dbs[dbnum]; + PGconn *conn = connectToServer(cluster, active_db->db_name); + + res = executeQueryOrDie(conn, + "SELECT n.nspname, c.relname " + "FROM pg_catalog.pg_class c, " + " pg_catalog.pg_namespace n, " + " pg_catalog.pg_type t " + "WHERE c.relkind in('r', 'v', 'm', 'p', 'f') AND " + " t.oid = c.reltype AND " + " t.typarray = 0 AND " + " c.relnamespace = n.oid AND " + " n.nspname NOT IN ('pg_catalog', 'information_schema')"); + + ntups = PQntuples(res); + i_nspname = PQfnumber(res, "nspname"); + i_relname = PQfnumber(res, "relname"); + for (rowno = 0; rowno < ntups; rowno++) + { + found = true; + if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL) + pg_fatal("could not open file \"%s\": %s\n", + output_path, strerror(errno)); + if (!db_used) + { + fprintf(script, "In database: %s\n", active_db->db_name); + db_used = true; + } + fprintf(script, " %s.%s\n", + PQgetvalue(res, rowno, i_nspname), + PQgetvalue(res, rowno, i_relname)); + } + + PQclear(res); + + PQfinish(conn); + } + + if (script) + fclose(script); + + if (found) + { + pg_log(PG_REPORT, "fatal\n"); + pg_fatal("Your installation contains one or more incomplete table or view definitions.\n" + "They are probably created in single-user mode.\n" + "so this cluster cannot currently be upgraded.\n" + "You can remove the problem tables or views and restart the upgrade.\n" + "A list of the problem objects is in the file:\n" + " %s\n\n", output_path); + } + else + check_ok(); +}
^ permalink raw reply [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-19 09:40  shawn wang <shawn.wang.pg@gmail.com>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 1 reply; 14+ messages in thread

From: shawn wang @ 2020-05-19 09:40 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: wenjing <wjzeng2012@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>

Alvaro Herrera <alvherre@2ndquadrant.com> 于2020年5月19日周二 下午5:18写道:

> On 2020-Apr-14, wenjing wrote:
>
> > However, if such a table exists, an error with pg_upgrade is further
> raised
> >
> > ./initdb -k -D datanew
> > ./pg_upgrade -d data -d datanew - b. -b.
> >
> > Restoring database schemas in the new cluster
> >   postgres
> > *failure*
> >
> > Consult the last few lines of "pg_upgrade_dump_13580.log" for
> > the probable cause of the failure.
> > Failure, exiting
> >
> > pg_restore: from TOC entry 200; 1259 13581 TABLE t_create_by_standalone
> wenjing
> > pg_restore: error: could not execute query: ERROR:  pg_type array OID
> value not set when in binary upgrade mode
>
> Maybe the solution is to drop the table before pg_upgrade.
>
> Hi, I don't understand about dropping the table.
Although single-user mode is used for bootstrapping by initdb. Sometimes it
is used for debugging or disaster recovery.
However, it is still possible for users to process data in this mode. If
only the table is deleted,
I worry that it will cause inconvenience to the user.
I don't understand why we must be IsUnderPostmaster to create an array type
too.
If we could create an array type in single-user mode, there is not this
issue.

Regards,

--
Shawn Wang

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-19 15:32  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: shawn wang <shawn.wang.pg@gmail.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Alvaro Herrera @ 2020-05-19 15:32 UTC (permalink / raw)
  To: shawn wang <shawn.wang.pg@gmail.com>; +Cc: wenjing <wjzeng2012@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>

On 2020-May-19, shawn wang wrote:

> Although single-user mode is used for bootstrapping by initdb. Sometimes it
> is used for debugging or disaster recovery.
> However, it is still possible for users to process data in this mode. If
> only the table is deleted,
> I worry that it will cause inconvenience to the user.
> I don't understand why we must be IsUnderPostmaster to create an array type
> too.
> If we could create an array type in single-user mode, there is not this
> issue.

Looking at the code again, there is one other possible solution: remove
the ereport(ERROR) from AssignTypeArrayOid.  This means that we'll
return InvalidOid and the array type will be marked as 0 in the upgraded
cluster ... which is exactly the case in the original server.  (Of
course, when array_oid is returned as invalid, the creation of the array
should be skipped, in callers of AssignTypeArrayOid.)

I think the argument to have that error check there, is that it's a
cross-check to avoid pg_upgrade bugs for cases where
binary_upgrade_next_array_type_oid is not set when it should have been
set.  But I think we've hammered the pg_upgrade code sufficiently now,
that we don't need that check anymore.  Any bugs that result in that
behavior will be very evident by lack of consistency on some upgrade
anyway.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-19 16:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 2 replies; 14+ messages in thread

From: Tom Lane @ 2020-05-19 16:09 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: shawn wang <shawn.wang.pg@gmail.com>; wenjing <wjzeng2012@gmail.com>; pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I think the argument to have that error check there, is that it's a
> cross-check to avoid pg_upgrade bugs for cases where
> binary_upgrade_next_array_type_oid is not set when it should have been
> set.  But I think we've hammered the pg_upgrade code sufficiently now,
> that we don't need that check anymore.  Any bugs that result in that
> behavior will be very evident by lack of consistency on some upgrade
> anyway.

I don't buy that argument at all; that's a pretty critical cross-check
IMO, because it's quite important that pg_upgrade control all type OIDs
assigned in the new cluster.  And I think it's probably easier to
break than you're hoping :-(

I think a safer fix is to replace the IsUnderPostmaster check in
heap_create_with_catalog with !IsBootstrapProcessingMode() or the
like.  That would have the result that we'd create array types for
the information_schema views, as well as the system views made in
system_views.sql, which is slightly annoying but probably no real
harm in the big scheme of things.  (I wonder if we ought to reverse
the sense of the adjacent relkind check, turning it into a blacklist,
while at it.)

I remain however of the opinion that doing this sort of thing in
single-user mode, or really much of anything beyond emergency
vacuuming, is unwise.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-20 08:15  shawn wang <shawn.wang.pg@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 14+ messages in thread

From: shawn wang @ 2020-05-20 08:15 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; wenjing <wjzeng2012@gmail.com>; pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>

Tom Lane <tgl@sss.pgh.pa.us> 于2020年5月20日周三 上午12:09写道:

> I think a safer fix is to replace the IsUnderPostmaster check in
> heap_create_with_catalog with !IsBootstrapProcessingMode() or the
> like.  That would have the result that we'd create array types for
> the information_schema views, as well as the system views made in
> system_views.sql, which is slightly annoying but probably no real
> harm in the big scheme of things.  (I wonder if we ought to reverse
> the sense of the adjacent relkind check, turning it into a blacklist,
> while at it.)
>

Thank you for the explanation.
I prefer to change the conditions too.


>
> I remain however of the opinion that doing this sort of thing in
> single-user mode, or really much of anything beyond emergency
> vacuuming, is unwise.
>

I do agree with you, but there is no clear point in the document (maybe I
did not read it all),
it is recommended to make it clear in the document.

Regards,
--
Shawn Wang

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-21 07:28  wenjing zeng <wjzeng2012@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 14+ messages in thread

From: wenjing zeng @ 2020-05-21 07:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; shawn wang <shawn.wang.pg@gmail.com>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>



> 2020年5月20日 上午12:09,Tom Lane <tgl@sss.pgh.pa.us> 写道:
> 
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> I think the argument to have that error check there, is that it's a
>> cross-check to avoid pg_upgrade bugs for cases where
>> binary_upgrade_next_array_type_oid is not set when it should have been
>> set.  But I think we've hammered the pg_upgrade code sufficiently now,
>> that we don't need that check anymore.  Any bugs that result in that
>> behavior will be very evident by lack of consistency on some upgrade
>> anyway.
> 
> I don't buy that argument at all; that's a pretty critical cross-check
> IMO, because it's quite important that pg_upgrade control all type OIDs
> assigned in the new cluster.  And I think it's probably easier to
> break than you're hoping :-(
> 
> I think a safer fix is to replace the IsUnderPostmaster check in
> heap_create_with_catalog with !IsBootstrapProcessingMode() or the
> like.  That would have the result that we'd create array types for
> the information_schema views, as well as the system views made in
> system_views.sql, which is slightly annoying but probably no real
> harm in the big scheme of things.  (I wonder if we ought to reverse
> the sense of the adjacent relkind check, turning it into a blacklist,
> while at it.)
Thanks for your help, This method passed all regression tests and pg_upgrade checks.
It looks perfect.



Wenjing

> 
> I remain however of the opinion that doing this sort of thing in
> single-user mode, or really much of anything beyond emergency
> vacuuming, is unwise.
> 
> 			regards, tom lane

Attachments:

incomplete_array_type_in_single_user_mode_v2.patch (application/octet-stream, 758B) download diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index e393c93..ba5716b 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -1272,8 +1272,10 @@ heap_create_with_catalog(const char *relname, * do not create any array types for system catalogs (ie, those made * during initdb). We do not create them where the use of a relation as * such is an implementation detail: toast tables, sequences and indexes. + * + * Only the Bootstrap mode is limited. */ - if (IsUnderPostmaster && (relkind == RELKIND_RELATION || + if (!IsBootstrapProcessingMode() && (relkind == RELKIND_RELATION || relkind == RELKIND_VIEW || relkind == RELKIND_MATVIEW || relkind == RELKIND_FOREIGN_TABLE ||
^ permalink raw reply [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-21 08:10  Shawn Wang <shawn.wang.pg@gmail.com>
  parent: wenjing zeng <wjzeng2012@gmail.com>
  0 siblings, 0 replies; 14+ messages in thread

From: Shawn Wang @ 2020-05-21 08:10 UTC (permalink / raw)
  To: pgsql-hackers@lists.postgresql.org; +Cc: wenjing zeng <wjzeng2012@gmail.com>

The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           tested, passed
Documentation:            not tested

I verified and found no problems.

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-21 11:37  Amit Kapila <amit.kapila16@gmail.com>
  parent: shawn wang <shawn.wang.pg@gmail.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Amit Kapila @ 2020-05-21 11:37 UTC (permalink / raw)
  To: shawn wang <shawn.wang.pg@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@2ndquadrant.com>; wenjing <wjzeng2012@gmail.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; tushar <tushar.ahuja@enterprisedb.com>

On Wed, May 20, 2020 at 1:45 PM shawn wang <shawn.wang.pg@gmail.com> wrote:
>
> Tom Lane <tgl@sss.pgh.pa.us> 于2020年5月20日周三 上午12:09写道:
>>
>>
>> I remain however of the opinion that doing this sort of thing in
>> single-user mode, or really much of anything beyond emergency
>> vacuuming, is unwise.
>
>
> I do agree with you, but there is no clear point in the document (maybe I did not read it all),
> it is recommended to make it clear in the document.
>

It seems to be indicated in the docs [1] (see the paragraph starting
with "The postgres command can also be called in single-user mode
...") that it is used for debugging or disaster recovery.

[1] - https://www.postgresql.org/docs/devel/app-postgres.html

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [bug] Table not have typarray when created by single user mode
@ 2020-05-25 03:37  shawn wang <shawn.wang.pg@gmail.com>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 0 replies; 14+ messages in thread

From: shawn wang @ 2020-05-25 03:37 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@2ndquadrant.com>; wenjing <wjzeng2012@gmail.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; tushar <tushar.ahuja@enterprisedb.com>

Amit Kapila <amit.kapila16@gmail.com> 于2020年5月21日周四 下午7:37写道:

> On Wed, May 20, 2020 at 1:45 PM shawn wang <shawn.wang.pg@gmail.com>
> wrote:


Thank you for your reply.

>
>
It seems to be indicated in the docs [1] (see the paragraph starting
> with "The postgres command can also be called in single-user mode
> ...") that it is used for debugging or disaster recovery.
>
> [1] - https://www.postgresql.org/docs/devel/app-postgres.html


The description here is what users should do, and my suggestion is to
clearly indicate what users cannot do.

Regards,
--
Shawn Wang

^ permalink  raw  reply  [nested|flat] 14+ messages in thread


end of thread, other threads:[~2020-05-25 03:37 UTC | newest]

Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 08:25 [bug] Table not have typarray when created by single user mode wenjing <wjzeng2012@gmail.com>
2020-04-13 14:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-04-14 03:16   ` wenjing <wjzeng2012@gmail.com>
2020-04-14 18:00     ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-05-19 08:19       ` wenjing zeng <wjzeng2012@gmail.com>
2020-05-19 09:40       ` shawn wang <shawn.wang.pg@gmail.com>
2020-05-19 15:32         ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-05-19 16:09           ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-20 08:15             ` shawn wang <shawn.wang.pg@gmail.com>
2020-05-21 11:37               ` Amit Kapila <amit.kapila16@gmail.com>
2020-05-25 03:37                 ` shawn wang <shawn.wang.pg@gmail.com>
2020-05-21 07:28             ` wenjing zeng <wjzeng2012@gmail.com>
2020-05-21 08:10               ` Shawn Wang <shawn.wang.pg@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox