Thread: BUG #14096: run pgbench, db crash

BUG #14096: run pgbench, db crash

From
zhaozp@uxsino.com
Date:
The following bug has been logged on the website:

Bug reference:      14096
Logged by:          zpzhao
Email address:      zhaozp@uxsino.com
PostgreSQL version: 9.5.1
Operating system:   centos7
Description:

PageAddItem中,phdr->pd_lower,pd_upper为0

Re: BUG #14096: run pgbench, db crash

From
Alvaro Herrera
Date:
zhaozp@uxsino.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      14096
> Logged by:          zpzhao
> Email address:      zhaozp@uxsino.com
> PostgreSQL version: 9.5.1
> Operating system:   centos7
> Description:
>
> PageAddItem中,phdr->pd_lower,pd_upper为0

Please provide more details on the crash you see.  This description is
not enough.

Thanks,

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

Re: BUG #14096: run pgbench, db crash

From
"zhaozp@uxsino.com"
Date:
Y29yZSBmaWxlIDoNCg0KIzAgIDB4MDAwMDAwM2U2MWUzMjYyNSBpbiByYWlzZSAoKSBmcm9tIC9s
aWI2NC9saWJjLnNvLjYNCiMxICAweDAwMDAwMDNlNjFlMzNlMDUgaW4gYWJvcnQgKCkgZnJvbSAv
bGliNjQvbGliYy5zby42DQojMiAgMHgwMDAwMDAwMDAwYTU2ODBjIGluIGVycmZpbmlzaCAoZHVt
bXk9PHZhbHVlIG9wdGltaXplZCBvdXQ+KSBhdCBlbG9nLmM6NTUxDQojMyAgMHgwMDAwMDAwMDAw
OTY0ZmM3IGluIFBhZ2VBZGRJdGVtIChwYWdlPTx2YWx1ZSBvcHRpbWl6ZWQgb3V0PiwgaXRlbT0w
eDI2MWU5MDAgIngnIiwgc2l6ZT0xMjEsIG9mZnNldE51bWJlcj0wLCBvdmVyd3JpdGU9PHZhbHVl
IG9wdGltaXplZCBvdXQ+LCBpc19oZWFwPTx2YWx1ZSBvcHRpbWl6ZWQgb3V0PikgYXQgYnVmcGFn
ZS5jOjE5OA0KIzQgIDB4MDAwMDAwM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W9uOiA5LjUuMQ0KPiBPcGVyYXRpbmcgc3lz
dGVtOiAgIGNlbnRvczcNCj4gRGVzY3JpcHRpb246ICAgICAgICANCj4gDQo+IFBhZ2VBZGRJdGVt
5Lit77yMcGhkci0+cGRfbG93ZXIscGRfdXBwZXLkuLowDQogDQpQbGVhc2UgcHJvdmlkZSBtb3Jl
IGRldGFpbHMgb24gdGhlIGNyYXNoIHlvdSBzZWUuICBUaGlzIGRlc2NyaXB0aW9uIGlzDQpub3Qg
ZW5vdWdoLg0KIA0KVGhhbmtzLA0KIA0KLS0gDQrDgWx2YXJvIEhlcnJlcmEgICAgICAgICAgICAg
ICAgaHR0cDovL3d3dy4ybmRRdWFkcmFudC5jb20vDQpQb3N0Z3JlU1FMIERldmVsb3BtZW50LCAy
NHg3IFN1cHBvcnQsIFJlbW90ZSBEQkEsIFRyYWluaW5nICYgU2VydmljZXMNCg==

[BUGS] postmaster.c ,have a warning: pg_getnameinfo_all() failed

From
"zhaozp@uxsino.com"
Date:

static void
4071 BackendInitialize(Port *port)
4073     int         status;
4074     int         ret;
4075     char        remote_host[NI_MAXHOST];
4076     char        remote_port[NI_MAXSERV];
4077     char        remote_ps_data[NI_MAXHOST];


4130     /*
4131      * Get the remote host name and port for logging and status display.
4132      */
4133     remote_host[0] = '\0';
4134     remote_port[0] = '\0';
4135     if ((ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
4136                                   remote_host, sizeof(remote_host),
4137                                   remote_port, sizeof(remote_port),
4138                  (log_hostname ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV)) != 0)
4139         ereport(WARNING,
4140                 (errmsg_internal("pg_getnameinfo_all() failed: %s",
4141                                  gai_strerror(ret))));


     Modified below, correct?
4136                                   remote_host, NI_MAXHOST,
4137                                   remote_port, NI_MAXSERV,

Re: [BUGS] postmaster.c ,have a warning: pg_getnameinfo_all() failed

From
Tom Lane
Date:
"zhaozp@uxsino.com" <zhaozp@uxsino.com> writes:
> 4075     char        remote_host[NI_MAXHOST];
> 4076     char        remote_port[NI_MAXSERV];
> ...
> 4135     if ((ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
> 4136                                   remote_host, sizeof(remote_host),
> 4137                                   remote_port, sizeof(remote_port),
> 4138                  (log_hostname ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV)) != 0)


>      Modified below, correct?
> 4136                                   remote_host, NI_MAXHOST,
> 4137                                   remote_port, NI_MAXSERV,


Why do you think that's an improvement?  The values should be the same,
but the existing code doesn't have a hazard of changing the array size
in one place and failing to change the other.

            regards, tom lane


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs