Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table

Alvaro Herrera-9
Haven't read the patch, but I tried applying it on top of my tablespace
fixing patch ... and my first report is that this query in regress fails
(three times):

 select conname, obj_description(oid, 'pg_constraint') from pg_constraint where conname = 'c_chk' order by 1, 2;
  conname |            obj_description            
 ---------+---------------------------------------
+ c_chk   | alttype_cleanup_idx check constraint
  c_chk   | alttype_cleanup_idx1 check constraint
  c_chk   | alttype_cleanup_idx2 check constraint
- c_chk   | alttype_cleanup_idx check constraint
 (3 rows)

I think you should use 'ORDER BY 2 COLLATE "C"' to avoid the problem.

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


Reply | Threaded
Open this post in threaded view
|

Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table

Amit Langote
On Thu, Apr 25, 2019 at 10:46 PM Alvaro Herrera
<[hidden email]> wrote:

> Haven't read the patch, but I tried applying it on top of my tablespace
> fixing patch ... and my first report is that this query in regress fails
> (three times):
>
>  select conname, obj_description(oid, 'pg_constraint') from pg_constraint where conname = 'c_chk' order by 1, 2;
>   conname |            obj_description
>  ---------+---------------------------------------
> + c_chk   | alttype_cleanup_idx check constraint
>   c_chk   | alttype_cleanup_idx1 check constraint
>   c_chk   | alttype_cleanup_idx2 check constraint
> - c_chk   | alttype_cleanup_idx check constraint
>  (3 rows)
>
> I think you should use 'ORDER BY 2 COLLATE "C"' to avoid the problem.

Oops, will do.  Thanks.

Regards,
Amit


Reply | Threaded
Open this post in threaded view
|

Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table

Alvaro Herrera-9
In reply to this post by Alvaro Herrera-9
Hi,

Please trim the quoted text in your reply.

On 2019-Apr-26, Amit Langote wrote:

> Per Alvaro's report, regression tests added weren't portable.  Fixed that
> in the attached updated patch.

Um, this one doesn't apply because of yesterday's 87259588d0ab.

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